declare module ...
) results in an error.tsup-augmented-module
via npm init
and put inside index.d.ts
module augmentation, e.g.:declare module "tsup-augmented-module" {
export type SetupOptions = {
token: string;
someOtherOption?: number;
};
}
"types": "index.d.ts"
in package.json
.npm init
and put your augmented module as dependency:"dependencies": {
"tsup-augmented-module": "file:../tsup-augmented-module",
}
index.ts
write:import { SetupOptions } from 'tsup-augmented-module';
export function test(options: SetupOptions): string {
return 'test accomplished!';
}
npx tsup --entry index.ts --dts-only --dts-resolve
and see an error like:RollupError: "SetupOptions" is not exported by 'tsup-augmented-module', imported by "./index.ts".
As typescript complier is able to resolve augmented modules, tsup
should be able to as well.
Pay now to fund the work behind this issue.
Get updates on progress being made.
Maintainer is rewarded once the issue is completed.
You're funding impactful open source efforts
You want to contribute to this effort
You want to get funding like this too