An open API service indexing awesome lists of open source software.

https://github.com/joakin/check-js-with-ts

Test type checking JS files with the TS compiler
https://github.com/joakin/check-js-with-ts

Last synced: about 1 year ago
JSON representation

Test type checking JS files with the TS compiler

Awesome Lists containing this project

README

          

# Check JS files with TS

A mini repo showing how TypeScript type checking works with JSDoc on JS files.

See https://github.com/Microsoft/TypeScript/wiki/Type-Checking-JavaScript-Files
for more information.

See `src/` for the source JS files. See `dist` for the compiled files.

Try uncommenting the lines in `src/index.js` and see the compilation step fail.

`npm start` runs the compiler on watch mode. `npm run build` runs the compiler
once.

Then, `node dist/index.js` to run your program.