41 lines
1.1 KiB
Text
41 lines
1.1 KiB
Text
|
=== tests/cases/conformance/externalModules/a.ts ===
|
||
|
import * as Bar from './foo';
|
||
|
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))
|
||
|
|
||
|
Bar.fn();
|
||
|
>Bar.fn : Symbol(Bar.fn, Decl(foo.d.ts, 0, 21))
|
||
|
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))
|
||
|
>fn : Symbol(Bar.fn, Decl(foo.d.ts, 0, 21))
|
||
|
|
||
|
let x: Bar.Thing;
|
||
|
>x : Symbol(x, Decl(a.ts, 2, 3))
|
||
|
>Bar : Symbol(Bar, Decl(a.ts, 0, 6))
|
||
|
>Thing : Symbol(Bar.Thing, Decl(foo.d.ts, 1, 27))
|
||
|
|
||
|
let y: number = x.n;
|
||
|
>y : Symbol(y, Decl(a.ts, 3, 3))
|
||
|
>x.n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24))
|
||
|
>x : Symbol(x, Decl(a.ts, 2, 3))
|
||
|
>n : Symbol(Bar.Thing.n, Decl(foo.d.ts, 2, 24))
|
||
|
|
||
|
// should error
|
||
|
let z = Foo;
|
||
|
>z : Symbol(z, Decl(a.ts, 5, 3))
|
||
|
>Foo : Symbol(Foo, Decl(foo.d.ts, 2, 38))
|
||
|
|
||
|
=== tests/cases/conformance/externalModules/foo.d.ts ===
|
||
|
export var x: number;
|
||
|
>x : Symbol(x, Decl(foo.d.ts, 0, 10))
|
||
|
|
||
|
export function fn(): void;
|
||
|
>fn : Symbol(fn, Decl(foo.d.ts, 0, 21))
|
||
|
|
||
|
export interface Thing { n: typeof x }
|
||
|
>Thing : Symbol(Thing, Decl(foo.d.ts, 1, 27))
|
||
|
>n : Symbol(Thing.n, Decl(foo.d.ts, 2, 24))
|
||
|
>x : Symbol(x, Decl(foo.d.ts, 0, 10))
|
||
|
|
||
|
export as namespace Foo;
|
||
|
>Foo : Symbol(Foo, Decl(foo.d.ts, 2, 38))
|
||
|
|