* Retain imports in declaration emit if they augment an export of the importing file * (sp) * Check that a merge occurs, just because
20 lines
557 B
TypeScript
20 lines
557 B
TypeScript
// @declaration: true
|
|
// @filename: child1.ts
|
|
import { ParentThing } from './parent';
|
|
|
|
declare module './parent' {
|
|
interface ParentThing {
|
|
add: (a: number, b: number) => number;
|
|
}
|
|
}
|
|
|
|
export function child1(prototype: ParentThing) {
|
|
prototype.add = (a: number, b: number) => a + b;
|
|
}
|
|
|
|
// @filename: parent.ts
|
|
import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module
|
|
|
|
export class ParentThing implements ParentThing {}
|
|
|
|
child1(ParentThing.prototype); |