Skip to content

Commit 2c24f81

Browse files
committed
added tests
1 parent b033693 commit 2c24f81

20 files changed

+164
-37
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
//// [tests/cases/compiler/keepImportsInDts1.ts] ////
2+
3+
//// [test.d.ts]
4+
5+
export {};
6+
//// [main.ts]
7+
import "test"
8+
9+
//// [main.js]
10+
define(["require", "exports", "test"], function (require, exports) {
11+
"use strict";
12+
});
13+
14+
15+
//// [main.d.ts]
16+
import "test";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== c:/test.d.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== c:/app/main.ts ===
5+
import "test"
6+
No type information for this code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== c:/test.d.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== c:/app/main.ts ===
5+
import "test"
6+
No type information for this code.
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
//// [tests/cases/compiler/keepImportsInDts2.ts] ////
2+
3+
//// [test.ts]
4+
5+
export {};
6+
//// [main.ts]
7+
import "./folder/test"
8+
9+
//// [test.js]
10+
define(["require", "exports"], function (require, exports) {
11+
"use strict";
12+
});
13+
//// [main.js]
14+
define(["require", "exports", "./folder/test"], function (require, exports) {
15+
"use strict";
16+
});
17+
18+
19+
//// [test.d.ts]
20+
export { };
21+
//// [main.d.ts]
22+
import "./folder/test";
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/folder/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== tests/cases/compiler/main.ts ===
5+
import "./folder/test"
6+
No type information for this code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/folder/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== tests/cases/compiler/main.ts ===
5+
import "./folder/test"
6+
No type information for this code.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//// [tests/cases/compiler/keepImportsInDts3.ts] ////
2+
3+
//// [test.ts]
4+
5+
export {};
6+
//// [main.ts]
7+
import "test"
8+
9+
//// [outputfile.js]
10+
define("test", ["require", "exports"], function (require, exports) {
11+
"use strict";
12+
});
13+
define("app/main", ["require", "exports", "test"], function (require, exports) {
14+
"use strict";
15+
});
16+
17+
18+
//// [outputfile.d.ts]
19+
declare module "test" {
20+
export { };
21+
}
22+
declare module "app/main" {
23+
import "test";
24+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== c:/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== c:/app/main.ts ===
5+
import "test"
6+
No type information for this code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== c:/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== c:/app/main.ts ===
5+
import "test"
6+
No type information for this code.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
//// [tests/cases/compiler/keepImportsInDts4.ts] ////
2+
3+
//// [test.ts]
4+
5+
export {};
6+
//// [main.ts]
7+
import "./folder/test"
8+
9+
//// [outputfile.js]
10+
define("folder/test", ["require", "exports"], function (require, exports) {
11+
"use strict";
12+
});
13+
define("main", ["require", "exports", "folder/test"], function (require, exports) {
14+
"use strict";
15+
});
16+
17+
18+
//// [outputfile.d.ts]
19+
declare module "folder/test" {
20+
export { };
21+
}
22+
declare module "main" {
23+
import "folder/test";
24+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/folder/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== tests/cases/compiler/main.ts ===
5+
import "./folder/test"
6+
No type information for this code.
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
=== tests/cases/compiler/folder/test.ts ===
2+
3+
No type information for this code.export {};
4+
No type information for this code.=== tests/cases/compiler/main.ts ===
5+
import "./folder/test"
6+
No type information for this code.

tests/baselines/reference/noErrorOnEmptyDts.js

Lines changed: 0 additions & 13 deletions
This file was deleted.

tests/baselines/reference/noErrorOnEmptyDts.symbols

Lines changed: 0 additions & 8 deletions
This file was deleted.

tests/baselines/reference/noErrorOnEmptyDts.types

Lines changed: 0 additions & 8 deletions
This file was deleted.
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// @module: amd
2+
// @declaration: true
3+
4+
// @filename: c:/test.d.ts
5+
export {};
6+
// @filename: c:/app/main.ts
7+
import "test"
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// @module: amd
2+
// @declaration: true
3+
4+
// @filename: folder/test.ts
5+
export {};
6+
// @filename: main.ts
7+
import "./folder/test"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// @module: amd
2+
// @declaration: true
3+
// @out: outputfile.js
4+
5+
// @filename: c:/test.ts
6+
export {};
7+
// @filename: c:/app/main.ts
8+
import "test"
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
// @module: amd
2+
// @declaration: true
3+
// @out: outputfile.js
4+
5+
// @filename: folder/test.ts
6+
export {};
7+
// @filename: main.ts
8+
import "./folder/test"

tests/cases/compiler/noErrorOnEmptyDts.ts

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)