typescript 5.0.0-dev.20230209 → 5.0.0-dev.20230211

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.
@@ -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.20230209`;
38
+ version = `${versionMajorMinor}.0-dev.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
- Decorators_must_come_after_export_or_export_default_in_JavaScript_files: diag(8038, 1 /* Error */, "Decorators_must_come_after_export_or_export_default_in_JavaScript_files_8038", "Decorators must come after 'export' or 'export default' in JavaScript files."),
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
- es2015: {
13173
- Array: ["find", "findIndex", "fill", "copyWithin", "entries", "keys", "values"],
13174
- RegExp: ["flags", "sticky", "unicode"],
13175
- Reflect: ["apply", "construct", "defineProperty", "deleteProperty", "get", " getOwnPropertyDescriptor", "getPrototypeOf", "has", "isExtensible", "ownKeys", "preventExtensions", "set", "setPrototypeOf"],
13176
- ArrayConstructor: ["from", "of"],
13177
- ObjectConstructor: ["assign", "getOwnPropertySymbols", "keys", "is", "setPrototypeOf"],
13178
- NumberConstructor: ["isFinite", "isInteger", "isNaN", "isSafeInteger", "parseFloat", "parseInt"],
13179
- Math: ["clz32", "imul", "sign", "log10", "log2", "log1p", "expm1", "cosh", "sinh", "tanh", "acosh", "asinh", "atanh", "hypot", "trunc", "fround", "cbrt"],
13180
- Map: ["entries", "keys", "values"],
13181
- Set: ["entries", "keys", "values"],
13182
- Promise: emptyArray,
13183
- PromiseConstructor: ["all", "race", "reject", "resolve"],
13184
- Symbol: ["for", "keyFor"],
13185
- WeakMap: ["entries", "keys", "values"],
13186
- WeakSet: ["entries", "keys", "values"],
13187
- Iterator: emptyArray,
13188
- AsyncIterator: emptyArray,
13189
- String: ["codePointAt", "includes", "endsWith", "normalize", "repeat", "startsWith", "anchor", "big", "blink", "bold", "fixed", "fontcolor", "fontsize", "italics", "link", "small", "strike", "sub", "sup"],
13190
- StringConstructor: ["fromCodePoint", "raw"]
13191
- },
13192
- es2016: {
13193
- Array: ["includes"]
13194
- },
13195
- es2017: {
13196
- Atomics: emptyArray,
13197
- SharedArrayBuffer: emptyArray,
13198
- String: ["padStart", "padEnd"],
13199
- ObjectConstructor: ["values", "entries", "getOwnPropertyDescriptors"],
13200
- DateTimeFormat: ["formatToParts"]
13201
- },
13202
- es2018: {
13203
- Promise: ["finally"],
13204
- RegExpMatchArray: ["groups"],
13205
- RegExpExecArray: ["groups"],
13206
- RegExp: ["dotAll"],
13207
- Intl: ["PluralRules"],
13208
- AsyncIterable: emptyArray,
13209
- AsyncIterableIterator: emptyArray,
13210
- AsyncGenerator: emptyArray,
13211
- AsyncGeneratorFunction: emptyArray,
13212
- NumberFormat: ["formatToParts"]
13213
- },
13214
- es2019: {
13215
- Array: ["flat", "flatMap"],
13216
- ObjectConstructor: ["fromEntries"],
13217
- String: ["trimStart", "trimEnd", "trimLeft", "trimRight"],
13218
- Symbol: ["description"]
13219
- },
13220
- es2020: {
13221
- BigInt: emptyArray,
13222
- BigInt64Array: emptyArray,
13223
- BigUint64Array: emptyArray,
13224
- PromiseConstructor: ["allSettled"],
13225
- SymbolConstructor: ["matchAll"],
13226
- String: ["matchAll"],
13227
- DataView: ["setBigInt64", "setBigUint64", "getBigInt64", "getBigUint64"],
13228
- RelativeTimeFormat: ["format", "formatToParts", "resolvedOptions"]
13229
- },
13230
- es2021: {
13231
- PromiseConstructor: ["any"],
13232
- String: ["replaceAll"]
13233
- },
13234
- es2022: {
13235
- Array: ["at"],
13236
- String: ["at"],
13237
- Int8Array: ["at"],
13238
- Uint8Array: ["at"],
13239
- Uint8ClampedArray: ["at"],
13240
- Int16Array: ["at"],
13241
- Uint16Array: ["at"],
13242
- Int32Array: ["at"],
13243
- Uint32Array: ["at"],
13244
- Float32Array: ["at"],
13245
- Float64Array: ["at"],
13246
- BigInt64Array: ["at"],
13247
- BigUint64Array: ["at"],
13248
- ObjectConstructor: ["hasOwn"],
13249
- Error: ["cause"]
13250
- },
13251
- es2023: {
13252
- Array: ["findLastIndex", "findLast"],
13253
- Int8Array: ["findLastIndex", "findLast"],
13254
- Uint8Array: ["findLastIndex", "findLast"],
13255
- Uint8ClampedArray: ["findLastIndex", "findLast"],
13256
- Int16Array: ["findLastIndex", "findLast"],
13257
- Uint16Array: ["findLastIndex", "findLast"],
13258
- Int32Array: ["findLastIndex", "findLast"],
13259
- Uint32Array: ["findLastIndex", "findLast"],
13260
- Float32Array: ["findLastIndex", "findLast"],
13261
- Float64Array: ["findLastIndex", "findLast"],
13262
- BigInt64Array: ["findLastIndex", "findLast"],
13263
- BigUint64Array: ["findLastIndex", "findLast"]
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
- // Disabled, pending resolution of https://github.com/tc39/proposal-decorators/issues/494
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 = [];
@@ -57702,7 +58118,7 @@ ${lanes.join("\n")}
57702
58118
  }
57703
58119
  }
57704
58120
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
57705
- const templates = filter(types, isPatternLiteralType);
58121
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
57706
58122
  if (templates.length) {
57707
58123
  let i = types.length;
57708
58124
  while (i > 0) {
@@ -60227,7 +60643,12 @@ ${lanes.join("\n")}
60227
60643
  }
60228
60644
  }
60229
60645
  function checkExpressionForMutableLocationWithContextualType(next, sourcePropType) {
60230
- pushContextualType(next, sourcePropType);
60646
+ pushContextualType(
60647
+ next,
60648
+ sourcePropType,
60649
+ /*isCache*/
60650
+ false
60651
+ );
60231
60652
  const result = checkExpressionForMutableLocation(next, 1 /* Contextual */);
60232
60653
  popContextualType();
60233
60654
  return result;
@@ -60535,7 +60956,12 @@ ${lanes.join("\n")}
60535
60956
  if (isTupleLikeType(source)) {
60536
60957
  return elaborateElementwise(generateLimitedTupleElements(node, target), source, target, relation, containingMessageChain, errorOutputContainer);
60537
60958
  }
60538
- pushContextualType(node, target);
60959
+ pushContextualType(
60960
+ node,
60961
+ target,
60962
+ /*isCache*/
60963
+ false
60964
+ );
60539
60965
  const tupleizedType = checkArrayLiteral(
60540
60966
  node,
60541
60967
  1 /* Contextual */,
@@ -66225,10 +66651,12 @@ ${lanes.join("\n")}
66225
66651
  }
66226
66652
  function isConstantReference(node) {
66227
66653
  switch (node.kind) {
66228
- case 79 /* Identifier */: {
66229
- const symbol = getResolvedSymbol(node);
66230
- return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
66231
- }
66654
+ case 79 /* Identifier */:
66655
+ if (!isThisInTypeQuery(node)) {
66656
+ const symbol = getResolvedSymbol(node);
66657
+ return isConstVariable(symbol) || isParameterOrCatchClauseVariable(symbol) && !isSymbolAssigned(symbol);
66658
+ }
66659
+ break;
66232
66660
  case 208 /* PropertyAccessExpression */:
66233
66661
  case 209 /* ElementAccessExpression */:
66234
66662
  return isConstantReference(node.expression) && isReadonlySymbol(getNodeLinks(node).resolvedSymbol || unknownSymbol);
@@ -68582,11 +69010,13 @@ ${lanes.join("\n")}
68582
69010
  if (node.flags & 33554432 /* InWithStatement */) {
68583
69011
  return void 0;
68584
69012
  }
68585
- const index = findContextualNode(node);
69013
+ const index = findContextualNode(
69014
+ node,
69015
+ /*includeCaches*/
69016
+ !contextFlags
69017
+ );
68586
69018
  if (index >= 0) {
68587
- const cached = contextualTypes[index];
68588
- if (cached || !contextFlags)
68589
- return cached;
69019
+ return contextualTypes[index];
68590
69020
  }
68591
69021
  const { parent: parent2 } = node;
68592
69022
  switch (parent2.kind) {
@@ -68657,17 +69087,30 @@ ${lanes.join("\n")}
68657
69087
  }
68658
69088
  return void 0;
68659
69089
  }
68660
- function pushContextualType(node, type) {
69090
+ function pushCachedContextualType(node) {
69091
+ pushContextualType(
69092
+ node,
69093
+ getContextualType2(
69094
+ node,
69095
+ /*contextFlags*/
69096
+ void 0
69097
+ ),
69098
+ /*isCache*/
69099
+ true
69100
+ );
69101
+ }
69102
+ function pushContextualType(node, type, isCache) {
68661
69103
  contextualTypeNodes[contextualTypeCount] = node;
68662
69104
  contextualTypes[contextualTypeCount] = type;
69105
+ contextualIsCache[contextualTypeCount] = isCache;
68663
69106
  contextualTypeCount++;
68664
69107
  }
68665
69108
  function popContextualType() {
68666
69109
  contextualTypeCount--;
68667
69110
  }
68668
- function findContextualNode(node) {
69111
+ function findContextualNode(node, includeCaches) {
68669
69112
  for (let i = contextualTypeCount - 1; i >= 0; i--) {
68670
- if (node === contextualTypeNodes[i]) {
69113
+ if (node === contextualTypeNodes[i] && (includeCaches || !contextualIsCache[i])) {
68671
69114
  return i;
68672
69115
  }
68673
69116
  }
@@ -68690,7 +69133,11 @@ ${lanes.join("\n")}
68690
69133
  }
68691
69134
  function getContextualJsxElementAttributesType(node, contextFlags) {
68692
69135
  if (isJsxOpeningElement(node) && contextFlags !== 4 /* Completions */) {
68693
- const index = findContextualNode(node.parent);
69136
+ const index = findContextualNode(
69137
+ node.parent,
69138
+ /*includeCaches*/
69139
+ !contextFlags
69140
+ );
68694
69141
  if (index >= 0) {
68695
69142
  return contextualTypes[index];
68696
69143
  }
@@ -68961,11 +69408,7 @@ ${lanes.join("\n")}
68961
69408
  const elementCount = elements.length;
68962
69409
  const elementTypes = [];
68963
69410
  const elementFlags = [];
68964
- pushContextualType(node, getContextualType2(
68965
- node,
68966
- /*contextFlags*/
68967
- void 0
68968
- ));
69411
+ pushCachedContextualType(node);
68969
69412
  const inDestructuringPattern = isAssignmentTarget(node);
68970
69413
  const inConstContext = isConstContext(node);
68971
69414
  const contextualType = getApparentTypeOfContextualType(
@@ -69128,11 +69571,7 @@ ${lanes.join("\n")}
69128
69571
  let propertiesTable = createSymbolTable();
69129
69572
  let propertiesArray = [];
69130
69573
  let spread = emptyObjectType;
69131
- pushContextualType(node, getContextualType2(
69132
- node,
69133
- /*contextFlags*/
69134
- void 0
69135
- ));
69574
+ pushCachedContextualType(node);
69136
69575
  const contextualType = getApparentTypeOfContextualType(
69137
69576
  node,
69138
69577
  /*contextFlags*/
@@ -70472,26 +70911,22 @@ ${lanes.join("\n")}
70472
70911
  function getSuggestedLibForNonExistentName(name) {
70473
70912
  const missingName = diagnosticName(name);
70474
70913
  const allFeatures = getScriptTargetFeatures();
70475
- const libTargets = getOwnKeys(allFeatures);
70476
- for (const libTarget of libTargets) {
70477
- const containingTypes = getOwnKeys(allFeatures[libTarget]);
70478
- if (containingTypes !== void 0 && contains(containingTypes, missingName)) {
70479
- return libTarget;
70480
- }
70481
- }
70914
+ const typeFeatures = allFeatures.get(missingName);
70915
+ return typeFeatures && firstIterator(typeFeatures.keys());
70482
70916
  }
70483
70917
  function getSuggestedLibForNonExistentProperty(missingProperty, containingType) {
70484
70918
  const container = getApparentType(containingType).symbol;
70485
70919
  if (!container) {
70486
70920
  return void 0;
70487
70921
  }
70922
+ const containingTypeName = symbolName(container);
70488
70923
  const allFeatures = getScriptTargetFeatures();
70489
- const libTargets = getOwnKeys(allFeatures);
70490
- for (const libTarget of libTargets) {
70491
- const featuresOfLib = allFeatures[libTarget];
70492
- const featuresOfContainingType = featuresOfLib[symbolName(container)];
70493
- if (featuresOfContainingType !== void 0 && contains(featuresOfContainingType, missingProperty)) {
70494
- return libTarget;
70924
+ const typeFeatures = allFeatures.get(containingTypeName);
70925
+ if (typeFeatures) {
70926
+ for (const [libTarget, featuresOfType] of typeFeatures) {
70927
+ if (contains(featuresOfType, missingProperty)) {
70928
+ return libTarget;
70929
+ }
70495
70930
  }
70496
70931
  }
70497
70932
  }
@@ -75147,14 +75582,19 @@ ${lanes.join("\n")}
75147
75582
  return !!(type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */) || type.flags & 58982400 /* InstantiableNonPrimitive */ && maybeTypeOfKind(getBaseConstraintOfType(type) || unknownType, 402653316 /* StringLike */));
75148
75583
  }
75149
75584
  function getContextNode2(node) {
75150
- if (node.kind === 289 /* JsxAttributes */ && !isJsxSelfClosingElement(node.parent)) {
75585
+ if (isJsxAttributes(node) && !isJsxSelfClosingElement(node.parent)) {
75151
75586
  return node.parent.parent;
75152
75587
  }
75153
75588
  return node;
75154
75589
  }
75155
75590
  function checkExpressionWithContextualType(node, contextualType, inferenceContext, checkMode) {
75156
75591
  const contextNode = getContextNode2(node);
75157
- pushContextualType(contextNode, contextualType);
75592
+ pushContextualType(
75593
+ contextNode,
75594
+ contextualType,
75595
+ /*isCache*/
75596
+ false
75597
+ );
75158
75598
  pushInferenceContext(contextNode, inferenceContext);
75159
75599
  const type = checkExpression(node, checkMode | 1 /* Contextual */ | (inferenceContext ? 2 /* Inferential */ : 0));
75160
75600
  if (inferenceContext && inferenceContext.intraExpressionInferenceSites) {
@@ -75495,7 +75935,12 @@ ${lanes.join("\n")}
75495
75935
  if (links.contextFreeType) {
75496
75936
  return links.contextFreeType;
75497
75937
  }
75498
- pushContextualType(node, anyType);
75938
+ pushContextualType(
75939
+ node,
75940
+ anyType,
75941
+ /*isCache*/
75942
+ false
75943
+ );
75499
75944
  const type = links.contextFreeType = checkExpression(node, 4 /* SkipContextSensitive */);
75500
75945
  popContextualType();
75501
75946
  return type;
@@ -82949,6 +83394,7 @@ ${lanes.join("\n")}
82949
83394
  let lastStatic, lastDeclare, lastAsync, lastOverride, firstDecorator;
82950
83395
  let flags = 0 /* None */;
82951
83396
  let sawExportBeforeDecorators = false;
83397
+ let hasLeadingDecorators = false;
82952
83398
  for (const modifier of node.modifiers) {
82953
83399
  if (isDecorator(modifier)) {
82954
83400
  if (!nodeCanBeDecorated(legacyDecorators, node, node.parent, node.parent.parent)) {
@@ -82966,8 +83412,22 @@ ${lanes.join("\n")}
82966
83412
  if (flags & ~(1025 /* ExportDefault */ | 131072 /* Decorator */)) {
82967
83413
  return grammarErrorOnNode(modifier, Diagnostics.Decorators_are_not_valid_here);
82968
83414
  }
83415
+ if (hasLeadingDecorators && flags & 126975 /* Modifier */) {
83416
+ Debug.assertIsDefined(firstDecorator);
83417
+ const sourceFile = getSourceFileOfNode(modifier);
83418
+ if (!hasParseDiagnostics(sourceFile)) {
83419
+ addRelatedInfo(
83420
+ error(modifier, Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
83421
+ createDiagnosticForNode(firstDecorator, Diagnostics.Decorator_used_before_export_here)
83422
+ );
83423
+ return true;
83424
+ }
83425
+ return false;
83426
+ }
82969
83427
  flags |= 131072 /* Decorator */;
82970
- if (flags & 1 /* Export */) {
83428
+ if (!(flags & 126975 /* Modifier */)) {
83429
+ hasLeadingDecorators = true;
83430
+ } else if (flags & 1 /* Export */) {
82971
83431
  sawExportBeforeDecorators = true;
82972
83432
  }
82973
83433
  firstDecorator != null ? firstDecorator : firstDecorator = modifier;
@@ -116338,11 +116798,19 @@ ${lanes.join("\n")}
116338
116798
  diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
116339
116799
  } else if (isClassDeclaration(parent2)) {
116340
116800
  const exportIndex = findIndex(parent2.modifiers, isExportModifier);
116341
- const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier);
116342
- if (exportIndex >= 0 && decoratorIndex < exportIndex) {
116343
- diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_must_come_after_export_or_export_default_in_JavaScript_files));
116344
- } else if (defaultIndex >= 0 && decoratorIndex < defaultIndex) {
116345
- diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
116801
+ if (exportIndex >= 0) {
116802
+ const defaultIndex = findIndex(parent2.modifiers, isDefaultModifier);
116803
+ if (decoratorIndex > exportIndex && defaultIndex >= 0 && decoratorIndex < defaultIndex) {
116804
+ diagnostics.push(createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorators_are_not_valid_here));
116805
+ } else if (exportIndex >= 0 && decoratorIndex < exportIndex) {
116806
+ const trailingDecoratorIndex = findIndex(parent2.modifiers, isDecorator, exportIndex);
116807
+ if (trailingDecoratorIndex >= 0) {
116808
+ diagnostics.push(addRelatedInfo(
116809
+ createDiagnosticForNode2(parent2.modifiers[trailingDecoratorIndex], Diagnostics.Decorators_may_not_appear_after_export_or_export_default_if_they_also_appear_before_export),
116810
+ createDiagnosticForNode2(parent2.modifiers[decoratorIndex], Diagnostics.Decorator_used_before_export_here)
116811
+ ));
116812
+ }
116813
+ }
116346
116814
  }
116347
116815
  }
116348
116816
  }
@@ -127722,10 +128190,13 @@ ${lanes.join("\n")}
127722
128190
  return !(symbol.flags & 33554432 /* Transient */) && (symbol.escapedName === "export=" /* ExportEquals */ || symbol.escapedName === "default" /* Default */);
127723
128191
  }
127724
128192
  function getDefaultLikeExportNameFromDeclaration(symbol) {
127725
- return firstDefined(symbol.declarations, (d) => {
127726
- var _a2;
127727
- return isExportAssignment(d) ? (_a2 = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a2.text : void 0;
127728
- });
128193
+ return firstDefined(
128194
+ symbol.declarations,
128195
+ (d) => {
128196
+ var _a2, _b;
128197
+ return isExportAssignment(d) ? (_a2 = tryCast(skipOuterExpressions(d.expression), isIdentifier)) == null ? void 0 : _a2.text : (_b = tryCast(getNameOfDeclaration(d), isIdentifier)) == null ? void 0 : _b.text;
128198
+ }
128199
+ );
127729
128200
  }
127730
128201
  function getSymbolParentOrFail(symbol) {
127731
128202
  var _a2;
@@ -139345,6 +139816,7 @@ ${lanes.join("\n")}
139345
139816
  sourceFile,
139346
139817
  symbol,
139347
139818
  symbolName2,
139819
+ moduleSymbol,
139348
139820
  /*isJsxTagName*/
139349
139821
  false,
139350
139822
  program,
@@ -139356,7 +139828,6 @@ ${lanes.join("\n")}
139356
139828
  const fix = getImportFixForSymbol(
139357
139829
  sourceFile,
139358
139830
  Debug.checkDefined(exportInfo),
139359
- moduleSymbol,
139360
139831
  program,
139361
139832
  /*position*/
139362
139833
  void 0,
@@ -139534,13 +140005,19 @@ ${lanes.join("\n")}
139534
140005
  return result && { ...result, computedWithoutCacheCount };
139535
140006
  }
139536
140007
  }
139537
- function getImportCompletionAction(targetSymbol, moduleSymbol, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) {
140008
+ function getImportCompletionAction(targetSymbol, moduleSymbol, exportMapKey, sourceFile, symbolName2, isJsxTagName, host, program, formatContext, position, preferences, cancellationToken) {
139538
140009
  const compilerOptions = program.getCompilerOptions();
139539
- const exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name)) ? [getSingleExportInfoForSymbol(targetSymbol, moduleSymbol, program, host)] : getAllExportInfoForSymbol(sourceFile, targetSymbol, symbolName2, isJsxTagName, program, host, preferences, cancellationToken);
139540
- Debug.assertIsDefined(exportInfos);
140010
+ let exportInfos;
140011
+ if (exportMapKey) {
140012
+ exportInfos = getExportInfoMap(sourceFile, host, program, preferences, cancellationToken).get(sourceFile.path, exportMapKey);
140013
+ Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified exportMapKey");
140014
+ } else {
140015
+ exportInfos = pathIsBareSpecifier(stripQuotes(moduleSymbol.name)) ? [getSingleExportInfoForSymbol(targetSymbol, symbolName2, moduleSymbol, program, host)] : getAllExportInfoForSymbol(sourceFile, targetSymbol, symbolName2, moduleSymbol, isJsxTagName, program, host, preferences, cancellationToken);
140016
+ Debug.assertIsDefined(exportInfos, "Some exportInfo should match the specified symbol / moduleSymbol");
140017
+ }
139541
140018
  const useRequire = shouldUseRequire(sourceFile, program);
139542
140019
  const isValidTypeOnlyUseSite = isValidTypeOnlyAliasUseSite(getTokenAtPosition(sourceFile, position));
139543
- const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));
140020
+ const fix = Debug.checkDefined(getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences));
139544
140021
  return {
139545
140022
  moduleSpecifier: fix.moduleSpecifier,
139546
140023
  codeAction: codeFixActionToCodeAction(codeActionForFix(
@@ -139562,23 +140039,22 @@ ${lanes.join("\n")}
139562
140039
  const includeSymbolNameInDescription = symbolName2 !== symbolToken.text;
139563
140040
  return fix && codeFixActionToCodeAction(codeActionForFix({ host, formatContext, preferences }, sourceFile, symbolName2, fix, includeSymbolNameInDescription, compilerOptions, preferences));
139564
140041
  }
139565
- function getImportFixForSymbol(sourceFile, exportInfos, moduleSymbol, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) {
139566
- Debug.assert(exportInfos.some((info) => info.moduleSymbol === moduleSymbol || info.symbol.parent === moduleSymbol), "Some exportInfo should match the specified moduleSymbol");
140042
+ function getImportFixForSymbol(sourceFile, exportInfos, program, position, isValidTypeOnlyUseSite, useRequire, host, preferences) {
139567
140043
  const packageJsonImportFilter = createPackageJsonImportFilter(sourceFile, preferences, host);
139568
140044
  return getBestFix(getImportFixes(exportInfos, position, isValidTypeOnlyUseSite, useRequire, program, sourceFile, host, preferences).fixes, sourceFile, program, packageJsonImportFilter, host);
139569
140045
  }
139570
140046
  function codeFixActionToCodeAction({ description: description2, changes, commands }) {
139571
140047
  return { description: description2, changes, commands };
139572
140048
  }
139573
- function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, preferCapitalized, program, host, preferences, cancellationToken) {
140049
+ function getAllExportInfoForSymbol(importingFile, symbol, symbolName2, moduleSymbol, preferCapitalized, program, host, preferences, cancellationToken) {
139574
140050
  const getChecker = createGetChecker(program, host);
139575
140051
  return getExportInfoMap(importingFile, host, program, preferences, cancellationToken).search(importingFile.path, preferCapitalized, (name) => name === symbolName2, (info) => {
139576
- if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol) {
140052
+ if (skipAlias(info[0].symbol, getChecker(info[0].isFromPackageJson)) === symbol && info.some((i) => i.moduleSymbol === moduleSymbol || i.symbol.parent === moduleSymbol)) {
139577
140053
  return info;
139578
140054
  }
139579
140055
  });
139580
140056
  }
139581
- function getSingleExportInfoForSymbol(symbol, moduleSymbol, program, host) {
140057
+ function getSingleExportInfoForSymbol(symbol, symbolName2, moduleSymbol, program, host) {
139582
140058
  var _a2, _b;
139583
140059
  const compilerOptions = program.getCompilerOptions();
139584
140060
  const mainProgramInfo = getInfoWithChecker(
@@ -139600,7 +140076,7 @@ ${lanes.join("\n")}
139600
140076
  if (defaultInfo && skipAlias(defaultInfo.symbol, checker) === symbol) {
139601
140077
  return { symbol: defaultInfo.symbol, moduleSymbol, moduleFileName: void 0, exportKind: defaultInfo.exportKind, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };
139602
140078
  }
139603
- const named = checker.tryGetMemberInModuleExportsAndProperties(symbol.name, moduleSymbol);
140079
+ const named = checker.tryGetMemberInModuleExportsAndProperties(symbolName2, moduleSymbol);
139604
140080
  if (named && skipAlias(named, checker) === symbol) {
139605
140081
  return { symbol: named, moduleSymbol, moduleFileName: void 0, exportKind: 0 /* Named */, targetFlags: skipAlias(symbol, checker).flags, isFromPackageJson };
139606
140082
  }
@@ -147761,6 +148237,7 @@ ${lanes.join("\n")}
147761
148237
  if (originIsResolvedExport(origin)) {
147762
148238
  const resolvedData = {
147763
148239
  exportName: origin.exportName,
148240
+ exportMapKey: origin.exportMapKey,
147764
148241
  moduleSpecifier: origin.moduleSpecifier,
147765
148242
  ambientModuleName,
147766
148243
  fileName: origin.fileName,
@@ -147784,6 +148261,7 @@ ${lanes.join("\n")}
147784
148261
  const resolvedOrigin = {
147785
148262
  kind: 32 /* ResolvedExport */,
147786
148263
  exportName: data.exportName,
148264
+ exportMapKey: data.exportMapKey,
147787
148265
  moduleSpecifier: data.moduleSpecifier,
147788
148266
  symbolName: completionName,
147789
148267
  fileName: data.fileName,
@@ -148162,6 +148640,7 @@ ${lanes.join("\n")}
148162
148640
  const { moduleSpecifier, codeAction } = ts_codefix_exports.getImportCompletionAction(
148163
148641
  targetSymbol,
148164
148642
  moduleSymbol,
148643
+ data == null ? void 0 : data.exportMapKey,
148165
148644
  sourceFile,
148166
148645
  name,
148167
148646
  isJsxOpeningTagName,
@@ -148851,16 +149330,16 @@ ${lanes.join("\n")}
148851
149330
  if (detailsEntryId && !some(info, (i) => detailsEntryId.source === stripQuotes(i.moduleSymbol.name))) {
148852
149331
  return;
148853
149332
  }
148854
- const firstImportableExportInfo = find(info, isImportableExportInfo);
148855
- if (!firstImportableExportInfo) {
149333
+ info = filter(info, isImportableExportInfo);
149334
+ if (!info.length) {
148856
149335
  return;
148857
149336
  }
148858
149337
  const result = context.tryResolve(info, isFromAmbientModule) || {};
148859
149338
  if (result === "failed")
148860
149339
  return;
148861
- let exportInfo2 = firstImportableExportInfo, moduleSpecifier;
149340
+ let exportInfo2 = info[0], moduleSpecifier;
148862
149341
  if (result !== "skipped") {
148863
- ({ exportInfo: exportInfo2 = firstImportableExportInfo, moduleSpecifier } = result);
149342
+ ({ exportInfo: exportInfo2 = info[0], moduleSpecifier } = result);
148864
149343
  }
148865
149344
  const isDefaultExport = exportInfo2.exportKind === 1 /* Default */;
148866
149345
  const symbol = isDefaultExport && getLocalSymbolForExportDefault(exportInfo2.symbol) || exportInfo2.symbol;
@@ -149024,7 +149503,7 @@ ${lanes.join("\n")}
149024
149503
  return false;
149025
149504
  }
149026
149505
  function isInStringOrRegularExpressionOrTemplateLiteral(contextToken2) {
149027
- return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(createTextRangeFromSpan(createTextSpanFromNode(contextToken2)), position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));
149506
+ return (isRegularExpressionLiteral(contextToken2) || isStringTextContainingNode(contextToken2)) && (rangeContainsPositionExclusive(contextToken2, position) || position === contextToken2.end && (!!contextToken2.isUnterminated || isRegularExpressionLiteral(contextToken2)));
149028
149507
  }
149029
149508
  function tryGetObjectTypeLiteralInTypeArgumentCompletionSymbols() {
149030
149509
  const typeLiteralNode = tryGetTypeLiteralNode(contextToken);