The following is left as legacy docs.
Nicer TypeScript, making it easier to work with the compiler API 🌹
Kudos to the TypeScript team for maintaining all the code that this project depends on. This project is just a minor automation on top.
- Releases everyday.
- Consistent side by side usage (just add an
package.jsonlinks you to typescript definitions (using
- Super Nice: We expose the internal APIs (the ones that have
/* internal */)
- Super Nice: We expose the global
require('ntypescript')once and start using
tslike you are in the actual compiler source code.
- Super Nice: Converts
const enumin the compiler definition to
enum. This decreases the typescript compiler version dependence on your dev tools TS->JS emit.
- Easier to muck around with the compiler / language service when installed from NPM. Just open any file from
node_modules/ntypescript/srcfolder in atom-typescript and press
f6to get a new local rebuild.
- This project does not ship with
typescript you can install and use
npm install ntypescript -g
or in your package.json
npm install ntypescript@latest --save --save-exact
Each release is named after the day it was built and the git commit hash in Microsoft/TypeScript/master that it was built from. We recommend adding
save-exact as there are no guarantees on when stuff might break and you want your users to get the same version you tested.
You can use
ntsc exactly like the
tsc command line tool.
In addition to returning what
typescript returns we also expose
ts as a global.
Which makes it easy to use the compiler API if you are using it heavily. Note you only need to
require once from any file.
require('typescript') you can do that quite simply using your package.json:
Release name example :
This project comes with a built in
grunt task called
ntypescript. Just has just one task level option:
project: path to the project directory i.e. the directory that contains
Here is a sample
Gruntfile.js for usage:
Init and setup in
npm initnpm install ntypescript@latest --save --save-exact
And then you just need to do the following to build your project:
npm run build
Note that this is a personal endeavor, not officially by Microsoft.