← All tools

npm-dts

Popularity 65 Updated Development & Build

Simple DTS single-file generation utility for TypeScript bundles

npmauto-collected

Installation

npm
npm install -g npm-dts

Install with npm.

npm-dts

by Vytenis Urbonavičius

This utility generates single index.d.ts file for whole NPM package.

It allows creating bundled NPM library packages without TypeScript sources and yet still keeping code suggestions wherever these libraries are imported.

TypeScript picks up index.d.ts automatically.

---

Some useful forks:

  • @htho/npm-dts by Hauke Thorenz - custom alias functionality (--customAlias), tree shaking (--shake)

---

Installation

Local:

npm install --save-dev npm-dts

Global:

npm install -g npm-dts

---

CLI Usage

Please make sure that target project has "typescript" installed in nodemodules.

To see full CLI help - run without arguments: