37 lines
617 B
Text
37 lines
617 B
Text
=== tests/cases/conformance/externalModules/a.ts ===
|
|
import * as Foo from './foo';
|
|
>Foo : typeof Foo
|
|
|
|
Foo.fn();
|
|
>Foo.fn() : void
|
|
>Foo.fn : () => void
|
|
>Foo : typeof Foo
|
|
>fn : () => void
|
|
|
|
let x: Foo.Thing;
|
|
>x : Foo.Thing
|
|
>Foo : any
|
|
>Thing : Foo.Thing
|
|
|
|
let y: number = x.n;
|
|
>y : number
|
|
>x.n : number
|
|
>x : Foo.Thing
|
|
>n : number
|
|
|
|
=== tests/cases/conformance/externalModules/foo.d.ts ===
|
|
|
|
export var x: number;
|
|
>x : number
|
|
|
|
export function fn(): void;
|
|
>fn : () => void
|
|
|
|
export interface Thing { n: typeof x }
|
|
>Thing : Thing
|
|
>n : number
|
|
>x : number
|
|
|
|
export as namespace Foo;
|
|
>Foo : any
|
|
|