Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@loaderkit/ts

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@loaderkit/ts

🐘 @loaderkit/ts - A nodejs loader for TypeScript =================================================

  • 1.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

🐘 @loaderkit/ts - A nodejs loader for TypeScript

This is a simple loader for well-configured TypeScript projects running in nodejs.

This loader does not perform any type checking. It only performs transpilation. A well-configured project should run tsc -b -w in a separate process.

This loader should only be used in projects which use ECMAScript modules. A well-configured project should not be using CommonJS.

Source maps are passed along in the transpilation process, so the --enable-source-maps nodejs flag is recommended.

An extra degree of care has been taken to ensure that import.meta.url, and the internal url values are reasonable. When an output destination is specified in the nearest tsconfig.json then import.meta.url will be the value it would have been if run from the tsc-transpiled output. The internal url property will be resolved to the TypeScript source file which ensures good support with chained loaders such as dynohot.

EXAMPLE

main.ts

const value: string = 'hello world';
console.log(value);
$ node --import @loaderkit/ts/register test.ts
hello world

OR

$ node --loader @loaderkit/ts test.ts
hello world

FAQs

Package last updated on 26 Dec 2023

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc