baseline for typechecking --declaration

This commit is contained in:
Adam Freidin 2014-08-15 21:14:33 -07:00
parent 06e858ff40
commit d43f28d3a0
2 changed files with 54 additions and 0 deletions

View File

@ -0,0 +1,42 @@
//// [tests/cases/compiler/moduleSymbolMerging.ts] ////
//// [A.ts]
module A { export interface I {} }
//// [B.ts]
///<reference path="A.ts" />
module A { ; }
module B {
export function f(): A.I { return null; }
}
//// [A.js]
//// [B.js]
var A;
(function (A) {
;
})(A || (A = {}));
var B;
(function (B) {
function f() {
return null;
}
B.f = f;
})(B || (B = {}));
//// [A.d.ts]
declare module A {
interface I {
}
}
//// [B.d.ts]
/// <reference path='A.d.ts' />
declare module A {
}
declare module B {
function f(): A.I;
}

View File

@ -0,0 +1,12 @@
// @declaration: true
// @Filename: A.ts
module A { export interface I {} }
// @Filename: B.ts
///<reference path="A.ts" />
module A { ; }
module B {
export function f(): A.I { return null; }
}