mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
27 lines
770 B
Plaintext
27 lines
770 B
Plaintext
//// [tests/cases/conformance/externalModules/topLevelModuleDeclarationAndFile.ts] ////
|
|
|
|
=== foo_2.ts ===
|
|
/// <reference path="foo_1.ts"/>
|
|
import foo = require("vs/foo_0");
|
|
>foo : Symbol(foo, Decl(foo_2.ts, 0, 0))
|
|
|
|
var z1 = foo.x + 10; // Should error, as declaration should win
|
|
>z1 : Symbol(z1, Decl(foo_2.ts, 2, 3))
|
|
>foo : Symbol(foo, Decl(foo_2.ts, 0, 0))
|
|
|
|
var z2 = foo.y() + 10; // Should resolve
|
|
>z2 : Symbol(z2, Decl(foo_2.ts, 3, 3))
|
|
>foo.y : Symbol(foo.y, Decl(foo_1.ts, 1, 11))
|
|
>foo : Symbol(foo, Decl(foo_2.ts, 0, 0))
|
|
>y : Symbol(foo.y, Decl(foo_1.ts, 1, 11))
|
|
|
|
=== foo_1.ts ===
|
|
declare module "vs/foo_0" {
|
|
>"vs/foo_0" : Symbol("vs/foo_0", Decl(foo_1.ts, 0, 0))
|
|
|
|
export var y: () => number;
|
|
>y : Symbol(y, Decl(foo_1.ts, 1, 11))
|
|
}
|
|
|
|
|