mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
49 lines
1.9 KiB
Plaintext
49 lines
1.9 KiB
Plaintext
//// [tests/cases/compiler/declarationEmitForModuleImportingModuleAugmentationRetainsImport.ts] ////
|
|
|
|
=== child1.ts ===
|
|
import { ParentThing } from './parent';
|
|
>ParentThing : Symbol(ParentThing, Decl(child1.ts, 0, 8))
|
|
|
|
declare module './parent' {
|
|
>'./parent' : Symbol("./parent", Decl(parent.ts, 0, 0), Decl(child1.ts, 0, 39))
|
|
|
|
interface ParentThing {
|
|
>ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27))
|
|
|
|
add: (a: number, b: number) => number;
|
|
>add : Symbol(ParentThing.add, Decl(child1.ts, 3, 27))
|
|
>a : Symbol(a, Decl(child1.ts, 4, 14))
|
|
>b : Symbol(b, Decl(child1.ts, 4, 24))
|
|
}
|
|
}
|
|
|
|
export function child1(prototype: ParentThing) {
|
|
>child1 : Symbol(child1, Decl(child1.ts, 6, 1))
|
|
>prototype : Symbol(prototype, Decl(child1.ts, 8, 23))
|
|
>ParentThing : Symbol(ParentThing, Decl(child1.ts, 0, 8))
|
|
|
|
prototype.add = (a: number, b: number) => a + b;
|
|
>prototype.add : Symbol(ParentThing.add, Decl(child1.ts, 3, 27))
|
|
>prototype : Symbol(prototype, Decl(child1.ts, 8, 23))
|
|
>add : Symbol(ParentThing.add, Decl(child1.ts, 3, 27))
|
|
>a : Symbol(a, Decl(child1.ts, 9, 21))
|
|
>b : Symbol(b, Decl(child1.ts, 9, 31))
|
|
>a : Symbol(a, Decl(child1.ts, 9, 21))
|
|
>b : Symbol(b, Decl(child1.ts, 9, 31))
|
|
}
|
|
|
|
=== parent.ts ===
|
|
import { child1 } from './child1'; // this import should still exist in some form in the output, since it augments this module
|
|
>child1 : Symbol(child1, Decl(parent.ts, 0, 8))
|
|
|
|
export class ParentThing implements ParentThing {}
|
|
>ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27))
|
|
>ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27))
|
|
|
|
child1(ParentThing.prototype);
|
|
>child1 : Symbol(child1, Decl(parent.ts, 0, 8))
|
|
>ParentThing.prototype : Symbol(ParentThing.prototype)
|
|
>ParentThing : Symbol(ParentThing, Decl(parent.ts, 0, 34), Decl(child1.ts, 2, 27))
|
|
>prototype : Symbol(ParentThing.prototype)
|
|
|