Skip to content

Commit 898be45

Browse files
committed
Show that this fails
1 parent 3126112 commit 898be45

13 files changed

+61
-73
lines changed

src/compiler/corePublic.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ namespace ts {
55
// The following is baselined as a literal template type without intervention
66
/** The version of the TypeScript compiler release */
77
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
8-
export const version: string = `${versionMajorMinor}.0-dev`;
8+
export const version: string = `${versionMajorMinor}.0`;
99

1010
/**
1111
* Type of objects whose values are all of the same type.

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
4+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
25
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
36
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
48

59

6-
==== /index.ts (3 errors) ====
10+
==== /index.ts (7 errors) ====
711
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
814
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
917

1018
export interface LocalInterface extends RequireInterface, ImportInterface {}
1119

1220
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
1321
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1422
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1525
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1626
~~~~~~~~~~~~~~~
1727
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1929
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2032
export interface Loc extends Req, Imp {}
2133

2234
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=node16).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3030
//// [index.js]
3131
"use strict";
3232
Object.defineProperty(exports, "__esModule", { value: true });
33-
34-
35-
//// [index.d.ts]
36-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
38-
export interface LocalInterface extends RequireInterface, ImportInterface {
39-
}
40-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
41-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
42-
export interface Loc extends Req, Imp {
43-
}
44-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
45-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,34 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,50): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
4+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
25
/index.ts(7,14): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
36
/index.ts(7,49): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
48

59

6-
==== /index.ts (3 errors) ====
10+
==== /index.ts (7 errors) ====
711
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
814
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
917

1018
export interface LocalInterface extends RequireInterface, ImportInterface {}
1119

1220
import {type RequireInterface as Req} from "pkg" assert { "resolution-mode": "require" };
1321
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1422
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
23+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
24+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1525
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1626
~~~~~~~~~~~~~~~
1727
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1929
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2032
export interface Loc extends Req, Imp {}
2133

2234
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit1(module=nodenext).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,16 +30,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3030
//// [index.js]
3131
"use strict";
3232
Object.defineProperty(exports, "__esModule", { value: true });
33-
34-
35-
//// [index.d.ts]
36-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
37-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
38-
export interface LocalInterface extends RequireInterface, ImportInterface {
39-
}
40-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
41-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
42-
export interface Loc extends Req, Imp {
43-
}
44-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
45-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
24
/index.ts(6,50): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
5+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
36
/index.ts(7,49): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
48

59

6-
==== /index.ts (3 errors) ====
10+
==== /index.ts (7 errors) ====
711
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
814
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
917

1018
export interface LocalInterface extends RequireInterface, ImportInterface {}
1119

@@ -14,9 +22,13 @@
1422
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
1523
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1624
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1727
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1929
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2032
export interface Loc extends Req, Imp {}
2133

2234
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=node16).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3434

3535
//// [index.js]
3636
export {};
37-
38-
39-
//// [index.d.ts]
40-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
41-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
42-
export interface LocalInterface extends RequireInterface, ImportInterface {
43-
}
44-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
45-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
46-
export interface Loc extends Req, Imp {
47-
}
48-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
49-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).errors.txt

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,19 @@
1+
/index.ts(1,45): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2+
/index.ts(2,44): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
13
/index.ts(6,14): error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
24
/index.ts(6,50): error TS1454: `resolution-mode` can only be set for type-only imports.
5+
/index.ts(6,50): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
36
/index.ts(7,49): error TS1454: `resolution-mode` can only be set for type-only imports.
7+
/index.ts(7,49): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
48

59

6-
==== /index.ts (3 errors) ====
10+
==== /index.ts (7 errors) ====
711
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
12+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
13+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
814
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
15+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
16+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
917

1018
export interface LocalInterface extends RequireInterface, ImportInterface {}
1119

@@ -14,9 +22,13 @@
1422
!!! error TS2305: Module '"pkg"' has no exported member 'RequireInterface'.
1523
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1624
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
25+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
26+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
1727
import {type ImportInterface as Imp} from "pkg" assert { "resolution-mode": "import" };
1828
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1929
!!! error TS1454: `resolution-mode` can only be set for type-only imports.
30+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
31+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2032
export interface Loc extends Req, Imp {}
2133

2234
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmit2(module=nodenext).js

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -34,16 +34,3 @@ export type { ImportInterface } from "pkg" assert { "resolution-mode": "import"
3434

3535
//// [index.js]
3636
export {};
37-
38-
39-
//// [index.d.ts]
40-
import type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
41-
import type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
42-
export interface LocalInterface extends RequireInterface, ImportInterface {
43-
}
44-
import { type RequireInterface as Req } from "pkg" assert { "resolution-mode": "require" };
45-
import { type ImportInterface as Imp } from "pkg" assert { "resolution-mode": "import" };
46-
export interface Loc extends Req, Imp {
47-
}
48-
export type { RequireInterface } from "pkg" assert { "resolution-mode": "require" };
49-
export type { ImportInterface } from "pkg" assert { "resolution-mode": "import" };

tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
33
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
44
/index.ts(4,39): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
5+
/index.ts(4,39): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
56
/index.ts(6,76): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
67

78

8-
==== /index.ts (5 errors) ====
9+
==== /index.ts (6 errors) ====
910
// incorrect mode
1011
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
1112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -18,6 +19,8 @@
1819
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1920
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021
!!! error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2124
// not exclusively type-only
2225
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
2326
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=node16).js

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,10 +30,3 @@ export interface LocalInterface extends RequireInterface, ImportInterface {}
3030
//// [index.js]
3131
"use strict";
3232
Object.defineProperty(exports, "__esModule", { value: true });
33-
34-
35-
//// [index.d.ts]
36-
import type { RequireInterface } from "pkg";
37-
import { ImportInterface } from "pkg" assert { "resolution-mode": "import" };
38-
export interface LocalInterface extends RequireInterface, ImportInterface {
39-
}

tests/baselines/reference/nodeModulesImportModeDeclarationEmitErrors1(module=nodenext).errors.txt

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@
22
/index.ts(2,73): error TS1453: `resolution-mode` should be either `require` or `import`.
33
/index.ts(4,10): error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
44
/index.ts(4,39): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
5+
/index.ts(4,39): error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
56
/index.ts(6,76): error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
67

78

8-
==== /index.ts (5 errors) ====
9+
==== /index.ts (6 errors) ====
910
// incorrect mode
1011
import type { RequireInterface } from "pkg" assert { "resolution-mode": "foobar" };
1112
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
@@ -18,6 +19,8 @@
1819
!!! error TS2305: Module '"pkg"' has no exported member 'ImportInterface'.
1920
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
2021
!!! error TS2836: Import assertions are not allowed on statements that transpile to commonjs 'require' calls.
22+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
23+
!!! error TS4125: Resolution mode assertions are unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'.
2124
// not exclusively type-only
2225
import {type RequireInterface as Req, RequireInterface as Req2} from "pkg" assert { "resolution-mode": "require" };
2326
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)