Socket
Socket
Sign inDemoInstall

tsm

Package Overview
Dependencies
23
Maintainers
1
Versions
26
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    tsm

TypeScript Module Loader


Version published
Weekly downloads
26K
decreased by-29.27%
Maintainers
1
Install size
8.33 MB
Created
Weekly downloads
 

Readme

Source
tsm
version CI downloads publish size
TypeScript Module Loader

Features

  • Supports node <file> usage
  • Supports ESM --loader usage
  • Supports --require hook 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.md for 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

Keywords

FAQs

Last updated on 28 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc