tsm
TypeScript Module Loader
TypeScript Module Loader
#Features
- Supports
node <file>usage - Supports ESM
--loaderusage† - Supports
--requirehook usage - Optional configuration file for per-extension customization
† The ESM Loader API is still experimental and will change in the future.
#Install
# install as project dependency
$ npm install --save-dev tsm
# or install globally
$ npm install --global tsm
#Usage
Note: Refer to
/docs/usage.mdfor more information.
# use as `node` replacement
$ tsm server.ts
# forwards any `node` ENV or flags
$ NO_COLOR=1 tsm server.ts --trace-warnings
# use as `--require` hook
$ node --require tsm server.tsx
$ node -r tsm server.tsx
# use as `--loader` hook
$ node --loader tsm main.jsx
#License
MIT © Luke Edwards
See also
create-worktop(3), tschema(3), fetch-event-stream(3), resolve.exports(3), empathic(3), mrmime(3), comptime(3), @freshie/plugin.babel(3), typescript-module(3), cfw(3)