83 lines
1.1 KiB
Text
83 lines
1.1 KiB
Text
|
=== tests/cases/conformance/externalModules/foo_1.ts ===
|
||
|
import foo = require("./foo_0");
|
||
|
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||
|
|
||
|
// None of the below should cause a runtime dependency on foo_0
|
||
|
import f = foo.M1;
|
||
|
>f : f
|
||
|
>foo : foo
|
||
|
>M1 : M1
|
||
|
|
||
|
var i: f.I2;
|
||
|
>i : I2
|
||
|
>f : f
|
||
|
>I2 : I2
|
||
|
|
||
|
var x: foo.C1 = <{m1: number}>{};
|
||
|
>x : C1
|
||
|
>foo : foo
|
||
|
>C1 : C1
|
||
|
><{m1: number}>{} : { m1: number; }
|
||
|
>m1 : number
|
||
|
>{} : {}
|
||
|
|
||
|
var y: typeof foo.C1.s1 = false;
|
||
|
>y : boolean
|
||
|
>foo : typeof "tests/cases/conformance/externalModules/foo_0"
|
||
|
>C1 : typeof C1
|
||
|
>s1 : boolean
|
||
|
|
||
|
var z: foo.M1.I2;
|
||
|
>z : I2
|
||
|
>foo : foo
|
||
|
>M1 : M1
|
||
|
>I2 : I2
|
||
|
|
||
|
var e: number = <foo.E1>0;
|
||
|
>e : number
|
||
|
><foo.E1>0 : E1
|
||
|
>foo : foo
|
||
|
>E1 : E1
|
||
|
|
||
|
=== tests/cases/conformance/externalModules/foo_0.ts ===
|
||
|
export class C1 {
|
||
|
>C1 : C1
|
||
|
|
||
|
m1 = 42;
|
||
|
>m1 : number
|
||
|
|
||
|
static s1 = true;
|
||
|
>s1 : boolean
|
||
|
}
|
||
|
|
||
|
export interface I1 {
|
||
|
>I1 : I1
|
||
|
|
||
|
name: string;
|
||
|
>name : string
|
||
|
|
||
|
age: number;
|
||
|
>age : number
|
||
|
}
|
||
|
|
||
|
export module M1 {
|
||
|
>M1 : M1
|
||
|
|
||
|
export interface I2 {
|
||
|
>I2 : I2
|
||
|
|
||
|
foo: string;
|
||
|
>foo : string
|
||
|
}
|
||
|
}
|
||
|
|
||
|
export enum E1 {
|
||
|
>E1 : E1
|
||
|
|
||
|
A,B,C
|
||
|
>A : E1
|
||
|
>B : E1
|
||
|
>C : E1
|
||
|
}
|
||
|
|