@typescript-deploys/pr-build 5.0.0-pr-52703-9 → 5.0.0-pr-52696-39
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 +640 -164
- package/lib/tsserver.js +665 -184
- package/lib/tsserverlibrary.d.ts +1 -1
- package/lib/tsserverlibrary.js +665 -184
- package/lib/typescript.d.ts +1 -1
- package/lib/typescript.js +665 -184
- package/lib/typingsInstaller.js +21 -5
- package/package.json +1 -1
package/lib/typescript.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-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230211`;
|
|
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;
|
|
@@ -45266,6 +45681,7 @@ ${lanes.join("\n")}
|
|
|
45266
45681
|
let flowTypeCache;
|
|
45267
45682
|
const contextualTypeNodes = [];
|
|
45268
45683
|
const contextualTypes = [];
|
|
45684
|
+
const contextualIsCache = [];
|
|
45269
45685
|
let contextualTypeCount = 0;
|
|
45270
45686
|
const inferenceContextNodes = [];
|
|
45271
45687
|
const inferenceContexts = [];
|
|
@@ -52436,6 +52852,8 @@ ${lanes.join("\n")}
|
|
|
52436
52852
|
return !!target.baseTypesResolved;
|
|
52437
52853
|
case 8 /* WriteType */:
|
|
52438
52854
|
return !!getSymbolLinks(target).writeType;
|
|
52855
|
+
case 9 /* ParameterInitializerContainsUndefined */:
|
|
52856
|
+
return getNodeLinks(target).parameterInitializerContainsUndefined !== void 0;
|
|
52439
52857
|
}
|
|
52440
52858
|
return Debug.assertNever(propertyName);
|
|
52441
52859
|
}
|
|
@@ -57702,7 +58120,7 @@ ${lanes.join("\n")}
|
|
|
57702
58120
|
}
|
|
57703
58121
|
}
|
|
57704
58122
|
function removeStringLiteralsMatchedByTemplateLiterals(types) {
|
|
57705
|
-
const templates = filter(types, isPatternLiteralType);
|
|
58123
|
+
const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
|
|
57706
58124
|
if (templates.length) {
|
|
57707
58125
|
let i = types.length;
|
|
57708
58126
|
while (i > 0) {
|
|
@@ -60227,7 +60645,12 @@ ${lanes.join("\n")}
|
|
|
60227
60645
|
}
|
|
60228
60646
|
}
|
|
60229
60647
|
function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) {
|
|
60230
|
-
pushContextualType(
|
|
60648
|
+
pushContextualType(
|
|
60649
|
+
next,
|
|
60650
|
+
sourcePropType,
|
|
60651
|
+
/*isCache*/
|
|
60652
|
+
false
|
|
60653
|
+
);
|
|
60231
60654
|
const result = checkExpressionForMutableLocation(next, 1 /* Contextual */);
|
|
60232
60655
|
popContextualType();
|
|
60233
60656
|
return result;
|
|
@@ -60535,7 +60958,12 @@ ${lanes.join("\n")}
|
|
|
60535
60958
|
if (isTupleLikeType(source)) {
|
|
60536
60959
|
return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
|
|
60537
60960
|
}
|
|
60538
|
-
pushContextualType(
|
|
60961
|
+
pushContextualType(
|
|
60962
|
+
node,
|
|
60963
|
+
target,
|
|
60964
|
+
/*isCache*/
|
|
60965
|
+
false
|
|
60966
|
+
);
|
|
60539
60967
|
const tupleizedType = checkArrayLiteral(
|
|
60540
60968
|
node,
|
|
60541
60969
|
1 /* Contextual */,
|
|
@@ -63760,14 +64188,6 @@ ${lanes.join("\n")}
|
|
|
63760
64188
|
const key = `B${getTypeId(type)}`;
|
|
63761
64189
|
return (_a2 = getCachedType(key)) != null ? _a2 : setCachedType(key, mapType(type, getBaseTypeOfLiteralType));
|
|
63762
64190
|
}
|
|
63763
|
-
function getBaseTypeOfLiteralTypeForComparison(type) {
|
|
63764
|
-
return type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & 256 /* NumberLiteral */ ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1024 /* EnumLiteral */ ? getBaseTypeOfEnumLiteralType(type) : type.flags & 1048576 /* Union */ ? getBaseTypeOfLiteralTypeUnionForComparison(type) : type;
|
|
63765
|
-
}
|
|
63766
|
-
function getBaseTypeOfLiteralTypeUnionForComparison(type) {
|
|
63767
|
-
var _a2;
|
|
63768
|
-
const key = `BC${getTypeId(type)}`;
|
|
63769
|
-
return (_a2 = getCachedType(key)) != null ? _a2 : setCachedType(key, mapType(type, getBaseTypeOfLiteralTypeForComparison));
|
|
63770
|
-
}
|
|
63771
64191
|
function getWidenedLiteralType(type) {
|
|
63772
64192
|
return type.flags & 1024 /* EnumLiteral */ && isFreshLiteralType(type) ? getBaseTypeOfEnumLiteralType(type) : type.flags & 128 /* StringLiteral */ && isFreshLiteralType(type) ? stringType : type.flags & 256 /* NumberLiteral */ && isFreshLiteralType(type) ? numberType : type.flags & 2048 /* BigIntLiteral */ && isFreshLiteralType(type) ? bigintType : type.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(type) ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedLiteralType) : type;
|
|
63773
64193
|
}
|
|
@@ -67266,15 +67686,25 @@ ${lanes.join("\n")}
|
|
|
67266
67686
|
function isConstVariable(symbol) {
|
|
67267
67687
|
return symbol.flags & 3 /* Variable */ && (getDeclarationNodeFlagsFromSymbol(symbol) & 2 /* Const */) !== 0;
|
|
67268
67688
|
}
|
|
67269
|
-
function
|
|
67270
|
-
|
|
67271
|
-
|
|
67272
|
-
|
|
67273
|
-
|
|
67274
|
-
|
|
67275
|
-
|
|
67276
|
-
|
|
67689
|
+
function parameterInitializerContainsUndefined(declaration) {
|
|
67690
|
+
const links = getNodeLinks(declaration);
|
|
67691
|
+
if (links.parameterInitializerContainsUndefined === void 0) {
|
|
67692
|
+
if (!pushTypeResolution(declaration, 9 /* ParameterInitializerContainsUndefined */)) {
|
|
67693
|
+
reportCircularityError(declaration.symbol);
|
|
67694
|
+
return true;
|
|
67695
|
+
}
|
|
67696
|
+
const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */);
|
|
67697
|
+
if (!popTypeResolution()) {
|
|
67698
|
+
reportCircularityError(declaration.symbol);
|
|
67699
|
+
return true;
|
|
67700
|
+
}
|
|
67701
|
+
links.parameterInitializerContainsUndefined = containsUndefined;
|
|
67277
67702
|
}
|
|
67703
|
+
return links.parameterInitializerContainsUndefined;
|
|
67704
|
+
}
|
|
67705
|
+
function removeOptionalityFromDeclaredType(declaredType, declaration) {
|
|
67706
|
+
const removeUndefined = strictNullChecks && declaration.kind === 166 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration);
|
|
67707
|
+
return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;
|
|
67278
67708
|
}
|
|
67279
67709
|
function isConstraintPosition(type, node) {
|
|
67280
67710
|
const parent2 = node.parent;
|
|
@@ -68592,11 +69022,13 @@ ${lanes.join("\n")}
|
|
|
68592
69022
|
if (node.flags & 33554432 /* InWithStatement */) {
|
|
68593
69023
|
return void 0;
|
|
68594
69024
|
}
|
|
68595
|
-
const index = findContextualNode(
|
|
69025
|
+
const index = findContextualNode(
|
|
69026
|
+
node,
|
|
69027
|
+
/*includeCaches*/
|
|
69028
|
+
!contextFlags
|
|
69029
|
+
);
|
|
68596
69030
|
if (index >= 0) {
|
|
68597
|
-
|
|
68598
|
-
if (cached || !contextFlags)
|
|
68599
|
-
return cached;
|
|
69031
|
+
return contextualTypes[index];
|
|
68600
69032
|
}
|
|
68601
69033
|
const { parent: parent2 } = node;
|
|
68602
69034
|
switch (parent2.kind) {
|
|
@@ -68667,17 +69099,30 @@ ${lanes.join("\n")}
|
|
|
68667
69099
|
}
|
|
68668
69100
|
return void 0;
|
|
68669
69101
|
}
|
|
68670
|
-
function
|
|
69102
|
+
function pushCachedContextualType(node) {
|
|
69103
|
+
pushContextualType(
|
|
69104
|
+
node,
|
|
69105
|
+
getContextualType2(
|
|
69106
|
+
node,
|
|
69107
|
+
/*contextFlags*/
|
|
69108
|
+
void 0
|
|
69109
|
+
),
|
|
69110
|
+
/*isCache*/
|
|
69111
|
+
true
|
|
69112
|
+
);
|
|
69113
|
+
}
|
|
69114
|
+
function pushContextualType(node, type, isCache) {
|
|
68671
69115
|
contextualTypeNodes[contextualTypeCount] = node;
|
|
68672
69116
|
contextualTypes[contextualTypeCount] = type;
|
|
69117
|
+
contextualIsCache[contextualTypeCount] = isCache;
|
|
68673
69118
|
contextualTypeCount++;
|
|
68674
69119
|
}
|
|
68675
69120
|
function popContextualType() {
|
|
68676
69121
|
contextualTypeCount--;
|
|
68677
69122
|
}
|
|
68678
|
-
function findContextualNode(node) {
|
|
69123
|
+
function findContextualNode(node, includeCaches) {
|
|
68679
69124
|
for (let i = contextualTypeCount - 1; i >= 0; i--) {
|
|
68680
|
-
if (node === contextualTypeNodes[i]) {
|
|
69125
|
+
if (node === contextualTypeNodes[i] && (includeCaches || !contextualIsCache[i])) {
|
|
68681
69126
|
return i;
|
|
68682
69127
|
}
|
|
68683
69128
|
}
|
|
@@ -68700,7 +69145,11 @@ ${lanes.join("\n")}
|
|
|
68700
69145
|
}
|
|
68701
69146
|
function getContextualJsxElementAttributesType(node, contextFlags) {
|
|
68702
69147
|
if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) {
|
|
68703
|
-
const index = findContextualNode(
|
|
69148
|
+
const index = findContextualNode(
|
|
69149
|
+
node.parent,
|
|
69150
|
+
/*includeCaches*/
|
|
69151
|
+
!contextFlags
|
|
69152
|
+
);
|
|
68704
69153
|
if (index >= 0) {
|
|
68705
69154
|
return contextualTypes[index];
|
|
68706
69155
|
}
|
|
@@ -68971,11 +69420,7 @@ ${lanes.join("\n")}
|
|
|
68971
69420
|
const elementCount = elements.length;
|
|
68972
69421
|
const elementTypes = [];
|
|
68973
69422
|
const elementFlags = [];
|
|
68974
|
-
|
|
68975
|
-
node,
|
|
68976
|
-
/*contextFlags*/
|
|
68977
|
-
void 0
|
|
68978
|
-
));
|
|
69423
|
+
pushCachedContextualType(node);
|
|
68979
69424
|
const inDestructuringPattern = isAssignmentTarget(node);
|
|
68980
69425
|
const inConstContext = isConstContext(node);
|
|
68981
69426
|
const contextualType = getApparentTypeOfContextualType(
|
|
@@ -69138,11 +69583,7 @@ ${lanes.join("\n")}
|
|
|
69138
69583
|
let propertiesTable = createSymbolTable();
|
|
69139
69584
|
let propertiesArray = [];
|
|
69140
69585
|
let spread = emptyObjectType;
|
|
69141
|
-
|
|
69142
|
-
node,
|
|
69143
|
-
/*contextFlags*/
|
|
69144
|
-
void 0
|
|
69145
|
-
));
|
|
69586
|
+
pushCachedContextualType(node);
|
|
69146
69587
|
const contextualType = getApparentTypeOfContextualType(
|
|
69147
69588
|
node,
|
|
69148
69589
|
/*contextFlags*/
|
|
@@ -70482,26 +70923,22 @@ ${lanes.join("\n")}
|
|
|
70482
70923
|
function getSuggestedLibForNonExistentName(name) {
|
|
70483
70924
|
const missingName = diagnosticName(name);
|
|
70484
70925
|
const allFeatures = getScriptTargetFeatures();
|
|
70485
|
-
const
|
|
70486
|
-
|
|
70487
|
-
const containingTypes = getOwnKeys(allFeatures[libTarget]);
|
|
70488
|
-
if (containingTypes !== void 0 && contains(containingTypes, missingName)) {
|
|
70489
|
-
return libTarget;
|
|
70490
|
-
}
|
|
70491
|
-
}
|
|
70926
|
+
const typeFeatures = allFeatures.get(missingName);
|
|
70927
|
+
return typeFeatures && firstIterator(typeFeatures.keys());
|
|
70492
70928
|
}
|
|
70493
70929
|
function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {
|
|
70494
70930
|
const container = getApparentType(containingType).symbol;
|
|
70495
70931
|
if (!container) {
|
|
70496
70932
|
return void 0;
|
|
70497
70933
|
}
|
|
70934
|
+
const containingTypeName = symbolName(container);
|
|
70498
70935
|
const allFeatures = getScriptTargetFeatures();
|
|
70499
|
-
const
|
|
70500
|
-
|
|
70501
|
-
const
|
|
70502
|
-
|
|
70503
|
-
|
|
70504
|
-
|
|
70936
|
+
const typeFeatures = allFeatures.get(containingTypeName);
|
|
70937
|
+
if (typeFeatures) {
|
|
70938
|
+
for (const [libTarget, featuresOfType] of typeFeatures) {
|
|
70939
|
+
if (contains(featuresOfType, missingProperty)) {
|
|
70940
|
+
return libTarget;
|
|
70941
|
+
}
|
|
70505
70942
|
}
|
|
70506
70943
|
}
|
|
70507
70944
|
}
|
|
@@ -74805,8 +75242,8 @@ ${lanes.join("\n")}
|
|
|
74805
75242
|
case 32 /* LessThanEqualsToken */:
|
|
74806
75243
|
case 33 /* GreaterThanEqualsToken */:
|
|
74807
75244
|
if (checkForDisallowedESSymbolOperand(operator)) {
|
|
74808
|
-
leftType =
|
|
74809
|
-
rightType =
|
|
75245
|
+
leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
|
|
75246
|
+
rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
|
|
74810
75247
|
reportOperatorErrorUnless((left2, right2) => {
|
|
74811
75248
|
if (isTypeAny(left2) || isTypeAny(right2)) {
|
|
74812
75249
|
return true;
|
|
@@ -75157,14 +75594,19 @@ ${lanes.join("\n")}
|
|
|
75157
75594
|
return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */));
|
|
75158
75595
|
}
|
|
75159
75596
|
function getContextNode2(node) {
|
|
75160
|
-
if (node
|
|
75597
|
+
if (isJsxAttributes(node) && !isJsxSelfClosingElement(node.parent)) {
|
|
75161
75598
|
return node.parent.parent;
|
|
75162
75599
|
}
|
|
75163
75600
|
return node;
|
|
75164
75601
|
}
|
|
75165
75602
|
function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
|
|
75166
75603
|
const contextNode = getContextNode2(node);
|
|
75167
|
-
pushContextualType(
|
|
75604
|
+
pushContextualType(
|
|
75605
|
+
contextNode,
|
|
75606
|
+
contextualType,
|
|
75607
|
+
/*isCache*/
|
|
75608
|
+
false
|
|
75609
|
+
);
|
|
75168
75610
|
pushInferenceContext(contextNode, inferenceContext);
|
|
75169
75611
|
const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));
|
|
75170
75612
|
if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {
|
|
@@ -75505,7 +75947,12 @@ ${lanes.join("\n")}
|
|
|
75505
75947
|
if (links.contextFreeType) {
|
|
75506
75948
|
return links.contextFreeType;
|
|
75507
75949
|
}
|
|
75508
|
-
pushContextualType(
|
|
75950
|
+
pushContextualType(
|
|
75951
|
+
node,
|
|
75952
|
+
anyType,
|
|
75953
|
+
/*isCache*/
|
|
75954
|
+
false
|
|
75955
|
+
);
|
|
75509
75956
|
const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);
|
|
75510
75957
|
popContextualType();
|
|
75511
75958
|
return type;
|
|
@@ -82959,6 +83406,7 @@ ${lanes.join("\n")}
|
|
|
82959
83406
|
let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator;
|
|
82960
83407
|
let flags = 0 /* None */;
|
|
82961
83408
|
let sawExportBeforeDecorators = false;
|
|
83409
|
+
let hasLeadingDecorators = false;
|
|
82962
83410
|
for (const modifier of node.modifiers) {
|
|
82963
83411
|
if (isDecorator(modifier)) {
|
|
82964
83412
|
if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {
|
|
@@ -82976,8 +83424,22 @@ ${lanes.join("\n")}
|
|
|
82976
83424
|
if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) {
|
|
82977
83425
|
return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);
|
|
82978
83426
|
}
|
|
83427
|
+
if (hasLeadingDecorators && flags & 126975 /* Modifier */) {
|
|
83428
|
+
Debug.assertIsDefined(firstDecorator);
|
|
83429
|
+
const sourceFile = getSourceFileOfNode(modifier);
|
|
83430
|
+
if (!hasParseDiagnostics(sourceFile)) {
|
|
83431
|
+
addRelatedInfo(
|
|
83432
|
+
error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
|
|
83433
|
+
createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here)
|
|
83434
|
+
);
|
|
83435
|
+
return true;
|
|
83436
|
+
}
|
|
83437
|
+
return false;
|
|
83438
|
+
}
|
|
82979
83439
|
flags |= 131072 /* Decorator */;
|
|
82980
|
-
if (flags &
|
|
83440
|
+
if (!(flags & 126975 /* Modifier */)) {
|
|
83441
|
+
hasLeadingDecorators = true;
|
|
83442
|
+
} else if (flags & 1 /* Export */) {
|
|
82981
83443
|
sawExportBeforeDecorators = true;
|
|
82982
83444
|
}
|
|
82983
83445
|
firstDecorator != null ? firstDecorator : firstDecorator = modifier;
|
|
@@ -116348,11 +116810,19 @@ ${lanes.join("\n")}
|
|
|
116348
116810
|
diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
|
|
116349
116811
|
} else if (isClassDeclaration(parent2)) {
|
|
116350
116812
|
const exportIndex = findIndex(parent2.modifiers, isExportModifier);
|
|
116351
|
-
|
|
116352
|
-
|
|
116353
|
-
|
|
116354
|
-
|
|
116355
|
-
|
|
116813
|
+
if (exportIndex >= 0) {
|
|
116814
|
+
const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier);
|
|
116815
|
+
if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) {
|
|
116816
|
+
diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
|
|
116817
|
+
} else if (exportIndex >= 0 && decoratorIndex < exportIndex) {
|
|
116818
|
+
const trailingDecoratorIndex = findIndex(parent2.modifiers, isDecorator, exportIndex);
|
|
116819
|
+
if (trailingDecoratorIndex >= 0) {
|
|
116820
|
+
diagnostics.push(addRelatedInfo(
|
|
116821
|
+
createDiagnosticForNode2(parent2.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
|
|
116822
|
+
createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here)
|
|
116823
|
+
));
|
|
116824
|
+
}
|
|
116825
|
+
}
|
|
116356
116826
|
}
|
|
116357
116827
|
}
|
|
116358
116828
|
}
|
|
@@ -127746,10 +128216,13 @@ ${lanes.join("\n")}
|
|
|
127746
128216
|
return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */);
|
|
127747
128217
|
}
|
|
127748
128218
|
function getDefaultLikeExportNameFromDeclaration(symbol) {
|
|
127749
|
-
return firstDefined(
|
|
127750
|
-
|
|
127751
|
-
|
|
127752
|
-
|
|
128219
|
+
return firstDefined(
|
|
128220
|
+
symbol.declarations,
|
|
128221
|
+
(d) => {
|
|
128222
|
+
var _a2, _b;
|
|
128223
|
+
return isExportAssignment(d) ? (_a2 = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a2.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text;
|
|
128224
|
+
}
|
|
128225
|
+
);
|
|
127753
128226
|
}
|
|
127754
128227
|
function getSymbolParentOrFail(symbol) {
|
|
127755
128228
|
var _a2;
|
|
@@ -139369,6 +139842,7 @@ ${lanes.join("\n")}
|
|
|
139369
139842
|
sourceFile,
|
|
139370
139843
|
symbol,
|
|
139371
139844
|
symbolName2,
|
|
139845
|
+
moduleSymbol,
|
|
139372
139846
|
/*isJsxTagName*/
|
|
139373
139847
|
false,
|
|
139374
139848
|
program,
|
|
@@ -139380,7 +139854,6 @@ ${lanes.join("\n")}
|
|
|
139380
139854
|
const fix = getImportFixForSymbol(
|
|
139381
139855
|
sourceFile,
|
|
139382
139856
|
Debug.checkDefined(exportInfo),
|
|
139383
|
-
moduleSymbol,
|
|
139384
139857
|
program,
|
|
139385
139858
|
/*position*/
|
|
139386
139859
|
void 0,
|
|
@@ -139558,13 +140031,19 @@ ${lanes.join("\n")}
|
|
|
139558
140031
|
return result && { ...result, computedWithoutCacheCount };
|
|
139559
140032
|
}
|
|
139560
140033
|
}
|
|
139561
|
-
function getImportCompletionAction(targetSymbol, moduleSymbol, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) {
|
|
140034
|
+
function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) {
|
|
139562
140035
|
const compilerOptions = program.getCompilerOptions();
|
|
139563
|
-
|
|
139564
|
-
|
|
140036
|
+
let exportInfos;
|
|
140037
|
+
if (exportMapKey) {
|
|
140038
|
+
exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey);
|
|
140039
|
+
Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified exportMapKey");
|
|
140040
|
+
} else {
|
|
140041
|
+
exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name)) ? [getSingleExportInfoForSymbol(targetSymbol, symbolName2, moduleSymbol, program, host)] : getAllExportInfoForSymbol(sourceFile, targetSymbol, symbolName2, moduleSymbol, isJsxTagName, program, host, preferences, cancellationToken);
|
|
140042
|
+
Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified symbol / moduleSymbol");
|
|
140043
|
+
}
|
|
139565
140044
|
const useRequire = shouldUseRequire(sourceFile, program);
|
|
139566
140045
|
const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position));
|
|
139567
|
-
const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos,
|
|
140046
|
+
const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));
|
|
139568
140047
|
return {
|
|
139569
140048
|
moduleSpecifier: fix.moduleSpecifier,
|
|
139570
140049
|
codeAction: codeFixActionToCodeAction(codeActionForFix(
|
|
@@ -139586,23 +140065,22 @@ ${lanes.join("\n")}
|
|
|
139586
140065
|
const includeSymbolNameInDescription = symbolName2 !== symbolToken.text;
|
|
139587
140066
|
return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences));
|
|
139588
140067
|
}
|
|
139589
|
-
function getImportFixForSymbol(sourceFile, exportInfos,
|
|
139590
|
-
Debug.assert(exportInfos.some((info) => info.moduleSymbol === moduleSymbol || info.symbol.parent === moduleSymbol), "Some exportInfo should match the specified moduleSymbol");
|
|
140068
|
+
function getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) {
|
|
139591
140069
|
const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host);
|
|
139592
140070
|
return getBestFix(getImportFixes(exportInfos, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes, sourceFile, program, packageJsonImportFilter, host);
|
|
139593
140071
|
}
|
|
139594
140072
|
function codeFixActionToCodeAction({ description: description2, changes, commands }) {
|
|
139595
140073
|
return { description: description2, changes, commands };
|
|
139596
140074
|
}
|
|
139597
|
-
function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, preferCapitalized, program, host, preferences, cancellationToken) {
|
|
140075
|
+
function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) {
|
|
139598
140076
|
const getChecker = createGetChecker(program, host);
|
|
139599
140077
|
return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => {
|
|
139600
|
-
if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol) {
|
|
140078
|
+
if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) {
|
|
139601
140079
|
return info;
|
|
139602
140080
|
}
|
|
139603
140081
|
});
|
|
139604
140082
|
}
|
|
139605
|
-
function getSingleExportInfoForSymbol(symbol, moduleSymbol, program, host) {
|
|
140083
|
+
function getSingleExportInfoForSymbol(symbol, symbolName2, moduleSymbol, program, host) {
|
|
139606
140084
|
var _a2, _b;
|
|
139607
140085
|
const compilerOptions = program.getCompilerOptions();
|
|
139608
140086
|
const mainProgramInfo = getInfoWithChecker(
|
|
@@ -139624,7 +140102,7 @@ ${lanes.join("\n")}
|
|
|
139624
140102
|
if (defaultInfo && skipAlias(defaultInfo.symbol, checker) === symbol) {
|
|
139625
140103
|
return { symbol: defaultInfo.symbol, moduleSymbol, moduleFileName: void 0, exportKind: defaultInfo.exportKind, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };
|
|
139626
140104
|
}
|
|
139627
|
-
const named = checker.tryGetMemberInModuleExportsAndProperties(
|
|
140105
|
+
const named = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol);
|
|
139628
140106
|
if (named && skipAlias(named, checker) === symbol) {
|
|
139629
140107
|
return { symbol: named, moduleSymbol, moduleFileName: void 0, exportKind: 0 /* Named */, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };
|
|
139630
140108
|
}
|
|
@@ -147785,6 +148263,7 @@ ${lanes.join("\n")}
|
|
|
147785
148263
|
if (originIsResolvedExport(origin)) {
|
|
147786
148264
|
const resolvedData = {
|
|
147787
148265
|
exportName: origin.exportName,
|
|
148266
|
+
exportMapKey: origin.exportMapKey,
|
|
147788
148267
|
moduleSpecifier: origin.moduleSpecifier,
|
|
147789
148268
|
ambientModuleName,
|
|
147790
148269
|
fileName: origin.fileName,
|
|
@@ -147808,6 +148287,7 @@ ${lanes.join("\n")}
|
|
|
147808
148287
|
const resolvedOrigin = {
|
|
147809
148288
|
kind: 32 /* ResolvedExport */,
|
|
147810
148289
|
exportName: data.exportName,
|
|
148290
|
+
exportMapKey: data.exportMapKey,
|
|
147811
148291
|
moduleSpecifier: data.moduleSpecifier,
|
|
147812
148292
|
symbolName: completionName,
|
|
147813
148293
|
fileName: data.fileName,
|
|
@@ -148186,6 +148666,7 @@ ${lanes.join("\n")}
|
|
|
148186
148666
|
const { moduleSpecifier, codeAction } = ts_codefix_exports.getImportCompletionAction(
|
|
148187
148667
|
targetSymbol,
|
|
148188
148668
|
moduleSymbol,
|
|
148669
|
+
data == null ? void 0 : data.exportMapKey,
|
|
148189
148670
|
sourceFile,
|
|
148190
148671
|
name,
|
|
148191
148672
|
isJsxOpeningTagName,
|
|
@@ -148875,16 +149356,16 @@ ${lanes.join("\n")}
|
|
|
148875
149356
|
if (detailsEntryId && !some(info, (i) => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) {
|
|
148876
149357
|
return;
|
|
148877
149358
|
}
|
|
148878
|
-
|
|
148879
|
-
if (!
|
|
149359
|
+
info = filter(info, isImportableExportInfo);
|
|
149360
|
+
if (!info.length) {
|
|
148880
149361
|
return;
|
|
148881
149362
|
}
|
|
148882
149363
|
const result = context.tryResolve(info, isFromAmbientModule) || {};
|
|
148883
149364
|
if (result === "failed")
|
|
148884
149365
|
return;
|
|
148885
|
-
let exportInfo2 =
|
|
149366
|
+
let exportInfo2 = info[0], moduleSpecifier;
|
|
148886
149367
|
if (result !== "skipped") {
|
|
148887
|
-
({ exportInfo: exportInfo2 =
|
|
149368
|
+
({ exportInfo: exportInfo2 = info[0], moduleSpecifier } = result);
|
|
148888
149369
|
}
|
|
148889
149370
|
const isDefaultExport = exportInfo2.exportKind === 1 /* Default */;
|
|
148890
149371
|
const symbol = isDefaultExport && getLocalSymbolForExportDefault(exportInfo2.symbol) || exportInfo2.symbol;
|
|
@@ -149048,7 +149529,7 @@ ${lanes.join("\n")}
|
|
|
149048
149529
|
return false;
|
|
149049
149530
|
}
|
|
149050
149531
|
function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) {
|
|
149051
|
-
return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(
|
|
149532
|
+
return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));
|
|
149052
149533
|
}
|
|
149053
149534
|
function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() {
|
|
149054
149535
|
const typeLiteralNode = tryGetTypeLiteralNode(contextToken);
|