Merge the interfaces written in .d.ts.
import { dtsMergeInterface } from 'dts-merge-interface/rollup-plugin';
import { dts } from 'rollup-plugin-dts';
const config = [
// …
{
input: "src/index.ts",
output: [{ file: "dist/index.d.ts", format: "es" }],
plugins: [
dts(),
dtsMergeInterface(),
],
},
];
export default config;
declare module '.' {
interface Interface {
foo: () => void;
}
}
declare module '.' {
interface Interface {
bar: () => void;
}
}
interface Interface {
}
declare function example(): void;
export { type Interface, example as default };
interface Interface {
foo: () => void;
bar: () => void;
}
declare function example(): void;
export { type Interface, example as default };
Generated using TypeDoc