A Meteor package that enables use of TypeScript (.ts files).
- Meteor: https://www.meteor.com/
- TypeScript: http://www.typescriptlang.org/
- Add this package to your project.
- Add
.tsfiles or convert your existing.jsfiles to.ts. - Add
.d.tsfiles with definitions for the libraries you use (seedefinitionsdirectory). - Add empty
main.ts-buildfile at the top level. This is the file that triggers the actual compilation. All.tsfiles are passed to the compiler in one go, so that types are automatically visible across files, and to avoid Meteor file scoping that breaks TypeScript assumptions.
Mixing languages (both plain JavaScript and TypeScript) in one project is not supported because all source files are expected to be processed at once (see #4 above).
See usage example here: https://github.com/Hansoft/meteor-typescript-example