Skip to content

Commit d43f28d

Browse files
committed
baseline for typechecking --declaration
1 parent 06e858f commit d43f28d

File tree

2 files changed

+54
-0
lines changed

2 files changed

+54
-0
lines changed
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
//// [tests/cases/compiler/moduleSymbolMerging.ts] ////
2+
3+
//// [A.ts]
4+
5+
module A { export interface I {} }
6+
7+
//// [B.ts]
8+
///<reference path="A.ts" />
9+
module A { ; }
10+
module B {
11+
export function f(): A.I { return null; }
12+
}
13+
14+
15+
16+
//// [A.js]
17+
//// [B.js]
18+
var A;
19+
(function (A) {
20+
;
21+
})(A || (A = {}));
22+
var B;
23+
(function (B) {
24+
function f() {
25+
return null;
26+
}
27+
B.f = f;
28+
})(B || (B = {}));
29+
30+
31+
//// [A.d.ts]
32+
declare module A {
33+
interface I {
34+
}
35+
}
36+
//// [B.d.ts]
37+
/// <reference path='A.d.ts' />
38+
declare module A {
39+
}
40+
declare module B {
41+
function f(): A.I;
42+
}
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
// @declaration: true
2+
3+
// @Filename: A.ts
4+
module A { export interface I {} }
5+
6+
// @Filename: B.ts
7+
///<reference path="A.ts" />
8+
module A { ; }
9+
module B {
10+
export function f(): A.I { return null; }
11+
}
12+

0 commit comments

Comments
 (0)