69 lines
976 B
Plaintext
69 lines
976 B
Plaintext
=== tests/cases/conformance/externalModules/foo1.ts ===
|
|
interface I1 {
|
|
>I1 : I1
|
|
|
|
a: string;
|
|
>a : string
|
|
|
|
b: number;
|
|
>b : number
|
|
}
|
|
|
|
var x: I1 = {a: "test", b: 42};
|
|
>x : I1
|
|
>I1 : I1
|
|
>{a: "test", b: 42} : { a: string; b: number; }
|
|
>a : string
|
|
>"test" : string
|
|
>b : number
|
|
>42 : number
|
|
|
|
export = x; // Should fail, I1 not exported.
|
|
>x : I1
|
|
|
|
|
|
=== tests/cases/conformance/externalModules/foo2.ts ===
|
|
interface I1 {
|
|
>I1 : I1
|
|
|
|
a: string;
|
|
>a : string
|
|
|
|
b: number;
|
|
>b : number
|
|
}
|
|
|
|
class C1 {
|
|
>C1 : C1
|
|
|
|
m1: I1;
|
|
>m1 : I1
|
|
>I1 : I1
|
|
}
|
|
|
|
export = C1; // Should fail, type I1 of visible member C1.m1 not exported.
|
|
>C1 : C1
|
|
|
|
=== tests/cases/conformance/externalModules/foo3.ts ===
|
|
interface I1 {
|
|
>I1 : I1
|
|
|
|
a: string;
|
|
>a : string
|
|
|
|
b: number;
|
|
>b : number
|
|
}
|
|
|
|
class C1 {
|
|
>C1 : C1
|
|
|
|
private m1: I1;
|
|
>m1 : I1
|
|
>I1 : I1
|
|
}
|
|
|
|
export = C1; // Should work, private type I1 of visible class C1 only used in private member m1.
|
|
>C1 : C1
|
|
|