You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(1,10): error TS2459: Module '"./es6ImportNamedImportNoNamedExports_0"' declares 'a' locally, but it is not exported.
2
-
tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(2,10): error TS2459: Module '"./es6ImportNamedImportNoNamedExports_0"' declares 'a' locally, but it is not exported.
1
+
tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(1,10): error TS2617: 'a' can only be imported by using 'import a = require("./es6ImportNamedImportNoNamedExports_0")' or by turning on the 'esModuleInterop' flag and using a default import.
2
+
tests/cases/compiler/es6ImportNamedImportNoNamedExports_1.ts(2,10): error TS2617: 'a' can only be imported by using 'import a = require("./es6ImportNamedImportNoNamedExports_0")' or by turning on the 'esModuleInterop' flag and using a default import.
import { a } from "./es6ImportNamedImportNoNamedExports_0";
11
11
~
12
-
!!! error TS2459: Module '"./es6ImportNamedImportNoNamedExports_0"' declares 'a' locally, but it is not exported.
13
-
!!! related TS2728 tests/cases/compiler/es6ImportNamedImportNoNamedExports_0.ts:1:5: 'a' is declared here.
12
+
!!! error TS2617: 'a' can only be imported by using 'import a = require("./es6ImportNamedImportNoNamedExports_0")' or by turning on the 'esModuleInterop' flag and using a default import.
14
13
import { a as x } from "./es6ImportNamedImportNoNamedExports_0";
15
14
~
16
-
!!! error TS2459: Module '"./es6ImportNamedImportNoNamedExports_0"' declares 'a' locally, but it is not exported.
17
-
!!! related TS2728 tests/cases/compiler/es6ImportNamedImportNoNamedExports_0.ts:1:5: 'a' is declared here.
15
+
!!! error TS2617: 'a' can only be imported by using 'import a = require("./es6ImportNamedImportNoNamedExports_0")' or by turning on the 'esModuleInterop' flag and using a default import.
tests/cases/compiler/a.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
2
+
tests/cases/compiler/b.js(1,10): error TS2596: 'Foo' can only be imported by turning on the 'esModuleInterop' flag and using a default import.
3
+
tests/cases/compiler/b.js(1,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
4
+
5
+
6
+
==== tests/cases/compiler/a.ts (1 errors) ====
7
+
class Foo {}
8
+
export = Foo;
9
+
~~~~~~~~~~~~~
10
+
!!! error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
11
+
12
+
==== tests/cases/compiler/b.js (2 errors) ====
13
+
import { Foo } from './a';
14
+
~~~
15
+
!!! error TS2596: 'Foo' can only be imported by turning on the 'esModuleInterop' flag and using a default import.
16
+
~~~~~
17
+
!!! error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
tests/cases/compiler/a.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
2
+
tests/cases/compiler/b.js(1,10): error TS2595: 'Foo' can only be imported by using a default import.
3
+
tests/cases/compiler/b.js(1,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
4
+
5
+
6
+
==== tests/cases/compiler/a.ts (1 errors) ====
7
+
class Foo {}
8
+
export = Foo;
9
+
~~~~~~~~~~~~~
10
+
!!! error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
11
+
12
+
==== tests/cases/compiler/b.js (2 errors) ====
13
+
import { Foo } from './a';
14
+
~~~
15
+
!!! error TS2595: 'Foo' can only be imported by using a default import.
16
+
~~~~~
17
+
!!! error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
tests/cases/compiler/b.ts(1,10): error TS2617: 'Foo' can only be imported by using 'import Foo = require("./a")' or by turning on the 'esModuleInterop' flag and using a default import.
2
+
tests/cases/compiler/b.ts(1,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
3
+
4
+
5
+
==== tests/cases/compiler/a.ts (0 errors) ====
6
+
class Foo {}
7
+
export = Foo;
8
+
9
+
==== tests/cases/compiler/b.ts (2 errors) ====
10
+
import { Foo } from './a';
11
+
~~~
12
+
!!! error TS2617: 'Foo' can only be imported by using 'import Foo = require("./a")' or by turning on the 'esModuleInterop' flag and using a default import.
13
+
~~~~~
14
+
!!! error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
tests/cases/compiler/b.ts(1,10): error TS2616: 'Foo' can only be imported by using 'import Foo = require("./a")' or a default import.
2
+
tests/cases/compiler/b.ts(1,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
3
+
4
+
5
+
==== tests/cases/compiler/a.ts (0 errors) ====
6
+
class Foo {}
7
+
export = Foo;
8
+
9
+
==== tests/cases/compiler/b.ts (2 errors) ====
10
+
import { Foo } from './a';
11
+
~~~
12
+
!!! error TS2616: 'Foo' can only be imported by using 'import Foo = require("./a")' or a default import.
13
+
~~~~~
14
+
!!! error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'esModuleInterop' flag and referencing its default export.
tests/cases/compiler/a.ts(2,1): error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
2
+
tests/cases/compiler/b.ts(1,10): error TS2596: 'Foo' can only be imported by turning on the 'esModuleInterop' flag and using a default import.
3
+
tests/cases/compiler/b.ts(1,21): error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
4
+
5
+
6
+
==== tests/cases/compiler/a.ts (1 errors) ====
7
+
class Foo {}
8
+
export = Foo;
9
+
~~~~~~~~~~~~~
10
+
!!! error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead.
11
+
12
+
==== tests/cases/compiler/b.ts (2 errors) ====
13
+
import { Foo } from './a';
14
+
~~~
15
+
!!! error TS2596: 'Foo' can only be imported by turning on the 'esModuleInterop' flag and using a default import.
16
+
~~~~~
17
+
!!! error TS2497: This module can only be referenced with ECMAScript imports/exports by turning on the 'allowSyntheticDefaultImports' flag and referencing its default export.
0 commit comments