-
-
Notifications
You must be signed in to change notification settings - Fork 431
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 errors TypeScript errors reported for .js when enabling checks using // @ts-check #1004
Comments
I suspect this isn't ts-loader related and rather TypeScript compiler related. I don't have time to dig into this right now but I have a feeling this will be the case... |
@johnnyreilly isn't the problem caused by this condition? ts-loader/src/after-compile.ts Line 186 in bfa48c7
|
You may be correct. Do you want to try it out and see if that's the case? If it is then I'm wondering what a fix looks like. Always including js / jsx files is a possibility. I wonder if that would create any problems |
Have tried the following change successfully |
Want to submit a PR? |
Expected Behaviour
TypeScript errors shall be reported for .js files, if
"checkJS": false
in tsconfig.json but enabled for a few files selectively using// @ts-check
.Actual Behaviour
no TypeScript errors are reported for such .js files
Steps to Reproduce the Problem
Build the repo linked below, the error in test.js is not reported.
Location of a Minimal Repository that Demonstrates the Issue.
https://github.com/reinholdk/ts-loader-sample
The text was updated successfully, but these errors were encountered: