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 puppeteer@13.5.1 all of those .d.tses:

│ puppeteer@13.5.1
└──┬ lib/types.dts
   │
   ├─ devtools-protocol@0.0.979918/types/protocol.d.ts
   └─ devtools-protocol@0.0.979918/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 puppeteer@13.5.1 bundle.d.ts

via npx:

npx remote-type-bundler puppeteer@13.5.1 bundle.d.ts