70 lines
989 B
Plaintext
70 lines
989 B
Plaintext
=== tests/cases/compiler/file1.ts ===
|
|
|
|
class foo {}
|
|
>foo :
|
|
|
|
namespace foo {
|
|
>foo : typeof
|
|
|
|
export class A {}
|
|
>A : A
|
|
|
|
export namespace B { export let a; }
|
|
>B : typeof B
|
|
>a : any
|
|
}
|
|
export = foo;
|
|
>foo : foo
|
|
|
|
=== tests/cases/compiler/file2.ts ===
|
|
import x = require("./file1");
|
|
>x : typeof x
|
|
|
|
x.B.b = 1;
|
|
>x.B.b = 1 : number
|
|
>x.B.b : number
|
|
>x.B : typeof x.B
|
|
>x : typeof x
|
|
>B : typeof x.B
|
|
>b : number
|
|
>1 : number
|
|
|
|
// OK - './file1' is a namespace
|
|
declare module "./file1" {
|
|
interface A { a: number }
|
|
>A : A
|
|
>a : number
|
|
|
|
namespace B {
|
|
>B : typeof B
|
|
|
|
export let b: number;
|
|
>b : number
|
|
}
|
|
}
|
|
|
|
=== tests/cases/compiler/file3.ts ===
|
|
import * as x from "./file1";
|
|
>x : typeof x
|
|
|
|
import "./file2";
|
|
let a: x.A;
|
|
>a : x.A
|
|
>x : any
|
|
>A : x.A
|
|
|
|
let b = a.a;
|
|
>b : number
|
|
>a.a : number
|
|
>a : x.A
|
|
>a : number
|
|
|
|
let c = x.B.b;
|
|
>c : number
|
|
>x.B.b : number
|
|
>x.B : typeof x.B
|
|
>x : typeof x
|
|
>B : typeof x.B
|
|
>b : number
|
|
|