53 lines
734 B
Plaintext
53 lines
734 B
Plaintext
=== tests/cases/compiler/file1.ts ===
|
|
|
|
function foo() {}
|
|
>foo : typeof foo
|
|
|
|
namespace foo {
|
|
>foo : typeof foo
|
|
|
|
export var v = 1;
|
|
>v : number
|
|
>1 : 1
|
|
}
|
|
export = foo;
|
|
>foo : typeof foo
|
|
|
|
=== tests/cases/compiler/file2.ts ===
|
|
import x = require("./file1");
|
|
>x : typeof x
|
|
|
|
x.b = 1;
|
|
>x.b = 1 : 1
|
|
>x.b : number
|
|
>x : typeof x
|
|
>b : number
|
|
>1 : 1
|
|
|
|
// OK - './file1' is a namespace
|
|
declare module "./file1" {
|
|
interface A { a }
|
|
>A : A
|
|
>a : any
|
|
|
|
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 = x.b;
|
|
>b : number
|
|
>x.b : number
|
|
>x : typeof x
|
|
>b : number
|
|
|