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
- Host: GitHub
- URL: https://github.com/joakin/check-js-with-ts
- Owner: joakin
- Created: 2017-07-31T16:15:33.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-07-31T16:15:45.000Z (almost 9 years ago)
- Last Synced: 2025-02-18T19:56:00.819Z (over 1 year ago)
- Language: JavaScript
- Size: 1.95 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.