diff --git a/tests/baselines/reference/keepImportsInDts1.js b/tests/baselines/reference/keepImportsInDts1.js new file mode 100644 index 0000000000..8189ce4308 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts1.js @@ -0,0 +1,16 @@ +//// [tests/cases/compiler/keepImportsInDts1.ts] //// + +//// [test.d.ts] + +export {}; +//// [main.ts] +import "test" + +//// [main.js] +define(["require", "exports", "test"], function (require, exports) { + "use strict"; +}); + + +//// [main.d.ts] +import "test"; diff --git a/tests/baselines/reference/keepImportsInDts1.symbols b/tests/baselines/reference/keepImportsInDts1.symbols new file mode 100644 index 0000000000..92bd84c208 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts1.symbols @@ -0,0 +1,6 @@ +=== c:/test.d.ts === + +No type information for this code.export {}; +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts1.types b/tests/baselines/reference/keepImportsInDts1.types new file mode 100644 index 0000000000..92bd84c208 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts1.types @@ -0,0 +1,6 @@ +=== c:/test.d.ts === + +No type information for this code.export {}; +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts2.js b/tests/baselines/reference/keepImportsInDts2.js new file mode 100644 index 0000000000..559b481452 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts2.js @@ -0,0 +1,22 @@ +//// [tests/cases/compiler/keepImportsInDts2.ts] //// + +//// [test.ts] + +export {}; +//// [main.ts] +import "./folder/test" + +//// [test.js] +define(["require", "exports"], function (require, exports) { + "use strict"; +}); +//// [main.js] +define(["require", "exports", "./folder/test"], function (require, exports) { + "use strict"; +}); + + +//// [test.d.ts] +export { }; +//// [main.d.ts] +import "./folder/test"; diff --git a/tests/baselines/reference/keepImportsInDts2.symbols b/tests/baselines/reference/keepImportsInDts2.symbols new file mode 100644 index 0000000000..ce6f4c7c16 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts2.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/folder/test.ts === + +No type information for this code.export {}; +No type information for this code.=== tests/cases/compiler/main.ts === +import "./folder/test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts2.types b/tests/baselines/reference/keepImportsInDts2.types new file mode 100644 index 0000000000..ce6f4c7c16 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts2.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/folder/test.ts === + +No type information for this code.export {}; +No type information for this code.=== tests/cases/compiler/main.ts === +import "./folder/test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts3.js b/tests/baselines/reference/keepImportsInDts3.js new file mode 100644 index 0000000000..e48ba69372 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts3.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/keepImportsInDts3.ts] //// + +//// [test.ts] + +export {}; +//// [main.ts] +import "test" + +//// [outputfile.js] +define("test", ["require", "exports"], function (require, exports) { + "use strict"; +}); +define("app/main", ["require", "exports", "test"], function (require, exports) { + "use strict"; +}); + + +//// [outputfile.d.ts] +declare module "test" { + export { }; +} +declare module "app/main" { + import "test"; +} diff --git a/tests/baselines/reference/keepImportsInDts3.symbols b/tests/baselines/reference/keepImportsInDts3.symbols new file mode 100644 index 0000000000..29c4a4e44b --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts3.symbols @@ -0,0 +1,6 @@ +=== c:/test.ts === + +No type information for this code.export {}; +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts3.types b/tests/baselines/reference/keepImportsInDts3.types new file mode 100644 index 0000000000..29c4a4e44b --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts3.types @@ -0,0 +1,6 @@ +=== c:/test.ts === + +No type information for this code.export {}; +No type information for this code.=== c:/app/main.ts === +import "test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts4.js b/tests/baselines/reference/keepImportsInDts4.js new file mode 100644 index 0000000000..badec87984 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts4.js @@ -0,0 +1,24 @@ +//// [tests/cases/compiler/keepImportsInDts4.ts] //// + +//// [test.ts] + +export {}; +//// [main.ts] +import "./folder/test" + +//// [outputfile.js] +define("folder/test", ["require", "exports"], function (require, exports) { + "use strict"; +}); +define("main", ["require", "exports", "folder/test"], function (require, exports) { + "use strict"; +}); + + +//// [outputfile.d.ts] +declare module "folder/test" { + export { }; +} +declare module "main" { + import "folder/test"; +} diff --git a/tests/baselines/reference/keepImportsInDts4.symbols b/tests/baselines/reference/keepImportsInDts4.symbols new file mode 100644 index 0000000000..ce6f4c7c16 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts4.symbols @@ -0,0 +1,6 @@ +=== tests/cases/compiler/folder/test.ts === + +No type information for this code.export {}; +No type information for this code.=== tests/cases/compiler/main.ts === +import "./folder/test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/keepImportsInDts4.types b/tests/baselines/reference/keepImportsInDts4.types new file mode 100644 index 0000000000..ce6f4c7c16 --- /dev/null +++ b/tests/baselines/reference/keepImportsInDts4.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/folder/test.ts === + +No type information for this code.export {}; +No type information for this code.=== tests/cases/compiler/main.ts === +import "./folder/test" +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/noErrorOnEmptyDts.js b/tests/baselines/reference/noErrorOnEmptyDts.js deleted file mode 100644 index 83595e3d2a..0000000000 --- a/tests/baselines/reference/noErrorOnEmptyDts.js +++ /dev/null @@ -1,13 +0,0 @@ -//// [tests/cases/compiler/noErrorOnEmptyDts.ts] //// - -//// [test.d.ts] - - -// comment - -//// [main.ts] -import "test" - -//// [main.js] -"use strict"; -require("test"); diff --git a/tests/baselines/reference/noErrorOnEmptyDts.symbols b/tests/baselines/reference/noErrorOnEmptyDts.symbols deleted file mode 100644 index 78446a19fb..0000000000 --- a/tests/baselines/reference/noErrorOnEmptyDts.symbols +++ /dev/null @@ -1,8 +0,0 @@ -=== c:/node_modules/test.d.ts === - -No type information for this code. -No type information for this code.// comment -No type information for this code. -No type information for this code.=== c:/app/main.ts === -import "test" -No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/noErrorOnEmptyDts.types b/tests/baselines/reference/noErrorOnEmptyDts.types deleted file mode 100644 index 78446a19fb..0000000000 --- a/tests/baselines/reference/noErrorOnEmptyDts.types +++ /dev/null @@ -1,8 +0,0 @@ -=== c:/node_modules/test.d.ts === - -No type information for this code. -No type information for this code.// comment -No type information for this code. -No type information for this code.=== c:/app/main.ts === -import "test" -No type information for this code. \ No newline at end of file diff --git a/tests/cases/compiler/keepImportsInDts1.ts b/tests/cases/compiler/keepImportsInDts1.ts new file mode 100644 index 0000000000..50bdc5830a --- /dev/null +++ b/tests/cases/compiler/keepImportsInDts1.ts @@ -0,0 +1,7 @@ +// @module: amd +// @declaration: true + +// @filename: c:/test.d.ts +export {}; +// @filename: c:/app/main.ts +import "test" \ No newline at end of file diff --git a/tests/cases/compiler/keepImportsInDts2.ts b/tests/cases/compiler/keepImportsInDts2.ts new file mode 100644 index 0000000000..407526d759 --- /dev/null +++ b/tests/cases/compiler/keepImportsInDts2.ts @@ -0,0 +1,7 @@ +// @module: amd +// @declaration: true + +// @filename: folder/test.ts +export {}; +// @filename: main.ts +import "./folder/test" \ No newline at end of file diff --git a/tests/cases/compiler/keepImportsInDts3.ts b/tests/cases/compiler/keepImportsInDts3.ts new file mode 100644 index 0000000000..cdd83dce13 --- /dev/null +++ b/tests/cases/compiler/keepImportsInDts3.ts @@ -0,0 +1,8 @@ +// @module: amd +// @declaration: true +// @out: outputfile.js + +// @filename: c:/test.ts +export {}; +// @filename: c:/app/main.ts +import "test" \ No newline at end of file diff --git a/tests/cases/compiler/keepImportsInDts4.ts b/tests/cases/compiler/keepImportsInDts4.ts new file mode 100644 index 0000000000..272932be48 --- /dev/null +++ b/tests/cases/compiler/keepImportsInDts4.ts @@ -0,0 +1,8 @@ +// @module: amd +// @declaration: true +// @out: outputfile.js + +// @filename: folder/test.ts +export {}; +// @filename: main.ts +import "./folder/test" \ No newline at end of file diff --git a/tests/cases/compiler/noErrorOnEmptyDts.ts b/tests/cases/compiler/noErrorOnEmptyDts.ts deleted file mode 100644 index 1266ea2bd7..0000000000 --- a/tests/cases/compiler/noErrorOnEmptyDts.ts +++ /dev/null @@ -1,8 +0,0 @@ -// @module: commonjs - -// @filename: c:/node_modules/test.d.ts - -// comment - -// @filename: c:/app/main.ts -import "test" \ No newline at end of file