-
Notifications
You must be signed in to change notification settings - Fork 12.4k
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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
No error for non-existing css side effect import with noUncheckedSideEffectImports
flag on
#59990
Comments
You cannot benefit from
Mention to If you want to utilize |
Thank you for your response and for the alternative options you gave that may make things work. However though, it is either a confusing wording in release announcement, or it is indeed an issue. The release announcement for this section literally reads like this:
A bit below we can read this:
Not a word about the flag not supporting errors for |
Another thing to add to the conversation here is the name of the flag ( |
I don't really understand what you're proposing happen here. There still needs to be a mechanism to tell TypeScript about modules which will successfully resolve but aren't on disk. That mechanism is |
π Search Terms
noUncheckedSideEffectImports
π Version & Regression Information
β― Playground Link
https://stackblitz.com/edit/vitejs-vite-v2boec?file=src%2Fmain.ts
π» Code
π Actual behavior
With the
noUncheckedSideEffectImports
ts compiler flag on, the error is not thrown for the non-existing.css
file reference (side effect import) when executingtsc
. Actually, it is not thrown for any file extension other thanjs
.π Expected behavior
As stated here, the error should be thrown for non-existing
css
file/module reference.Additional information about the issue
Steps to reproduce:
main.ts
- notice the side effect import of non-existing CSS fileglobals.d.ts
- notice the file and its contents (as described HERE)npm run check
Expected result:
tsc
throws an error for the non-existing file referenceActual result: Specifically, the
tsc
successfully finishes with no errors. In general,tsc
doesn't throw no matter the file extension, EXCEPT for the.js
The text was updated successfully, but these errors were encountered: