Skip to content

Commit bdf9922

Browse files
Accepted baselines.
1 parent c0f2882 commit bdf9922

File tree

371 files changed

+20949
-1221
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

371 files changed

+20949
-1221
lines changed

tests/baselines/reference/api/tsserverlibrary.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ declare namespace ts {
20632063
hasNoDefaultLib: boolean;
20642064
languageVersion: ScriptTarget;
20652065
/**
2066-
* When `module` is `Node12` or `NodeNext`, this field controls whether the
2066+
* When `module` is `Node16` or `NodeNext`, this field controls whether the
20672067
* source file in question is an ESNext-output-format file, or a CommonJS-output-format
20682068
* module. This is derived by the module resolver as it looks up the file, since
20692069
* it is derived from either the file extension of the module, or the containing
@@ -2893,7 +2893,7 @@ declare namespace ts {
28932893
export enum ModuleResolutionKind {
28942894
Classic = 1,
28952895
NodeJs = 2,
2896-
Node12 = 3,
2896+
Node16 = 3,
28972897
NodeNext = 99
28982898
}
28992899
export enum ModuleDetectionKind {
@@ -2902,7 +2902,7 @@ declare namespace ts {
29022902
*/
29032903
Legacy = 1,
29042904
/**
2905-
* Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+
2905+
* Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+
29062906
*/
29072907
Auto = 2,
29082908
/**
@@ -3074,7 +3074,7 @@ declare namespace ts {
30743074
ES2020 = 6,
30753075
ES2022 = 7,
30763076
ESNext = 99,
3077-
Node12 = 100,
3077+
Node16 = 100,
30783078
NodeNext = 199
30793079
}
30803080
export enum JsxEmit {
@@ -4818,7 +4818,7 @@ declare namespace ts {
48184818
/**
48194819
* Controls the format the file is detected as - this can be derived from only the path
48204820
* and files on disk, but needs to be done with a module resolution cache in scope to be performant.
4821-
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`.
4821+
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
48224822
*/
48234823
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
48244824
/**
@@ -6822,7 +6822,7 @@ declare namespace ts {
68226822
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
68236823
* multiple copies of the same file for different compilation settings. A minimal
68246824
* resolution cache is needed to fully define a source file's shape when
6825-
* the compilation settings include `module: node12`+, so providing a cache host
6825+
* the compilation settings include `module: node16`+, so providing a cache host
68266826
* object should be preferred. A common host is a language service `ConfiguredProject`.
68276827
* @param scriptSnapshot Text of the file. Only used if the file was not found
68286828
* in the registry and a new one was created.
@@ -6841,7 +6841,7 @@ declare namespace ts {
68416841
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
68426842
* multiple copies of the same file for different compilation settings. A minimal
68436843
* resolution cache is needed to fully define a source file's shape when
6844-
* the compilation settings include `module: node12`+, so providing a cache host
6844+
* the compilation settings include `module: node16`+, so providing a cache host
68456845
* object should be preferred. A common host is a language service `ConfiguredProject`.
68466846
* @param scriptSnapshot Text of the file.
68476847
* @param version Current version of the file.

tests/baselines/reference/api/typescript.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2063,7 +2063,7 @@ declare namespace ts {
20632063
hasNoDefaultLib: boolean;
20642064
languageVersion: ScriptTarget;
20652065
/**
2066-
* When `module` is `Node12` or `NodeNext`, this field controls whether the
2066+
* When `module` is `Node16` or `NodeNext`, this field controls whether the
20672067
* source file in question is an ESNext-output-format file, or a CommonJS-output-format
20682068
* module. This is derived by the module resolver as it looks up the file, since
20692069
* it is derived from either the file extension of the module, or the containing
@@ -2893,7 +2893,7 @@ declare namespace ts {
28932893
export enum ModuleResolutionKind {
28942894
Classic = 1,
28952895
NodeJs = 2,
2896-
Node12 = 3,
2896+
Node16 = 3,
28972897
NodeNext = 99
28982898
}
28992899
export enum ModuleDetectionKind {
@@ -2902,7 +2902,7 @@ declare namespace ts {
29022902
*/
29032903
Legacy = 1,
29042904
/**
2905-
* Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node12+
2905+
* Legacy, but also files with jsx under react-jsx or react-jsxdev and esm mode files under moduleResolution: node16+
29062906
*/
29072907
Auto = 2,
29082908
/**
@@ -3074,7 +3074,7 @@ declare namespace ts {
30743074
ES2020 = 6,
30753075
ES2022 = 7,
30763076
ESNext = 99,
3077-
Node12 = 100,
3077+
Node16 = 100,
30783078
NodeNext = 199
30793079
}
30803080
export enum JsxEmit {
@@ -4818,7 +4818,7 @@ declare namespace ts {
48184818
/**
48194819
* Controls the format the file is detected as - this can be derived from only the path
48204820
* and files on disk, but needs to be done with a module resolution cache in scope to be performant.
4821-
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node12` or `nodenext`.
4821+
* This is usually `undefined` for compilations that do not have `moduleResolution` values of `node16` or `nodenext`.
48224822
*/
48234823
impliedNodeFormat?: ModuleKind.ESNext | ModuleKind.CommonJS;
48244824
/**
@@ -6822,7 +6822,7 @@ declare namespace ts {
68226822
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
68236823
* multiple copies of the same file for different compilation settings. A minimal
68246824
* resolution cache is needed to fully define a source file's shape when
6825-
* the compilation settings include `module: node12`+, so providing a cache host
6825+
* the compilation settings include `module: node16`+, so providing a cache host
68266826
* object should be preferred. A common host is a language service `ConfiguredProject`.
68276827
* @param scriptSnapshot Text of the file. Only used if the file was not found
68286828
* in the registry and a new one was created.
@@ -6841,7 +6841,7 @@ declare namespace ts {
68416841
* shape of a the resulting SourceFile. This allows the DocumentRegistry to store
68426842
* multiple copies of the same file for different compilation settings. A minimal
68436843
* resolution cache is needed to fully define a source file's shape when
6844-
* the compilation settings include `module: node12`+, so providing a cache host
6844+
* the compilation settings include `module: node16`+, so providing a cache host
68456845
* object should be preferred. A common host is a language service `ConfiguredProject`.
68466846
* @param scriptSnapshot Text of the file.
68476847
* @param version Current version of the file.

tests/baselines/reference/awaitInNonAsyncFunction.errors.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ tests/cases/compiler/awaitInNonAsyncFunction.ts(30,9): error TS1103: 'for await'
1212
tests/cases/compiler/awaitInNonAsyncFunction.ts(31,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
1313
tests/cases/compiler/awaitInNonAsyncFunction.ts(34,7): error TS1103: 'for await' loops are only allowed within async functions and at the top levels of modules.
1414
tests/cases/compiler/awaitInNonAsyncFunction.ts(35,5): error TS1308: 'await' expressions are only allowed within async functions and at the top levels of modules.
15-
tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
16-
tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
15+
tests/cases/compiler/awaitInNonAsyncFunction.ts(39,5): error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
16+
tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
1717

1818

1919
==== tests/cases/compiler/awaitInNonAsyncFunction.ts (16 errors) ====
@@ -97,7 +97,7 @@ tests/cases/compiler/awaitInNonAsyncFunction.ts(40,1): error TS1378: Top-level '
9797

9898
for await (const _ of []);
9999
~~~~~
100-
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
100+
!!! error TS1432: Top-level 'for await' loops are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
101101
await null;
102102
~~~~~
103-
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
103+
!!! error TS1378: Top-level 'await' expressions are only allowed when the 'module' option is set to 'es2022', 'esnext', 'system', 'node16', or 'nodenext', and the 'target' option is set to 'es2017' or higher.
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
//// [a.ts]
2+
declare var dec: any, __decorate: any;
3+
@dec export class A {
4+
}
5+
6+
const o = { a: 1 };
7+
const y = { ...o };
8+
9+
10+
//// [a.js]
11+
"use strict";
12+
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
13+
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
14+
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
15+
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
16+
return c > 3 && r && Object.defineProperty(target, key, r), r;
17+
};
18+
Object.defineProperty(exports, "__esModule", { value: true });
19+
exports.A = void 0;
20+
let A = class A {
21+
};
22+
A = __decorate([
23+
dec
24+
], A);
25+
exports.A = A;
26+
const o = { a: 1 };
27+
const y = Object.assign({}, o);

tests/baselines/reference/importAssertion1(module=commonjs).errors.txt

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ tests/cases/conformance/importAssertion/1.ts(2,28): error TS2821: Import asserti
33
tests/cases/conformance/importAssertion/1.ts(3,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
44
tests/cases/conformance/importAssertion/2.ts(1,28): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
55
tests/cases/conformance/importAssertion/2.ts(2,38): error TS2821: Import assertions are only supported when the '--module' option is set to 'esnext' or 'nodenext'.
6-
tests/cases/conformance/importAssertion/3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
7-
tests/cases/conformance/importAssertion/3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
8-
tests/cases/conformance/importAssertion/3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
9-
tests/cases/conformance/importAssertion/3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
10-
tests/cases/conformance/importAssertion/3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
6+
tests/cases/conformance/importAssertion/3.ts(2,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
7+
tests/cases/conformance/importAssertion/3.ts(3,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
8+
tests/cases/conformance/importAssertion/3.ts(4,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
9+
tests/cases/conformance/importAssertion/3.ts(5,26): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
10+
tests/cases/conformance/importAssertion/3.ts(7,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
1111
tests/cases/conformance/importAssertion/3.ts(8,11): message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments
12-
tests/cases/conformance/importAssertion/3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
13-
tests/cases/conformance/importAssertion/3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
12+
tests/cases/conformance/importAssertion/3.ts(9,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
13+
tests/cases/conformance/importAssertion/3.ts(10,25): error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
1414
tests/cases/conformance/importAssertion/3.ts(10,52): error TS1009: Trailing comma not allowed.
1515

1616

@@ -49,29 +49,29 @@ tests/cases/conformance/importAssertion/3.ts(10,52): error TS1009: Trailing comm
4949
const a = import('./0')
5050
const b = import('./0', { assert: { type: "json" } })
5151
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
52-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
52+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
5353
const c = import('./0', { assert: { type: "json", ttype: "typo" } })
5454
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
55-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
55+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
5656
const d = import('./0', { assert: {} })
5757
~~~~~~~~~~~~~~
58-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
58+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
5959
const dd = import('./0', {})
6060
~~
61-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
61+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
6262
declare function foo(): any;
6363
const e = import('./0', foo())
6464
~~~~~
65-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
65+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
6666
const f = import()
6767
~~~~~~~~
6868
!!! message TS1450: Dynamic imports can only accept a module specifier and an optional assertion as arguments
6969
const g = import('./0', {}, {})
7070
~~
71-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
71+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
7272
const h = import('./0', { assert: { type: "json" }},)
7373
~~~~~~~~~~~~~~~~~~~~~~~~~~~
74-
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext' or 'nodenext'.
74+
!!! error TS1324: Dynamic imports only support a second argument when the '--module' option is set to 'esnext', 'node16', or 'nodenext'.
7575
~
7676
!!! error TS1009: Trailing comma not allowed.
7777

0 commit comments

Comments
 (0)