-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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
Setting to set execution environnement (node or browser) #11050
Comments
Why is the browser environment opt-out, but other environments (like node) are opt-in? |
Yes it's working thanks. But now, |
Related: #9466 |
@testerez re getting things like |
I get this error
tsconfig.json
and running |
@testerez try using |
Ho yes sorry didn't see the difference here. Working now! It's not so easy to sell typescript to JS devs... Anything that could make the first contact smoother is welcome! |
Personally I agree that typeScript should not 'choose favourites' between environments. Maybe you could chime in on #9466 since that covers much the same concern and is labeled 'awaiting more feedback'. |
Yes, same topic. Thanks for the link. |
adding a lib for node is covered in #9466. closing. |
When coding for node, It feels strange to have all the stuff specific to browser available by default.
For example, this is compiled with no warning by tsc 2.0.2:
Maybe an env setting in
tsconfig.json
could be a solution...And I would also appreciate that
tsc --init
interactively ask for it. Likeeslint --init
does for example.The text was updated successfully, but these errors were encountered: