I would like to get an error and warning list from the TypeScript compiler when it is run against my .js files. i.e. not ready to convert this project's .js files to .ts files but still want to get some of the inferred typing from the tsc compiler to see what warnings and errors it would generate against a project's .js files.
Is there a way to run the tsc compiler against a .js file and tell it to treat the .js file as input and not to generate an output file but instead to generate just the errors and warnings?
I know this an old question, but for new readers, from the command line you can do
tsc --AllowJs --checkJs
Or set those to true in your tsconfig.json
Source: https://www.typescriptlang.org/docs/handbook/compiler-options.html
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With