-
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
Provide a command-line tsc
flag for specifying type
in package.json
#54876
Comments
This is a Node.js runtime requirement, so any option to override it would essentially be lying to TS about the runtime environment, leading to runtime errors. It would do more harm than good, IMO. |
Fair enough ... I still think the moduleDetection documentation should be clarified ... I guess it's only about the detection of other modules but not the detection of the current module? |
|
Ah I see, thanks for elaborating! I guess I was confused by |
Closing this since debugging node16 resolutions is probably rather an edge case and probably warrants dedicated tooling like @arethetypeswrong/cli. |
To quickly check if some package properly provides its types under node16 from ESM it would be convenient if you could specify "node16 & ESM" solely on the command-line, but currently that does not appear to be possible since you apparently have to put
"type": "module"
in thepackage.json
file.I also tried using
--moduleDetection force
but that didn't have the same effect as"type": "module"
inpackage.json
either.The text was updated successfully, but these errors were encountered: