rollup-plugin-dts icon indicating copy to clipboard operation
rollup-plugin-dts copied to clipboard

[Feature Request] support custom transformers

Open zhzLuke96 opened this issue 9 months ago • 0 comments

My requirement is similar to the issue #133 mentioned. I need to generate a .d.ts file representing only the public API of a large TypeScript codebase, excluding private/internal symbols and types.

Based on my preliminary verification, this requirement can be achieved if rollup-plugin-dts exposes an interface for custom transformers. It would be similar to the transformers parameter of rollup-plugin-ts (https://github.com/wessberg/rollup-plugin-ts#transformers), allowing me to provide custom transformers.

Expected behavior

const plugin = dts({
    transformers: [myCustomTransformer]
})

zhzLuke96 avatar May 07 '24 09:05 zhzLuke96