66 lines
1.1 KiB
Text
66 lines
1.1 KiB
Text
=== tests/cases/conformance/externalModules/foo_1.ts ===
|
|
import foo = require("./foo_0");
|
|
>foo : typeof foo
|
|
|
|
var a: number = foo.a();
|
|
>a : number
|
|
>foo.a() : number
|
|
>foo.a : () => number
|
|
>foo : typeof foo
|
|
>a : () => number
|
|
|
|
if(!!foo.b){
|
|
>!!foo.b : boolean
|
|
>!foo.b : boolean
|
|
>foo.b : boolean
|
|
>foo : typeof foo
|
|
>b : boolean
|
|
|
|
foo.Test.answer = foo.c(42);
|
|
>foo.Test.answer = foo.c(42) : number
|
|
>foo.Test.answer : number
|
|
>foo.Test : typeof foo.Test
|
|
>foo : typeof foo
|
|
>Test : typeof foo.Test
|
|
>answer : number
|
|
>foo.c(42) : number
|
|
>foo.c : (a: number) => number
|
|
>foo : typeof foo
|
|
>c : (a: number) => number
|
|
>42 : number
|
|
}
|
|
=== tests/cases/conformance/externalModules/foo_0.ts ===
|
|
module Foo {
|
|
>Foo : typeof Foo
|
|
|
|
export function a(){
|
|
>a : () => number
|
|
|
|
return 5;
|
|
>5 : number
|
|
}
|
|
export var b = true;
|
|
>b : boolean
|
|
>true : boolean
|
|
}
|
|
module Foo {
|
|
>Foo : typeof Foo
|
|
|
|
export function c(a: number){
|
|
>c : (a: number) => number
|
|
>a : number
|
|
|
|
return a;
|
|
>a : number
|
|
}
|
|
export module Test {
|
|
>Test : typeof Test
|
|
|
|
export var answer = 42;
|
|
>answer : number
|
|
>42 : number
|
|
}
|
|
}
|
|
export = Foo;
|
|
>Foo : typeof Foo
|
|
|