remote-type-bundler
v0.0.19
Published
This is an attempt to create one `.d.ts` file for a package already published on `npm` **without installing the package or it's dependencies**. For example, for `[email protected]` all of those `.d.ts`es:
Downloads
10
Readme
Experimental Bundle pacakage's .d.ts to one file
This is an attempt to create one .d.ts
file for a package already published on npm
without installing the package or it's dependencies.
For example, for [email protected]
all of those .d.ts
es:
│ [email protected]
└──┬ lib/types.dts
│
├─ [email protected]/types/protocol.d.ts
└─ [email protected]/types/protocol-mapping.d.ts
should be bundled together and wrapped in a declare module 'puppeteer' { ... }
, all references from the "root" type should be followed, as in the example above.
More examples can be seen at tests/e2e/simple-e2e.spec.ts
Based on:
- rollup
- rollup-plugin-dts with this PR merged
- ts-resolve from tsup
- Ideas from npm-dts
Local version:
./bin.js [email protected] bundle.d.ts
via npx:
npx remote-type-bundler [email protected] bundle.d.ts