Skip to content

Commit

Permalink
Add more info about programmatic usage (#251)
Browse files Browse the repository at this point in the history
  • Loading branch information
jschwarty authored and blakeembrey committed Dec 22, 2016
1 parent 55be95c commit 42e5c19
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,13 @@ require('ts-node').register({ /* options */ })
require('ts-node/register')
```

This will register the TypeScript compiler for "on the fly" compilation support of `.ts` and `.tsx` files during the run
of the script. From here you can use `require` to bring in modules from TypeScript files:

```js
var someModule = require('path_to_a_typescript_file');
```

## License

MIT
Expand Down

0 comments on commit 42e5c19

Please sign in to comment.