typescript 5.0.0-dev.20230209 → 5.0.0-dev.20230210
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/lib.decorators.d.ts +112 -95
- package/lib/tsc.js +569 -127
- package/lib/tsserver.js +571 -132
- package/lib/tsserverlibrary.js +571 -132
- package/lib/typescript.js +571 -132
- package/lib/typingsInstaller.js +21 -5
- package/package.json +1 -1
package/lib/tsserverlibrary.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.0";
|
|
38
|
-
version = `${versionMajorMinor}.0-dev.
|
|
38
|
+
version = `${versionMajorMinor}.0-dev.20230210`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -7466,6 +7466,7 @@ ${lanes.join("\n")}
|
|
|
7466
7466
|
To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module: diag(1483, 3 /* Message */, "To_convert_this_file_to_an_ECMAScript_module_create_a_local_package_json_file_with_type_Colon_module_1483", 'To convert this file to an ECMAScript module, create a local package.json file with `{ "type": "module" }`.'),
|
|
7467
7467
|
_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
7468
7468
|
_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
7469
|
+
Decorator_used_before_export_here: diag(1486, 1 /* Error */, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."),
|
|
7469
7470
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
7470
7471
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
7471
7472
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -8822,7 +8823,7 @@ ${lanes.join("\n")}
|
|
|
8822
8823
|
You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder: diag(8035, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_a_node_modules_folder_8035", "You cannot rename elements that are defined in a 'node_modules' folder."),
|
|
8823
8824
|
You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder: diag(8036, 1 /* Error */, "You_cannot_rename_elements_that_are_defined_in_another_node_modules_folder_8036", "You cannot rename elements that are defined in another 'node_modules' folder."),
|
|
8824
8825
|
Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files: diag(8037, 1 /* Error */, "Type_satisfaction_expressions_can_only_be_used_in_TypeScript_files_8037", "Type satisfaction expressions can only be used in TypeScript files."),
|
|
8825
|
-
|
|
8826
|
+
Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export: diag(8038, 1 /* Error */, "Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export_8038", "Decorators may not appear after 'export' or 'export default' if they also appear before 'export'."),
|
|
8826
8827
|
Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9005, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_An_explicit_type_annotation_may_unblock_9005", "Declaration emit for this file requires using private name '{0}'. An explicit type annotation may unblock declaration emit."),
|
|
8827
8828
|
Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotation_may_unblock_declaration_emit: diag(9006, 1 /* Error */, "Declaration_emit_for_this_file_requires_using_private_name_0_from_module_1_An_explicit_type_annotati_9006", "Declaration emit for this file requires using private name '{0}' from module '{1}'. An explicit type annotation may unblock declaration emit."),
|
|
8828
8829
|
JSX_attributes_must_only_be_assigned_a_non_empty_expression: diag(17e3, 1 /* Error */, "JSX_attributes_must_only_be_assigned_a_non_empty_expression_17000", "JSX attributes must only be assigned a non-empty 'expression'."),
|
|
@@ -13168,101 +13169,400 @@ ${lanes.join("\n")}
|
|
|
13168
13169
|
return emitNode && emitNode.internalFlags || 0;
|
|
13169
13170
|
}
|
|
13170
13171
|
function getScriptTargetFeatures() {
|
|
13171
|
-
return {
|
|
13172
|
-
|
|
13173
|
-
|
|
13174
|
-
|
|
13175
|
-
|
|
13176
|
-
|
|
13177
|
-
|
|
13178
|
-
|
|
13179
|
-
|
|
13180
|
-
|
|
13181
|
-
|
|
13182
|
-
|
|
13183
|
-
|
|
13184
|
-
|
|
13185
|
-
|
|
13186
|
-
|
|
13187
|
-
|
|
13188
|
-
|
|
13189
|
-
|
|
13190
|
-
|
|
13191
|
-
|
|
13192
|
-
|
|
13193
|
-
|
|
13194
|
-
|
|
13195
|
-
|
|
13196
|
-
|
|
13197
|
-
|
|
13198
|
-
|
|
13199
|
-
|
|
13200
|
-
|
|
13201
|
-
|
|
13202
|
-
|
|
13203
|
-
|
|
13204
|
-
|
|
13205
|
-
|
|
13206
|
-
|
|
13207
|
-
|
|
13208
|
-
|
|
13209
|
-
|
|
13210
|
-
|
|
13211
|
-
|
|
13212
|
-
|
|
13213
|
-
|
|
13214
|
-
|
|
13215
|
-
|
|
13216
|
-
|
|
13217
|
-
|
|
13218
|
-
|
|
13219
|
-
|
|
13220
|
-
|
|
13221
|
-
|
|
13222
|
-
|
|
13223
|
-
|
|
13224
|
-
|
|
13225
|
-
|
|
13226
|
-
|
|
13227
|
-
|
|
13228
|
-
|
|
13229
|
-
|
|
13230
|
-
|
|
13231
|
-
|
|
13232
|
-
|
|
13233
|
-
|
|
13234
|
-
|
|
13235
|
-
|
|
13236
|
-
|
|
13237
|
-
|
|
13238
|
-
|
|
13239
|
-
|
|
13240
|
-
|
|
13241
|
-
|
|
13242
|
-
|
|
13243
|
-
|
|
13244
|
-
|
|
13245
|
-
|
|
13246
|
-
|
|
13247
|
-
|
|
13248
|
-
|
|
13249
|
-
|
|
13250
|
-
|
|
13251
|
-
|
|
13252
|
-
|
|
13253
|
-
|
|
13254
|
-
|
|
13255
|
-
|
|
13256
|
-
|
|
13257
|
-
|
|
13258
|
-
|
|
13259
|
-
|
|
13260
|
-
|
|
13261
|
-
|
|
13262
|
-
|
|
13263
|
-
|
|
13264
|
-
|
|
13265
|
-
|
|
13172
|
+
return new Map(Object.entries({
|
|
13173
|
+
Array: new Map(Object.entries({
|
|
13174
|
+
es2015: [
|
|
13175
|
+
"find",
|
|
13176
|
+
"findIndex",
|
|
13177
|
+
"fill",
|
|
13178
|
+
"copyWithin",
|
|
13179
|
+
"entries",
|
|
13180
|
+
"keys",
|
|
13181
|
+
"values"
|
|
13182
|
+
],
|
|
13183
|
+
es2016: [
|
|
13184
|
+
"includes"
|
|
13185
|
+
],
|
|
13186
|
+
es2019: [
|
|
13187
|
+
"flat",
|
|
13188
|
+
"flatMap"
|
|
13189
|
+
],
|
|
13190
|
+
es2022: [
|
|
13191
|
+
"at"
|
|
13192
|
+
],
|
|
13193
|
+
es2023: [
|
|
13194
|
+
"findLastIndex",
|
|
13195
|
+
"findLast"
|
|
13196
|
+
]
|
|
13197
|
+
})),
|
|
13198
|
+
Iterator: new Map(Object.entries({
|
|
13199
|
+
es2015: emptyArray
|
|
13200
|
+
})),
|
|
13201
|
+
AsyncIterator: new Map(Object.entries({
|
|
13202
|
+
es2015: emptyArray
|
|
13203
|
+
})),
|
|
13204
|
+
Atomics: new Map(Object.entries({
|
|
13205
|
+
es2017: emptyArray
|
|
13206
|
+
})),
|
|
13207
|
+
SharedArrayBuffer: new Map(Object.entries({
|
|
13208
|
+
es2017: emptyArray
|
|
13209
|
+
})),
|
|
13210
|
+
AsyncIterable: new Map(Object.entries({
|
|
13211
|
+
es2018: emptyArray
|
|
13212
|
+
})),
|
|
13213
|
+
AsyncIterableIterator: new Map(Object.entries({
|
|
13214
|
+
es2018: emptyArray
|
|
13215
|
+
})),
|
|
13216
|
+
AsyncGenerator: new Map(Object.entries({
|
|
13217
|
+
es2018: emptyArray
|
|
13218
|
+
})),
|
|
13219
|
+
AsyncGeneratorFunction: new Map(Object.entries({
|
|
13220
|
+
es2018: emptyArray
|
|
13221
|
+
})),
|
|
13222
|
+
RegExp: new Map(Object.entries({
|
|
13223
|
+
es2015: [
|
|
13224
|
+
"flags",
|
|
13225
|
+
"sticky",
|
|
13226
|
+
"unicode"
|
|
13227
|
+
],
|
|
13228
|
+
es2018: [
|
|
13229
|
+
"dotAll"
|
|
13230
|
+
]
|
|
13231
|
+
})),
|
|
13232
|
+
Reflect: new Map(Object.entries({
|
|
13233
|
+
es2015: [
|
|
13234
|
+
"apply",
|
|
13235
|
+
"construct",
|
|
13236
|
+
"defineProperty",
|
|
13237
|
+
"deleteProperty",
|
|
13238
|
+
"get",
|
|
13239
|
+
" getOwnPropertyDescriptor",
|
|
13240
|
+
"getPrototypeOf",
|
|
13241
|
+
"has",
|
|
13242
|
+
"isExtensible",
|
|
13243
|
+
"ownKeys",
|
|
13244
|
+
"preventExtensions",
|
|
13245
|
+
"set",
|
|
13246
|
+
"setPrototypeOf"
|
|
13247
|
+
]
|
|
13248
|
+
})),
|
|
13249
|
+
ArrayConstructor: new Map(Object.entries({
|
|
13250
|
+
es2015: [
|
|
13251
|
+
"from",
|
|
13252
|
+
"of"
|
|
13253
|
+
]
|
|
13254
|
+
})),
|
|
13255
|
+
ObjectConstructor: new Map(Object.entries({
|
|
13256
|
+
es2015: [
|
|
13257
|
+
"assign",
|
|
13258
|
+
"getOwnPropertySymbols",
|
|
13259
|
+
"keys",
|
|
13260
|
+
"is",
|
|
13261
|
+
"setPrototypeOf"
|
|
13262
|
+
],
|
|
13263
|
+
es2017: [
|
|
13264
|
+
"values",
|
|
13265
|
+
"entries",
|
|
13266
|
+
"getOwnPropertyDescriptors"
|
|
13267
|
+
],
|
|
13268
|
+
es2019: [
|
|
13269
|
+
"fromEntries"
|
|
13270
|
+
],
|
|
13271
|
+
es2022: [
|
|
13272
|
+
"hasOwn"
|
|
13273
|
+
]
|
|
13274
|
+
})),
|
|
13275
|
+
NumberConstructor: new Map(Object.entries({
|
|
13276
|
+
es2015: [
|
|
13277
|
+
"isFinite",
|
|
13278
|
+
"isInteger",
|
|
13279
|
+
"isNaN",
|
|
13280
|
+
"isSafeInteger",
|
|
13281
|
+
"parseFloat",
|
|
13282
|
+
"parseInt"
|
|
13283
|
+
]
|
|
13284
|
+
})),
|
|
13285
|
+
Math: new Map(Object.entries({
|
|
13286
|
+
es2015: [
|
|
13287
|
+
"clz32",
|
|
13288
|
+
"imul",
|
|
13289
|
+
"sign",
|
|
13290
|
+
"log10",
|
|
13291
|
+
"log2",
|
|
13292
|
+
"log1p",
|
|
13293
|
+
"expm1",
|
|
13294
|
+
"cosh",
|
|
13295
|
+
"sinh",
|
|
13296
|
+
"tanh",
|
|
13297
|
+
"acosh",
|
|
13298
|
+
"asinh",
|
|
13299
|
+
"atanh",
|
|
13300
|
+
"hypot",
|
|
13301
|
+
"trunc",
|
|
13302
|
+
"fround",
|
|
13303
|
+
"cbrt"
|
|
13304
|
+
]
|
|
13305
|
+
})),
|
|
13306
|
+
Map: new Map(Object.entries({
|
|
13307
|
+
es2015: [
|
|
13308
|
+
"entries",
|
|
13309
|
+
"keys",
|
|
13310
|
+
"values"
|
|
13311
|
+
]
|
|
13312
|
+
})),
|
|
13313
|
+
Set: new Map(Object.entries({
|
|
13314
|
+
es2015: [
|
|
13315
|
+
"entries",
|
|
13316
|
+
"keys",
|
|
13317
|
+
"values"
|
|
13318
|
+
]
|
|
13319
|
+
})),
|
|
13320
|
+
PromiseConstructor: new Map(Object.entries({
|
|
13321
|
+
es2015: [
|
|
13322
|
+
"all",
|
|
13323
|
+
"race",
|
|
13324
|
+
"reject",
|
|
13325
|
+
"resolve"
|
|
13326
|
+
],
|
|
13327
|
+
es2020: [
|
|
13328
|
+
"allSettled"
|
|
13329
|
+
],
|
|
13330
|
+
es2021: [
|
|
13331
|
+
"any"
|
|
13332
|
+
]
|
|
13333
|
+
})),
|
|
13334
|
+
Symbol: new Map(Object.entries({
|
|
13335
|
+
es2015: [
|
|
13336
|
+
"for",
|
|
13337
|
+
"keyFor"
|
|
13338
|
+
],
|
|
13339
|
+
es2019: [
|
|
13340
|
+
"description"
|
|
13341
|
+
]
|
|
13342
|
+
})),
|
|
13343
|
+
WeakMap: new Map(Object.entries({
|
|
13344
|
+
es2015: [
|
|
13345
|
+
"entries",
|
|
13346
|
+
"keys",
|
|
13347
|
+
"values"
|
|
13348
|
+
]
|
|
13349
|
+
})),
|
|
13350
|
+
WeakSet: new Map(Object.entries({
|
|
13351
|
+
es2015: [
|
|
13352
|
+
"entries",
|
|
13353
|
+
"keys",
|
|
13354
|
+
"values"
|
|
13355
|
+
]
|
|
13356
|
+
})),
|
|
13357
|
+
String: new Map(Object.entries({
|
|
13358
|
+
es2015: [
|
|
13359
|
+
"codePointAt",
|
|
13360
|
+
"includes",
|
|
13361
|
+
"endsWith",
|
|
13362
|
+
"normalize",
|
|
13363
|
+
"repeat",
|
|
13364
|
+
"startsWith",
|
|
13365
|
+
"anchor",
|
|
13366
|
+
"big",
|
|
13367
|
+
"blink",
|
|
13368
|
+
"bold",
|
|
13369
|
+
"fixed",
|
|
13370
|
+
"fontcolor",
|
|
13371
|
+
"fontsize",
|
|
13372
|
+
"italics",
|
|
13373
|
+
"link",
|
|
13374
|
+
"small",
|
|
13375
|
+
"strike",
|
|
13376
|
+
"sub",
|
|
13377
|
+
"sup"
|
|
13378
|
+
],
|
|
13379
|
+
es2017: [
|
|
13380
|
+
"padStart",
|
|
13381
|
+
"padEnd"
|
|
13382
|
+
],
|
|
13383
|
+
es2019: [
|
|
13384
|
+
"trimStart",
|
|
13385
|
+
"trimEnd",
|
|
13386
|
+
"trimLeft",
|
|
13387
|
+
"trimRight"
|
|
13388
|
+
],
|
|
13389
|
+
es2020: [
|
|
13390
|
+
"matchAll"
|
|
13391
|
+
],
|
|
13392
|
+
es2021: [
|
|
13393
|
+
"replaceAll"
|
|
13394
|
+
],
|
|
13395
|
+
es2022: [
|
|
13396
|
+
"at"
|
|
13397
|
+
]
|
|
13398
|
+
})),
|
|
13399
|
+
StringConstructor: new Map(Object.entries({
|
|
13400
|
+
es2015: [
|
|
13401
|
+
"fromCodePoint",
|
|
13402
|
+
"raw"
|
|
13403
|
+
]
|
|
13404
|
+
})),
|
|
13405
|
+
DateTimeFormat: new Map(Object.entries({
|
|
13406
|
+
es2017: [
|
|
13407
|
+
"formatToParts"
|
|
13408
|
+
]
|
|
13409
|
+
})),
|
|
13410
|
+
Promise: new Map(Object.entries({
|
|
13411
|
+
es2015: emptyArray,
|
|
13412
|
+
es2018: [
|
|
13413
|
+
"finally"
|
|
13414
|
+
]
|
|
13415
|
+
})),
|
|
13416
|
+
RegExpMatchArray: new Map(Object.entries({
|
|
13417
|
+
es2018: [
|
|
13418
|
+
"groups"
|
|
13419
|
+
]
|
|
13420
|
+
})),
|
|
13421
|
+
RegExpExecArray: new Map(Object.entries({
|
|
13422
|
+
es2018: [
|
|
13423
|
+
"groups"
|
|
13424
|
+
]
|
|
13425
|
+
})),
|
|
13426
|
+
Intl: new Map(Object.entries({
|
|
13427
|
+
es2018: [
|
|
13428
|
+
"PluralRules"
|
|
13429
|
+
]
|
|
13430
|
+
})),
|
|
13431
|
+
NumberFormat: new Map(Object.entries({
|
|
13432
|
+
es2018: [
|
|
13433
|
+
"formatToParts"
|
|
13434
|
+
]
|
|
13435
|
+
})),
|
|
13436
|
+
SymbolConstructor: new Map(Object.entries({
|
|
13437
|
+
es2020: [
|
|
13438
|
+
"matchAll"
|
|
13439
|
+
]
|
|
13440
|
+
})),
|
|
13441
|
+
DataView: new Map(Object.entries({
|
|
13442
|
+
es2020: [
|
|
13443
|
+
"setBigInt64",
|
|
13444
|
+
"setBigUint64",
|
|
13445
|
+
"getBigInt64",
|
|
13446
|
+
"getBigUint64"
|
|
13447
|
+
]
|
|
13448
|
+
})),
|
|
13449
|
+
BigInt: new Map(Object.entries({
|
|
13450
|
+
es2020: emptyArray
|
|
13451
|
+
})),
|
|
13452
|
+
RelativeTimeFormat: new Map(Object.entries({
|
|
13453
|
+
es2020: [
|
|
13454
|
+
"format",
|
|
13455
|
+
"formatToParts",
|
|
13456
|
+
"resolvedOptions"
|
|
13457
|
+
]
|
|
13458
|
+
})),
|
|
13459
|
+
Int8Array: new Map(Object.entries({
|
|
13460
|
+
es2022: [
|
|
13461
|
+
"at"
|
|
13462
|
+
],
|
|
13463
|
+
es2023: [
|
|
13464
|
+
"findLastIndex",
|
|
13465
|
+
"findLast"
|
|
13466
|
+
]
|
|
13467
|
+
})),
|
|
13468
|
+
Uint8Array: new Map(Object.entries({
|
|
13469
|
+
es2022: [
|
|
13470
|
+
"at"
|
|
13471
|
+
],
|
|
13472
|
+
es2023: [
|
|
13473
|
+
"findLastIndex",
|
|
13474
|
+
"findLast"
|
|
13475
|
+
]
|
|
13476
|
+
})),
|
|
13477
|
+
Uint8ClampedArray: new Map(Object.entries({
|
|
13478
|
+
es2022: [
|
|
13479
|
+
"at"
|
|
13480
|
+
],
|
|
13481
|
+
es2023: [
|
|
13482
|
+
"findLastIndex",
|
|
13483
|
+
"findLast"
|
|
13484
|
+
]
|
|
13485
|
+
})),
|
|
13486
|
+
Int16Array: new Map(Object.entries({
|
|
13487
|
+
es2022: [
|
|
13488
|
+
"at"
|
|
13489
|
+
],
|
|
13490
|
+
es2023: [
|
|
13491
|
+
"findLastIndex",
|
|
13492
|
+
"findLast"
|
|
13493
|
+
]
|
|
13494
|
+
})),
|
|
13495
|
+
Uint16Array: new Map(Object.entries({
|
|
13496
|
+
es2022: [
|
|
13497
|
+
"at"
|
|
13498
|
+
],
|
|
13499
|
+
es2023: [
|
|
13500
|
+
"findLastIndex",
|
|
13501
|
+
"findLast"
|
|
13502
|
+
]
|
|
13503
|
+
})),
|
|
13504
|
+
Int32Array: new Map(Object.entries({
|
|
13505
|
+
es2022: [
|
|
13506
|
+
"at"
|
|
13507
|
+
],
|
|
13508
|
+
es2023: [
|
|
13509
|
+
"findLastIndex",
|
|
13510
|
+
"findLast"
|
|
13511
|
+
]
|
|
13512
|
+
})),
|
|
13513
|
+
Uint32Array: new Map(Object.entries({
|
|
13514
|
+
es2022: [
|
|
13515
|
+
"at"
|
|
13516
|
+
],
|
|
13517
|
+
es2023: [
|
|
13518
|
+
"findLastIndex",
|
|
13519
|
+
"findLast"
|
|
13520
|
+
]
|
|
13521
|
+
})),
|
|
13522
|
+
Float32Array: new Map(Object.entries({
|
|
13523
|
+
es2022: [
|
|
13524
|
+
"at"
|
|
13525
|
+
],
|
|
13526
|
+
es2023: [
|
|
13527
|
+
"findLastIndex",
|
|
13528
|
+
"findLast"
|
|
13529
|
+
]
|
|
13530
|
+
})),
|
|
13531
|
+
Float64Array: new Map(Object.entries({
|
|
13532
|
+
es2022: [
|
|
13533
|
+
"at"
|
|
13534
|
+
],
|
|
13535
|
+
es2023: [
|
|
13536
|
+
"findLastIndex",
|
|
13537
|
+
"findLast"
|
|
13538
|
+
]
|
|
13539
|
+
})),
|
|
13540
|
+
BigInt64Array: new Map(Object.entries({
|
|
13541
|
+
es2020: emptyArray,
|
|
13542
|
+
es2022: [
|
|
13543
|
+
"at"
|
|
13544
|
+
],
|
|
13545
|
+
es2023: [
|
|
13546
|
+
"findLastIndex",
|
|
13547
|
+
"findLast"
|
|
13548
|
+
]
|
|
13549
|
+
})),
|
|
13550
|
+
BigUint64Array: new Map(Object.entries({
|
|
13551
|
+
es2020: emptyArray,
|
|
13552
|
+
es2022: [
|
|
13553
|
+
"at"
|
|
13554
|
+
],
|
|
13555
|
+
es2023: [
|
|
13556
|
+
"findLastIndex",
|
|
13557
|
+
"findLast"
|
|
13558
|
+
]
|
|
13559
|
+
})),
|
|
13560
|
+
Error: new Map(Object.entries({
|
|
13561
|
+
es2022: [
|
|
13562
|
+
"cause"
|
|
13563
|
+
]
|
|
13564
|
+
}))
|
|
13565
|
+
}));
|
|
13266
13566
|
}
|
|
13267
13567
|
function getLiteralText(node, sourceFile, flags) {
|
|
13268
13568
|
var _a2;
|
|
@@ -24552,14 +24852,114 @@ ${lanes.join("\n")}
|
|
|
24552
24852
|
factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name)
|
|
24553
24853
|
]);
|
|
24554
24854
|
}
|
|
24855
|
+
function createESDecorateClassElementAccessGetMethod(elementName) {
|
|
24856
|
+
const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name);
|
|
24857
|
+
return factory2.createPropertyAssignment(
|
|
24858
|
+
"get",
|
|
24859
|
+
factory2.createArrowFunction(
|
|
24860
|
+
/*modifiers*/
|
|
24861
|
+
void 0,
|
|
24862
|
+
/*typeParameters*/
|
|
24863
|
+
void 0,
|
|
24864
|
+
[factory2.createParameterDeclaration(
|
|
24865
|
+
/*modifiers*/
|
|
24866
|
+
void 0,
|
|
24867
|
+
/*dotDotDotToken*/
|
|
24868
|
+
void 0,
|
|
24869
|
+
factory2.createIdentifier("obj")
|
|
24870
|
+
)],
|
|
24871
|
+
/*type*/
|
|
24872
|
+
void 0,
|
|
24873
|
+
/*equalsGreaterThanToken*/
|
|
24874
|
+
void 0,
|
|
24875
|
+
accessor
|
|
24876
|
+
)
|
|
24877
|
+
);
|
|
24878
|
+
}
|
|
24879
|
+
function createESDecorateClassElementAccessSetMethod(elementName) {
|
|
24880
|
+
const accessor = elementName.computed ? factory2.createElementAccessExpression(factory2.createIdentifier("obj"), elementName.name) : factory2.createPropertyAccessExpression(factory2.createIdentifier("obj"), elementName.name);
|
|
24881
|
+
return factory2.createPropertyAssignment(
|
|
24882
|
+
"set",
|
|
24883
|
+
factory2.createArrowFunction(
|
|
24884
|
+
/*modifiers*/
|
|
24885
|
+
void 0,
|
|
24886
|
+
/*typeParameters*/
|
|
24887
|
+
void 0,
|
|
24888
|
+
[
|
|
24889
|
+
factory2.createParameterDeclaration(
|
|
24890
|
+
/*modifiers*/
|
|
24891
|
+
void 0,
|
|
24892
|
+
/*dotDotDotToken*/
|
|
24893
|
+
void 0,
|
|
24894
|
+
factory2.createIdentifier("obj")
|
|
24895
|
+
),
|
|
24896
|
+
factory2.createParameterDeclaration(
|
|
24897
|
+
/*modifiers*/
|
|
24898
|
+
void 0,
|
|
24899
|
+
/*dotDotDotToken*/
|
|
24900
|
+
void 0,
|
|
24901
|
+
factory2.createIdentifier("value")
|
|
24902
|
+
)
|
|
24903
|
+
],
|
|
24904
|
+
/*type*/
|
|
24905
|
+
void 0,
|
|
24906
|
+
/*equalsGreaterThanToken*/
|
|
24907
|
+
void 0,
|
|
24908
|
+
factory2.createBlock([
|
|
24909
|
+
factory2.createExpressionStatement(
|
|
24910
|
+
factory2.createAssignment(
|
|
24911
|
+
accessor,
|
|
24912
|
+
factory2.createIdentifier("value")
|
|
24913
|
+
)
|
|
24914
|
+
)
|
|
24915
|
+
])
|
|
24916
|
+
)
|
|
24917
|
+
);
|
|
24918
|
+
}
|
|
24919
|
+
function createESDecorateClassElementAccessHasMethod(elementName) {
|
|
24920
|
+
const propertyName = elementName.computed ? elementName.name : isIdentifier(elementName.name) ? factory2.createStringLiteralFromNode(elementName.name) : elementName.name;
|
|
24921
|
+
return factory2.createPropertyAssignment(
|
|
24922
|
+
"has",
|
|
24923
|
+
factory2.createArrowFunction(
|
|
24924
|
+
/*modifiers*/
|
|
24925
|
+
void 0,
|
|
24926
|
+
/*typeParameters*/
|
|
24927
|
+
void 0,
|
|
24928
|
+
[factory2.createParameterDeclaration(
|
|
24929
|
+
/*modifiers*/
|
|
24930
|
+
void 0,
|
|
24931
|
+
/*dotDotDotToken*/
|
|
24932
|
+
void 0,
|
|
24933
|
+
factory2.createIdentifier("obj")
|
|
24934
|
+
)],
|
|
24935
|
+
/*type*/
|
|
24936
|
+
void 0,
|
|
24937
|
+
/*equalsGreaterThanToken*/
|
|
24938
|
+
void 0,
|
|
24939
|
+
factory2.createBinaryExpression(
|
|
24940
|
+
propertyName,
|
|
24941
|
+
101 /* InKeyword */,
|
|
24942
|
+
factory2.createIdentifier("obj")
|
|
24943
|
+
)
|
|
24944
|
+
)
|
|
24945
|
+
);
|
|
24946
|
+
}
|
|
24947
|
+
function createESDecorateClassElementAccessObject(name, access) {
|
|
24948
|
+
const properties = [];
|
|
24949
|
+
properties.push(createESDecorateClassElementAccessHasMethod(name));
|
|
24950
|
+
if (access.get)
|
|
24951
|
+
properties.push(createESDecorateClassElementAccessGetMethod(name));
|
|
24952
|
+
if (access.set)
|
|
24953
|
+
properties.push(createESDecorateClassElementAccessSetMethod(name));
|
|
24954
|
+
return factory2.createObjectLiteralExpression(properties);
|
|
24955
|
+
}
|
|
24555
24956
|
function createESDecorateClassElementContextObject(contextIn) {
|
|
24556
24957
|
return factory2.createObjectLiteralExpression([
|
|
24557
24958
|
factory2.createPropertyAssignment(factory2.createIdentifier("kind"), factory2.createStringLiteral(contextIn.kind)),
|
|
24558
24959
|
factory2.createPropertyAssignment(factory2.createIdentifier("name"), contextIn.name.computed ? contextIn.name.name : factory2.createStringLiteralFromNode(contextIn.name.name)),
|
|
24559
24960
|
factory2.createPropertyAssignment(factory2.createIdentifier("static"), contextIn.static ? factory2.createTrue() : factory2.createFalse()),
|
|
24560
|
-
factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse())
|
|
24561
|
-
|
|
24562
|
-
// factory.createPropertyAssignment(factory.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access))
|
|
24961
|
+
factory2.createPropertyAssignment(factory2.createIdentifier("private"), contextIn.private ? factory2.createTrue() : factory2.createFalse()),
|
|
24962
|
+
factory2.createPropertyAssignment(factory2.createIdentifier("access"), createESDecorateClassElementAccessObject(contextIn.name, contextIn.access))
|
|
24563
24963
|
]);
|
|
24564
24964
|
}
|
|
24565
24965
|
function createESDecorateContextObject(contextIn) {
|
|
@@ -31254,6 +31654,12 @@ ${lanes.join("\n")}
|
|
|
31254
31654
|
case 114 /* VoidKeyword */:
|
|
31255
31655
|
return parseVoidExpression();
|
|
31256
31656
|
case 29 /* LessThanToken */:
|
|
31657
|
+
if (languageVariant === 1 /* JSX */) {
|
|
31658
|
+
return parseJsxElementOrSelfClosingElementOrFragment(
|
|
31659
|
+
/*inExpressionContext*/
|
|
31660
|
+
true
|
|
31661
|
+
);
|
|
31662
|
+
}
|
|
31257
31663
|
return parseTypeAssertion();
|
|
31258
31664
|
case 133 /* AwaitKeyword */:
|
|
31259
31665
|
if (isAwaitExpression2()) {
|
|
@@ -31625,6 +32031,7 @@ ${lanes.join("\n")}
|
|
|
31625
32031
|
return finishNode(factory2.createJsxJsxClosingFragment(), pos);
|
|
31626
32032
|
}
|
|
31627
32033
|
function parseTypeAssertion() {
|
|
32034
|
+
Debug.assert(scriptKind === 3 /* TS */, "Type assertions should never be parsed outside of TS; they should either be comparisons or JSX.");
|
|
31628
32035
|
const pos = getNodePos();
|
|
31629
32036
|
parseExpected(29 /* LessThanToken */);
|
|
31630
32037
|
const type = parseType();
|
|
@@ -32975,17 +33382,25 @@ ${lanes.join("\n")}
|
|
|
32975
33382
|
function parseModifiers(allowDecorators, permitConstAsModifier, stopOnStartOfClassStaticBlock) {
|
|
32976
33383
|
const pos = getNodePos();
|
|
32977
33384
|
let list;
|
|
32978
|
-
let modifier, hasSeenStaticModifier = false;
|
|
33385
|
+
let decorator, modifier, hasSeenStaticModifier = false, hasLeadingModifier = false, hasTrailingDecorator = false;
|
|
33386
|
+
if (allowDecorators && token() === 59 /* AtToken */) {
|
|
33387
|
+
while (decorator = tryParseDecorator()) {
|
|
33388
|
+
list = append(list, decorator);
|
|
33389
|
+
}
|
|
33390
|
+
}
|
|
32979
33391
|
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
32980
33392
|
if (modifier.kind === 124 /* StaticKeyword */)
|
|
32981
33393
|
hasSeenStaticModifier = true;
|
|
32982
33394
|
list = append(list, modifier);
|
|
33395
|
+
hasLeadingModifier = true;
|
|
32983
33396
|
}
|
|
32984
|
-
if (allowDecorators && token() === 59 /* AtToken */) {
|
|
32985
|
-
let decorator;
|
|
33397
|
+
if (hasLeadingModifier && allowDecorators && token() === 59 /* AtToken */) {
|
|
32986
33398
|
while (decorator = tryParseDecorator()) {
|
|
32987
33399
|
list = append(list, decorator);
|
|
33400
|
+
hasTrailingDecorator = true;
|
|
32988
33401
|
}
|
|
33402
|
+
}
|
|
33403
|
+
if (hasTrailingDecorator) {
|
|
32989
33404
|
while (modifier = tryParseModifier(hasSeenStaticModifier, permitConstAsModifier, stopOnStartOfClassStaticBlock)) {
|
|
32990
33405
|
if (modifier.kind === 124 /* StaticKeyword */)
|
|
32991
33406
|
hasSeenStaticModifier = true;
|
|
@@ -57702,7 +58117,7 @@ ${lanes.join("\n")}
|
|
|
57702
58117
|
}
|
|
57703
58118
|
}
|
|
57704
58119
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
57705
|
-
const templates = filter(types, isPatternLiteralType);
|
|
58120
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
57706
58121
|
if (templates.length) {
|
|
57707
58122
|
let i = types.length;
|
|
57708
58123
|
while (i > 0) {
|
|
@@ -66225,10 +66640,12 @@ ${lanes.join("\n")}
|
|
|
66225
66640
|
}
|
|
66226
66641
|
function isConstantReference(node) {
|
|
66227
66642
|
switch (node.kind) {
|
|
66228
|
-
case 79 /* Identifier */:
|
|
66229
|
-
|
|
66230
|
-
|
|
66231
|
-
|
|
66643
|
+
case 79 /* Identifier */:
|
|
66644
|
+
if (!isThisInTypeQuery(node)) {
|
|
66645
|
+
const symbol = getResolvedSymbol(node);
|
|
66646
|
+
return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
|
|
66647
|
+
}
|
|
66648
|
+
break;
|
|
66232
66649
|
case 208 /* PropertyAccessExpression */:
|
|
66233
66650
|
case 209 /* ElementAccessExpression */:
|
|
66234
66651
|
return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
|
|
@@ -70472,26 +70889,22 @@ ${lanes.join("\n")}
|
|
|
70472
70889
|
function getSuggestedLibForNonExistentName(name) {
|
|
70473
70890
|
const missingName = diagnosticName(name);
|
|
70474
70891
|
const allFeatures = getScriptTargetFeatures();
|
|
70475
|
-
const
|
|
70476
|
-
|
|
70477
|
-
const containingTypes = getOwnKeys(allFeatures[libTarget]);
|
|
70478
|
-
if (containingTypes !== void 0 && contains(containingTypes, missingName)) {
|
|
70479
|
-
return libTarget;
|
|
70480
|
-
}
|
|
70481
|
-
}
|
|
70892
|
+
const typeFeatures = allFeatures.get(missingName);
|
|
70893
|
+
return typeFeatures && firstIterator(typeFeatures.keys());
|
|
70482
70894
|
}
|
|
70483
70895
|
function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {
|
|
70484
70896
|
const container = getApparentType(containingType).symbol;
|
|
70485
70897
|
if (!container) {
|
|
70486
70898
|
return void 0;
|
|
70487
70899
|
}
|
|
70900
|
+
const containingTypeName = symbolName(container);
|
|
70488
70901
|
const allFeatures = getScriptTargetFeatures();
|
|
70489
|
-
const
|
|
70490
|
-
|
|
70491
|
-
const
|
|
70492
|
-
|
|
70493
|
-
|
|
70494
|
-
|
|
70902
|
+
const typeFeatures = allFeatures.get(containingTypeName);
|
|
70903
|
+
if (typeFeatures) {
|
|
70904
|
+
for (const [libTarget, featuresOfType] of typeFeatures) {
|
|
70905
|
+
if (contains(featuresOfType, missingProperty)) {
|
|
70906
|
+
return libTarget;
|
|
70907
|
+
}
|
|
70495
70908
|
}
|
|
70496
70909
|
}
|
|
70497
70910
|
}
|
|
@@ -82949,6 +83362,7 @@ ${lanes.join("\n")}
|
|
|
82949
83362
|
let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator;
|
|
82950
83363
|
let flags = 0 /* None */;
|
|
82951
83364
|
let sawExportBeforeDecorators = false;
|
|
83365
|
+
let hasLeadingDecorators = false;
|
|
82952
83366
|
for (const modifier of node.modifiers) {
|
|
82953
83367
|
if (isDecorator(modifier)) {
|
|
82954
83368
|
if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {
|
|
@@ -82966,8 +83380,22 @@ ${lanes.join("\n")}
|
|
|
82966
83380
|
if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) {
|
|
82967
83381
|
return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);
|
|
82968
83382
|
}
|
|
83383
|
+
if (hasLeadingDecorators && flags & 126975 /* Modifier */) {
|
|
83384
|
+
Debug.assertIsDefined(firstDecorator);
|
|
83385
|
+
const sourceFile = getSourceFileOfNode(modifier);
|
|
83386
|
+
if (!hasParseDiagnostics(sourceFile)) {
|
|
83387
|
+
addRelatedInfo(
|
|
83388
|
+
error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
|
|
83389
|
+
createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here)
|
|
83390
|
+
);
|
|
83391
|
+
return true;
|
|
83392
|
+
}
|
|
83393
|
+
return false;
|
|
83394
|
+
}
|
|
82969
83395
|
flags |= 131072 /* Decorator */;
|
|
82970
|
-
if (flags &
|
|
83396
|
+
if (!(flags & 126975 /* Modifier */)) {
|
|
83397
|
+
hasLeadingDecorators = true;
|
|
83398
|
+
} else if (flags & 1 /* Export */) {
|
|
82971
83399
|
sawExportBeforeDecorators = true;
|
|
82972
83400
|
}
|
|
82973
83401
|
firstDecorator != null ? firstDecorator : firstDecorator = modifier;
|
|
@@ -116338,11 +116766,19 @@ ${lanes.join("\n")}
|
|
|
116338
116766
|
diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
|
|
116339
116767
|
} else if (isClassDeclaration(parent2)) {
|
|
116340
116768
|
const exportIndex = findIndex(parent2.modifiers, isExportModifier);
|
|
116341
|
-
|
|
116342
|
-
|
|
116343
|
-
|
|
116344
|
-
|
|
116345
|
-
|
|
116769
|
+
if (exportIndex >= 0) {
|
|
116770
|
+
const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier);
|
|
116771
|
+
if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) {
|
|
116772
|
+
diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
|
|
116773
|
+
} else if (exportIndex >= 0 && decoratorIndex < exportIndex) {
|
|
116774
|
+
const trailingDecoratorIndex = findIndex(parent2.modifiers, isDecorator, exportIndex);
|
|
116775
|
+
if (trailingDecoratorIndex >= 0) {
|
|
116776
|
+
diagnostics.push(addRelatedInfo(
|
|
116777
|
+
createDiagnosticForNode2(parent2.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
|
|
116778
|
+
createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here)
|
|
116779
|
+
));
|
|
116780
|
+
}
|
|
116781
|
+
}
|
|
116346
116782
|
}
|
|
116347
116783
|
}
|
|
116348
116784
|
}
|
|
@@ -127722,10 +128158,13 @@ ${lanes.join("\n")}
|
|
|
127722
128158
|
return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */);
|
|
127723
128159
|
}
|
|
127724
128160
|
function getDefaultLikeExportNameFromDeclaration(symbol) {
|
|
127725
|
-
return firstDefined(
|
|
127726
|
-
|
|
127727
|
-
|
|
127728
|
-
|
|
128161
|
+
return firstDefined(
|
|
128162
|
+
symbol.declarations,
|
|
128163
|
+
(d) => {
|
|
128164
|
+
var _a2, _b;
|
|
128165
|
+
return isExportAssignment(d) ? (_a2 = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a2.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text;
|
|
128166
|
+
}
|
|
128167
|
+
);
|
|
127729
128168
|
}
|
|
127730
128169
|
function getSymbolParentOrFail(symbol) {
|
|
127731
128170
|
var _a2;
|
|
@@ -149024,7 +149463,7 @@ ${lanes.join("\n")}
|
|
|
149024
149463
|
return false;
|
|
149025
149464
|
}
|
|
149026
149465
|
function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) {
|
|
149027
|
-
return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(
|
|
149466
|
+
return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));
|
|
149028
149467
|
}
|
|
149029
149468
|
function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() {
|
|
149030
149469
|
const typeLiteralNode = tryGetTypeLiteralNode(contextToken);
|