Skip to content

wix-incubator/remote-type-bundler

Repository files navigation

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.tses:

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

Local version:

./bin.js [email protected] bundle.d.ts

via npx:

npx remote-type-bundler [email protected] bundle.d.ts