6 ms·
is there a way to use the typescript type checker on js files using jsdoc types?
by afiori 6y ago
is there a way to use the typescript type checker on js files using jsdoc types?
- emteycz 6y agoYes. Simply install TS and make a jsconfig.json file, Vscode will pick it up automatically.
- tgv 6y agoYou need to add // @ts-check at the top of the file: https://www.typescriptlang.org/docs/handbook/intro-to-js-ts.html https://www.typescriptlang.org/docs/handbook/intro-to-js-ts....
- moron4hire 6y agoThere is a config setting for enabling it globally now https://www.typescriptlang.org/tsconfig#checkJs https://www.typescriptlang.org/tsconfig#checkJs
- afiori 6y agoI was missing this, thank you.