-
Notifications
You must be signed in to change notification settings - Fork 4.2k
[Question] TypeScript compilation must include the browser environment #3037
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
How do you see there an issue? It's just the types which allow then the usage of the browser types in Node.js. But if you use them incorrectly it would result in an error thrown by Node.js. |
I use type checking to prevent runtime errors. Regarding |
We've seen a lot of value from having |
@JoelEinbinder I am not for the parameter of |
I am having the same issue - in order to use DOM types inside of Please resurrect this issue. No idea why the unrelated |
I agree - this issue was closed too early. Playwright is a tool running in NodeJS - so why would I have to add all the browser types to my globals just for the use of some evaluating functions? Please reconsider finding another solution here... |
i think microsoft/TypeScript#43434 would solve this problem |
In order to get a successful TypeScript compilation, the
dom
types must be included (previously mentioned in #2659 (comment)).Doing that results in TypeScript allowing access to browser globals such as
window
,document
,URL
and many more, which do not really exist in Node.js.Is this recognized as an issue that would possibly be addressed, please?
The text was updated successfully, but these errors were encountered: