Skip to content
Test type checking JS files with the TS compiler
JavaScript
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
dist Initial example Jul 31, 2017
src Initial example Jul 31, 2017
.gitignore
README.md Initial example Jul 31, 2017
package-lock.json Initial example Jul 31, 2017
package.json Initial example Jul 31, 2017
tsconfig.json Initial example Jul 31, 2017

README.md

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.

You can’t perform that action at this time.