1.0.0 • Published 8 months ago
dts-merge-interface v1.0.0
dts-merge-interface
Merge the interfaces written in .d.ts.
Usage
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;
before
declare module '.' {
interface Interface {
foo: () => void;
}
}
declare module '.' {
interface Interface {
bar: () => void;
}
}
interface Interface {
}
declare function example(): void;
export { type Interface, example as default };
after
interface Interface {
foo: () => void;
bar: () => void;
}
declare function example(): void;
export { type Interface, example as default };
1.0.0
8 months ago
1.0.0-alpha.5
8 months ago
1.0.0-alpha.4
8 months ago
1.0.0-alpha.3
8 months ago
1.0.0-alpha.2
8 months ago
1.0.0-alpha.1
8 months ago