mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-11-18 17:21:48 +00:00
Add tests and baselines
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault1.ts(1,25): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault1.ts(5,1): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault1.ts (2 errors) ====
|
||||
export default function Foo (){
|
||||
~~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
uhoh: "another default",
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
};
|
||||
~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
//// [multipleExportDefault1.ts]
|
||||
export default function Foo (){
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
|
||||
//// [multipleExportDefault1.js]
|
||||
"use strict";
|
||||
function Foo() {
|
||||
}
|
||||
exports.__esModule = true;
|
||||
exports["default"] = Foo;
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
uhoh: "another default"
|
||||
};
|
||||
@@ -0,0 +1,18 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault2.ts(1,1): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault2.ts(5,25): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault2.ts (2 errors) ====
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
uhoh: "another default",
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
};
|
||||
~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
export default function Foo() { }
|
||||
~~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
//// [multipleExportDefault2.ts]
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
export default function Foo() { }
|
||||
|
||||
|
||||
|
||||
//// [multipleExportDefault2.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
uhoh: "another default"
|
||||
};
|
||||
function Foo() { }
|
||||
exports.__esModule = true;
|
||||
exports["default"] = Foo;
|
||||
@@ -0,0 +1,18 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault3.ts(1,1): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault3.ts(5,22): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault3.ts (2 errors) ====
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
uhoh: "another default",
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
};
|
||||
~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
export default class C { }
|
||||
~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
//// [multipleExportDefault3.ts]
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
export default class C { }
|
||||
|
||||
|
||||
|
||||
//// [multipleExportDefault3.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
uhoh: "another default"
|
||||
};
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports.__esModule = true;
|
||||
exports["default"] = C;
|
||||
@@ -0,0 +1,16 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault4.ts(1,22): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault4.ts(3,1): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault4.ts (2 errors) ====
|
||||
export default class C { }
|
||||
~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
uhoh: "another default",
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
};
|
||||
~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
@@ -0,0 +1,20 @@
|
||||
//// [multipleExportDefault4.ts]
|
||||
export default class C { }
|
||||
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
//// [multipleExportDefault4.js]
|
||||
"use strict";
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports.__esModule = true;
|
||||
exports["default"] = C;
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
uhoh: "another default"
|
||||
};
|
||||
@@ -0,0 +1,11 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault5.ts(1,25): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault5.ts(2,22): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault5.ts (2 errors) ====
|
||||
export default function bar() { }
|
||||
~~~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
export default class C {}
|
||||
~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
@@ -0,0 +1,16 @@
|
||||
//// [multipleExportDefault5.ts]
|
||||
export default function bar() { }
|
||||
export default class C {}
|
||||
|
||||
//// [multipleExportDefault5.js]
|
||||
"use strict";
|
||||
function bar() { }
|
||||
exports.__esModule = true;
|
||||
exports["default"] = bar;
|
||||
var C = (function () {
|
||||
function C() {
|
||||
}
|
||||
return C;
|
||||
}());
|
||||
exports.__esModule = true;
|
||||
exports["default"] = C;
|
||||
@@ -0,0 +1,20 @@
|
||||
tests/cases/conformance/externalModules/multipleExportDefault6.ts(1,1): error TS2528: A module cannot have multiple default exports.
|
||||
tests/cases/conformance/externalModules/multipleExportDefault6.ts(5,1): error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
|
||||
==== tests/cases/conformance/externalModules/multipleExportDefault6.ts (2 errors) ====
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
lol: 1
|
||||
~~~~~~~~~~
|
||||
}
|
||||
~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
|
||||
export default {
|
||||
~~~~~~~~~~~~~~~~
|
||||
lol: 2
|
||||
~~~~~~~~~~
|
||||
}
|
||||
~
|
||||
!!! error TS2528: A module cannot have multiple default exports.
|
||||
@@ -0,0 +1,19 @@
|
||||
//// [multipleExportDefault6.ts]
|
||||
export default {
|
||||
lol: 1
|
||||
}
|
||||
|
||||
export default {
|
||||
lol: 2
|
||||
}
|
||||
|
||||
//// [multipleExportDefault6.js]
|
||||
"use strict";
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
lol: 1
|
||||
};
|
||||
exports.__esModule = true;
|
||||
exports["default"] = {
|
||||
lol: 2
|
||||
};
|
||||
@@ -0,0 +1,7 @@
|
||||
export default function Foo (){
|
||||
|
||||
}
|
||||
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
export default function Foo() { }
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
|
||||
export default class C { }
|
||||
|
||||
@@ -0,0 +1,5 @@
|
||||
export default class C { }
|
||||
|
||||
export default {
|
||||
uhoh: "another default",
|
||||
};
|
||||
@@ -0,0 +1,2 @@
|
||||
export default function bar() { }
|
||||
export default class C {}
|
||||
@@ -0,0 +1,7 @@
|
||||
export default {
|
||||
lol: 1
|
||||
}
|
||||
|
||||
export default {
|
||||
lol: 2
|
||||
}
|
||||
Reference in New Issue
Block a user