Typescript compiler for Meteor.js
JavaScript
Latest commit 6cecc3d Aug 21, 2016 @barbatus barbatus committed on GitHub Merge pull request #56 from lokeshjain2008/tsChange
Changed `ambient` to `global` flag.
Permalink
Failed to load latest commit information.
.gitignore remove versions.json, not sure if I should Feb 24, 2015
LICENSE Initial commit Jun 28, 2014
README.md Changed `ambient` to `global` flag. Aug 21, 2016
package.js Bump version Jun 16, 2016

README.md

Meteor Typescript Compiler

Adds TypeScript compiler to Meteor projects.

Change Log

  • 3.2.0: updated to be based on typescript package.

Installation

Just run meteor add meteortypescript:compiler to add TypeScript compiler to your project.

That's it! From now on, all TypeScript files will be dynamically compiled into Javascript.

Compatible with Meteor 1.2.1 and Meteor 1.3.

Notice that ES6 modules are compiled into CommonJS modules by default (see below for more).

TypeScript Options

TypeScript is transpiled into ECMAScript 5 and CommonJS modules by default.

All together default TypeScript compiler options of this compiler are:

{
  "compilerOptions": {
    "module": "commonjs",
    "target": "es5",
    "moduleResolution": "node",
    "experimentalDecorators": true,
    "emitDecoratorMetadata": true,
    "sourceMap": true
  }
}

If you want to customize options, add tsconfig.json file to the root of your app.

For more about available compiler options, please refer to the official docs.

Typings

Recommended way to install typigns is to use typings tool.

For example, to install Meteor declaration files, you'll need to run commands as follows:

npm install typings -g

typings install registry:env/meteor --global

For more information, please read https://github.com/barbatus/typescript#typings.