Open arshaw opened 5 years ago
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.
transformModuleBody
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
.