dts-bundle icon indicating copy to clipboard operation
dts-bundle copied to clipboard

Hook for modifying module body code

Open arshaw opened this issue 6 years ago • 0 comments

I had a need to modify each module's code before writing it to disk. String manipulation is weird on .d.ts code, I know, but I needed a workaround for https://github.com/Microsoft/TypeScript/issues/14080

Instead of baking in a solution for 14080 into the code for dts-bundle, I made a callback that allows arbitrary manipulation of generated module-body code. It's an option called transformModuleBody.

arshaw avatar Jun 25 '19 15:06 arshaw