-
Notifications
You must be signed in to change notification settings - Fork 12.8k
import "os"
compiles even if types
is set to []
in tsconfig.json
#59010
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
This is working as intended. See this comment: #58725 (comment)
|
I see. Thank you for the quick response. This is a workaround for supporting code like |
Okay. Thank you for the clear answer. Closing. |
🔎 Search Terms
is:issue is:open types empty tsconfig label:Bug
🕗 Version & Regression Information
⏯ Playground Link
No response
💻 Code
Create a new npm project and add the dependencies:
Create
tsconfig.json
in the same directory:And write
index.ts
:🙁 Actual behavior
npx tsc -p .
compiles with no errors.🙂 Expected behavior
npx tsc -p .
should raise an error sincetypes
is empty.Additional information about the issue
When modifying the
import
statement inindex.ts
as follows,tsc
reports an error as expected:The text was updated successfully, but these errors were encountered: