Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow program to be passed into generateDtsBundle #350

Open
Danielku15 opened this issue Mar 3, 2025 · 0 comments
Open

Allow program to be passed into generateDtsBundle #350

Danielku15 opened this issue Mar 3, 2025 · 0 comments

Comments

@Danielku15
Copy link

Currently dts-bundle-generator always creates a new TypeScript compilation using the provided compiler options.

https://github.com/timocov/dts-bundle-generator/blob/964f6c62d9f825d222661c179adc47fb7f23c6ac/src/bundle-generator.ts#L142C17-L146

I'd like to pass a custom ts.Program into generateDtsBundle

Use Case:

I want to create bundled DTS files inside a Rollup/Vite plugin. There I already have access to the ts.Program which is used to generally compile and bundle my library.

I create multiple d.ts for different entry points and this is currently very expensive. Reusing the existing program would help a lot speeding up the compilation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant