mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-02-05 08:11:30 -06:00
baseline for typechecking --declaration
This commit is contained in:
parent
06e858ff40
commit
d43f28d3a0
42
tests/baselines/reference/moduleSymbolMerging.js
Normal file
42
tests/baselines/reference/moduleSymbolMerging.js
Normal 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;
|
||||
}
|
||||
12
tests/cases/compiler/moduleSymbolMerging.ts
Normal file
12
tests/cases/compiler/moduleSymbolMerging.ts
Normal 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; }
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user