TypeScript/tests/baselines/reference/declarationEmit_nameConflicts.types
2015-04-15 16:44:20 -07:00

154 lines
2.4 KiB
Plaintext

=== tests/cases/compiler/declarationEmit_nameConflicts_0.ts ===
import im = require('declarationEmit_nameConflicts_1');
>im : typeof im
export module M {
>M : typeof M
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export import a = M.f;
>a : () => void
>M : typeof M
>f : () => void
export import b = M.C;
>b : typeof C
>M : typeof M
>C : C
export import c = N;
>c : typeof N
>N : typeof N
export import d = im;
>d : typeof d
>im : typeof d
}
export module M.P {
>M : typeof M
>P : typeof P
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export import im = M.P.f;
>im : () => void
>M : typeof M
>P : typeof P
>f : () => void
export var a = M.a; // emitted incorrectly as typeof f
>a : () => void
>M.a : () => void
>M : typeof M
>a : () => void
export var b = M.b; // ok
>b : typeof M.C
>M.b : typeof M.C
>M : typeof M
>b : typeof M.C
export var c = M.c; // ok
>c : typeof M.N
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
export var g = M.c.g; // ok
>g : () => void
>M.c.g : () => void
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>g : () => void
export var d = M.d; // emitted incorrectly as typeof im
>d : typeof M.d
>M.d : typeof M.d
>M : typeof M
>d : typeof M.d
}
export module M.Q {
>M : typeof M
>Q : typeof Q
export function f() { }
>f : () => void
export class C { }
>C : C
export module N {
>N : typeof N
export function g() { };
>g : () => void
export interface I { }
>I : I
}
export interface b extends M.b { } // ok
>b : b
>M.b : any
>M : typeof M
>b : M.C
export interface I extends M.c.I { } // ok
>I : I
>M.c.I : any
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>I : M.c.I
export module c {
>c : any
export interface I extends M.c.I { } // ok
>I : I
>M.c.I : any
>M.c : typeof M.N
>M : typeof M
>c : typeof M.N
>I : M.c.I
}
}
=== tests/cases/compiler/declarationEmit_nameConflicts_1.ts ===
module f { export class c { } }
>f : typeof f
>c : c
export = f;
>f : typeof f