egoist / tsup

The simplest and fastest way to bundle your TypeScript libraries.
https://tsup.egoist.dev
MIT License
9k stars 217 forks source link

experimentalDts ignore module augmentation #1052

Open axmad386 opened 10 months ago

axmad386 commented 10 months ago

Problem

Module augmentation is usefull for declaration merging https://www.typescriptlang.org/docs/handbook/declaration-merging.html#module-augmentation When using tsup to generate .d.ts using experimentalDts, it's ignore module augmentation. Change to dts will resolve this problem.

Version Info

Reproduce

Expectation

experimentalDts should generate module augmentation like dts do. This line should be generated on .d.ts file

declare module "axios" {
    interface Axios {
        dummy(): string;
    }
}

Upvote & Fund

Fund with Polar