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-dtsGlobal:
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: