typescript 5.3.0-dev.20230822 → 5.3.0-dev.20230824

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/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.3";
38
- version = `${versionMajorMinor}.0-dev.20230822`;
38
+ version = `${versionMajorMinor}.0-dev.20230824`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -13329,402 +13329,6 @@ ${lanes.join("\n")}
13329
13329
  const emitNode = node.emitNode;
13330
13330
  return emitNode && emitNode.internalFlags || 0;
13331
13331
  }
13332
- function getScriptTargetFeatures() {
13333
- return new Map(Object.entries({
13334
- Array: new Map(Object.entries({
13335
- es2015: [
13336
- "find",
13337
- "findIndex",
13338
- "fill",
13339
- "copyWithin",
13340
- "entries",
13341
- "keys",
13342
- "values"
13343
- ],
13344
- es2016: [
13345
- "includes"
13346
- ],
13347
- es2019: [
13348
- "flat",
13349
- "flatMap"
13350
- ],
13351
- es2022: [
13352
- "at"
13353
- ],
13354
- es2023: [
13355
- "findLastIndex",
13356
- "findLast"
13357
- ]
13358
- })),
13359
- Iterator: new Map(Object.entries({
13360
- es2015: emptyArray
13361
- })),
13362
- AsyncIterator: new Map(Object.entries({
13363
- es2015: emptyArray
13364
- })),
13365
- Atomics: new Map(Object.entries({
13366
- es2017: emptyArray
13367
- })),
13368
- SharedArrayBuffer: new Map(Object.entries({
13369
- es2017: emptyArray
13370
- })),
13371
- AsyncIterable: new Map(Object.entries({
13372
- es2018: emptyArray
13373
- })),
13374
- AsyncIterableIterator: new Map(Object.entries({
13375
- es2018: emptyArray
13376
- })),
13377
- AsyncGenerator: new Map(Object.entries({
13378
- es2018: emptyArray
13379
- })),
13380
- AsyncGeneratorFunction: new Map(Object.entries({
13381
- es2018: emptyArray
13382
- })),
13383
- RegExp: new Map(Object.entries({
13384
- es2015: [
13385
- "flags",
13386
- "sticky",
13387
- "unicode"
13388
- ],
13389
- es2018: [
13390
- "dotAll"
13391
- ]
13392
- })),
13393
- Reflect: new Map(Object.entries({
13394
- es2015: [
13395
- "apply",
13396
- "construct",
13397
- "defineProperty",
13398
- "deleteProperty",
13399
- "get",
13400
- " getOwnPropertyDescriptor",
13401
- "getPrototypeOf",
13402
- "has",
13403
- "isExtensible",
13404
- "ownKeys",
13405
- "preventExtensions",
13406
- "set",
13407
- "setPrototypeOf"
13408
- ]
13409
- })),
13410
- ArrayConstructor: new Map(Object.entries({
13411
- es2015: [
13412
- "from",
13413
- "of"
13414
- ]
13415
- })),
13416
- ObjectConstructor: new Map(Object.entries({
13417
- es2015: [
13418
- "assign",
13419
- "getOwnPropertySymbols",
13420
- "keys",
13421
- "is",
13422
- "setPrototypeOf"
13423
- ],
13424
- es2017: [
13425
- "values",
13426
- "entries",
13427
- "getOwnPropertyDescriptors"
13428
- ],
13429
- es2019: [
13430
- "fromEntries"
13431
- ],
13432
- es2022: [
13433
- "hasOwn"
13434
- ]
13435
- })),
13436
- NumberConstructor: new Map(Object.entries({
13437
- es2015: [
13438
- "isFinite",
13439
- "isInteger",
13440
- "isNaN",
13441
- "isSafeInteger",
13442
- "parseFloat",
13443
- "parseInt"
13444
- ]
13445
- })),
13446
- Math: new Map(Object.entries({
13447
- es2015: [
13448
- "clz32",
13449
- "imul",
13450
- "sign",
13451
- "log10",
13452
- "log2",
13453
- "log1p",
13454
- "expm1",
13455
- "cosh",
13456
- "sinh",
13457
- "tanh",
13458
- "acosh",
13459
- "asinh",
13460
- "atanh",
13461
- "hypot",
13462
- "trunc",
13463
- "fround",
13464
- "cbrt"
13465
- ]
13466
- })),
13467
- Map: new Map(Object.entries({
13468
- es2015: [
13469
- "entries",
13470
- "keys",
13471
- "values"
13472
- ]
13473
- })),
13474
- Set: new Map(Object.entries({
13475
- es2015: [
13476
- "entries",
13477
- "keys",
13478
- "values"
13479
- ]
13480
- })),
13481
- PromiseConstructor: new Map(Object.entries({
13482
- es2015: [
13483
- "all",
13484
- "race",
13485
- "reject",
13486
- "resolve"
13487
- ],
13488
- es2020: [
13489
- "allSettled"
13490
- ],
13491
- es2021: [
13492
- "any"
13493
- ]
13494
- })),
13495
- Symbol: new Map(Object.entries({
13496
- es2015: [
13497
- "for",
13498
- "keyFor"
13499
- ],
13500
- es2019: [
13501
- "description"
13502
- ]
13503
- })),
13504
- WeakMap: new Map(Object.entries({
13505
- es2015: [
13506
- "entries",
13507
- "keys",
13508
- "values"
13509
- ]
13510
- })),
13511
- WeakSet: new Map(Object.entries({
13512
- es2015: [
13513
- "entries",
13514
- "keys",
13515
- "values"
13516
- ]
13517
- })),
13518
- String: new Map(Object.entries({
13519
- es2015: [
13520
- "codePointAt",
13521
- "includes",
13522
- "endsWith",
13523
- "normalize",
13524
- "repeat",
13525
- "startsWith",
13526
- "anchor",
13527
- "big",
13528
- "blink",
13529
- "bold",
13530
- "fixed",
13531
- "fontcolor",
13532
- "fontsize",
13533
- "italics",
13534
- "link",
13535
- "small",
13536
- "strike",
13537
- "sub",
13538
- "sup"
13539
- ],
13540
- es2017: [
13541
- "padStart",
13542
- "padEnd"
13543
- ],
13544
- es2019: [
13545
- "trimStart",
13546
- "trimEnd",
13547
- "trimLeft",
13548
- "trimRight"
13549
- ],
13550
- es2020: [
13551
- "matchAll"
13552
- ],
13553
- es2021: [
13554
- "replaceAll"
13555
- ],
13556
- es2022: [
13557
- "at"
13558
- ]
13559
- })),
13560
- StringConstructor: new Map(Object.entries({
13561
- es2015: [
13562
- "fromCodePoint",
13563
- "raw"
13564
- ]
13565
- })),
13566
- DateTimeFormat: new Map(Object.entries({
13567
- es2017: [
13568
- "formatToParts"
13569
- ]
13570
- })),
13571
- Promise: new Map(Object.entries({
13572
- es2015: emptyArray,
13573
- es2018: [
13574
- "finally"
13575
- ]
13576
- })),
13577
- RegExpMatchArray: new Map(Object.entries({
13578
- es2018: [
13579
- "groups"
13580
- ]
13581
- })),
13582
- RegExpExecArray: new Map(Object.entries({
13583
- es2018: [
13584
- "groups"
13585
- ]
13586
- })),
13587
- Intl: new Map(Object.entries({
13588
- es2018: [
13589
- "PluralRules"
13590
- ]
13591
- })),
13592
- NumberFormat: new Map(Object.entries({
13593
- es2018: [
13594
- "formatToParts"
13595
- ]
13596
- })),
13597
- SymbolConstructor: new Map(Object.entries({
13598
- es2020: [
13599
- "matchAll"
13600
- ]
13601
- })),
13602
- DataView: new Map(Object.entries({
13603
- es2020: [
13604
- "setBigInt64",
13605
- "setBigUint64",
13606
- "getBigInt64",
13607
- "getBigUint64"
13608
- ]
13609
- })),
13610
- BigInt: new Map(Object.entries({
13611
- es2020: emptyArray
13612
- })),
13613
- RelativeTimeFormat: new Map(Object.entries({
13614
- es2020: [
13615
- "format",
13616
- "formatToParts",
13617
- "resolvedOptions"
13618
- ]
13619
- })),
13620
- Int8Array: new Map(Object.entries({
13621
- es2022: [
13622
- "at"
13623
- ],
13624
- es2023: [
13625
- "findLastIndex",
13626
- "findLast"
13627
- ]
13628
- })),
13629
- Uint8Array: new Map(Object.entries({
13630
- es2022: [
13631
- "at"
13632
- ],
13633
- es2023: [
13634
- "findLastIndex",
13635
- "findLast"
13636
- ]
13637
- })),
13638
- Uint8ClampedArray: new Map(Object.entries({
13639
- es2022: [
13640
- "at"
13641
- ],
13642
- es2023: [
13643
- "findLastIndex",
13644
- "findLast"
13645
- ]
13646
- })),
13647
- Int16Array: new Map(Object.entries({
13648
- es2022: [
13649
- "at"
13650
- ],
13651
- es2023: [
13652
- "findLastIndex",
13653
- "findLast"
13654
- ]
13655
- })),
13656
- Uint16Array: new Map(Object.entries({
13657
- es2022: [
13658
- "at"
13659
- ],
13660
- es2023: [
13661
- "findLastIndex",
13662
- "findLast"
13663
- ]
13664
- })),
13665
- Int32Array: new Map(Object.entries({
13666
- es2022: [
13667
- "at"
13668
- ],
13669
- es2023: [
13670
- "findLastIndex",
13671
- "findLast"
13672
- ]
13673
- })),
13674
- Uint32Array: new Map(Object.entries({
13675
- es2022: [
13676
- "at"
13677
- ],
13678
- es2023: [
13679
- "findLastIndex",
13680
- "findLast"
13681
- ]
13682
- })),
13683
- Float32Array: new Map(Object.entries({
13684
- es2022: [
13685
- "at"
13686
- ],
13687
- es2023: [
13688
- "findLastIndex",
13689
- "findLast"
13690
- ]
13691
- })),
13692
- Float64Array: new Map(Object.entries({
13693
- es2022: [
13694
- "at"
13695
- ],
13696
- es2023: [
13697
- "findLastIndex",
13698
- "findLast"
13699
- ]
13700
- })),
13701
- BigInt64Array: new Map(Object.entries({
13702
- es2020: emptyArray,
13703
- es2022: [
13704
- "at"
13705
- ],
13706
- es2023: [
13707
- "findLastIndex",
13708
- "findLast"
13709
- ]
13710
- })),
13711
- BigUint64Array: new Map(Object.entries({
13712
- es2020: emptyArray,
13713
- es2022: [
13714
- "at"
13715
- ],
13716
- es2023: [
13717
- "findLastIndex",
13718
- "findLast"
13719
- ]
13720
- })),
13721
- Error: new Map(Object.entries({
13722
- es2022: [
13723
- "cause"
13724
- ]
13725
- }))
13726
- }));
13727
- }
13728
13332
  function getLiteralText(node, sourceFile, flags) {
13729
13333
  if (sourceFile && canUseOriginalText(node, flags)) {
13730
13334
  return getSourceTextOfNodeFromSourceFile(sourceFile, node);
@@ -19303,7 +18907,7 @@ ${lanes.join("\n")}
19303
18907
  }
19304
18908
  return Debug.fail();
19305
18909
  }
19306
- var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
18910
+ var resolvingEmptyArray, externalHelpersModuleNameText, defaultMaximumTruncationLength, noTruncationMaximumTruncationLength, stringWriter, getScriptTargetFeatures, GetLiteralTextFlags, fullTripleSlashReferencePathRegEx, fullTripleSlashReferenceTypeReferenceDirectiveRegEx, fullTripleSlashLibReferenceRegEx, fullTripleSlashAMDReferencePathRegEx, fullTripleSlashAMDModuleRegEx, defaultLibReferenceRegEx, AssignmentKind, FunctionFlags, Associativity, OperatorPrecedence, templateSubstitutionRegExp, doubleQuoteEscapedCharsRegExp, singleQuoteEscapedCharsRegExp, backtickQuoteEscapedCharsRegExp, escapedCharsMap, nonAsciiCharacters, jsxDoubleQuoteEscapedCharsRegExp, jsxSingleQuoteEscapedCharsRegExp, jsxEscapedCharsMap, indentStrings, base64Digits, carriageReturnLineFeed, lineFeed, objectAllocator, objectAllocatorPatchers, localizedDiagnosticMessages, reservedCharacterPattern, wildcardCharCodes, commonPackageFolders, implicitExcludePathRegexPattern, filesMatcher, directoriesMatcher, excludeMatcher, wildcardMatchers, supportedTSExtensions, supportedTSExtensionsFlat, supportedTSExtensionsWithJson, supportedTSExtensionsForExtractExtension, supportedJSExtensions, supportedJSExtensionsFlat, allSupportedExtensions, allSupportedExtensionsWithJson, supportedDeclarationExtensions, supportedTSImplementationExtensions, extensionsNotSupportingExtensionlessResolution, ModuleSpecifierEnding, extensionsToRemove, emptyFileSystemEntries;
19307
18911
  var init_utilities = __esm({
19308
18912
  "src/compiler/utilities.ts"() {
19309
18913
  "use strict";
@@ -19313,6 +18917,402 @@ ${lanes.join("\n")}
19313
18917
  defaultMaximumTruncationLength = 160;
19314
18918
  noTruncationMaximumTruncationLength = 1e6;
19315
18919
  stringWriter = createSingleLineStringWriter();
18920
+ getScriptTargetFeatures = /* @__PURE__ */ memoize(
18921
+ () => new Map(Object.entries({
18922
+ Array: new Map(Object.entries({
18923
+ es2015: [
18924
+ "find",
18925
+ "findIndex",
18926
+ "fill",
18927
+ "copyWithin",
18928
+ "entries",
18929
+ "keys",
18930
+ "values"
18931
+ ],
18932
+ es2016: [
18933
+ "includes"
18934
+ ],
18935
+ es2019: [
18936
+ "flat",
18937
+ "flatMap"
18938
+ ],
18939
+ es2022: [
18940
+ "at"
18941
+ ],
18942
+ es2023: [
18943
+ "findLastIndex",
18944
+ "findLast"
18945
+ ]
18946
+ })),
18947
+ Iterator: new Map(Object.entries({
18948
+ es2015: emptyArray
18949
+ })),
18950
+ AsyncIterator: new Map(Object.entries({
18951
+ es2015: emptyArray
18952
+ })),
18953
+ Atomics: new Map(Object.entries({
18954
+ es2017: emptyArray
18955
+ })),
18956
+ SharedArrayBuffer: new Map(Object.entries({
18957
+ es2017: emptyArray
18958
+ })),
18959
+ AsyncIterable: new Map(Object.entries({
18960
+ es2018: emptyArray
18961
+ })),
18962
+ AsyncIterableIterator: new Map(Object.entries({
18963
+ es2018: emptyArray
18964
+ })),
18965
+ AsyncGenerator: new Map(Object.entries({
18966
+ es2018: emptyArray
18967
+ })),
18968
+ AsyncGeneratorFunction: new Map(Object.entries({
18969
+ es2018: emptyArray
18970
+ })),
18971
+ RegExp: new Map(Object.entries({
18972
+ es2015: [
18973
+ "flags",
18974
+ "sticky",
18975
+ "unicode"
18976
+ ],
18977
+ es2018: [
18978
+ "dotAll"
18979
+ ]
18980
+ })),
18981
+ Reflect: new Map(Object.entries({
18982
+ es2015: [
18983
+ "apply",
18984
+ "construct",
18985
+ "defineProperty",
18986
+ "deleteProperty",
18987
+ "get",
18988
+ "getOwnPropertyDescriptor",
18989
+ "getPrototypeOf",
18990
+ "has",
18991
+ "isExtensible",
18992
+ "ownKeys",
18993
+ "preventExtensions",
18994
+ "set",
18995
+ "setPrototypeOf"
18996
+ ]
18997
+ })),
18998
+ ArrayConstructor: new Map(Object.entries({
18999
+ es2015: [
19000
+ "from",
19001
+ "of"
19002
+ ]
19003
+ })),
19004
+ ObjectConstructor: new Map(Object.entries({
19005
+ es2015: [
19006
+ "assign",
19007
+ "getOwnPropertySymbols",
19008
+ "keys",
19009
+ "is",
19010
+ "setPrototypeOf"
19011
+ ],
19012
+ es2017: [
19013
+ "values",
19014
+ "entries",
19015
+ "getOwnPropertyDescriptors"
19016
+ ],
19017
+ es2019: [
19018
+ "fromEntries"
19019
+ ],
19020
+ es2022: [
19021
+ "hasOwn"
19022
+ ]
19023
+ })),
19024
+ NumberConstructor: new Map(Object.entries({
19025
+ es2015: [
19026
+ "isFinite",
19027
+ "isInteger",
19028
+ "isNaN",
19029
+ "isSafeInteger",
19030
+ "parseFloat",
19031
+ "parseInt"
19032
+ ]
19033
+ })),
19034
+ Math: new Map(Object.entries({
19035
+ es2015: [
19036
+ "clz32",
19037
+ "imul",
19038
+ "sign",
19039
+ "log10",
19040
+ "log2",
19041
+ "log1p",
19042
+ "expm1",
19043
+ "cosh",
19044
+ "sinh",
19045
+ "tanh",
19046
+ "acosh",
19047
+ "asinh",
19048
+ "atanh",
19049
+ "hypot",
19050
+ "trunc",
19051
+ "fround",
19052
+ "cbrt"
19053
+ ]
19054
+ })),
19055
+ Map: new Map(Object.entries({
19056
+ es2015: [
19057
+ "entries",
19058
+ "keys",
19059
+ "values"
19060
+ ]
19061
+ })),
19062
+ Set: new Map(Object.entries({
19063
+ es2015: [
19064
+ "entries",
19065
+ "keys",
19066
+ "values"
19067
+ ]
19068
+ })),
19069
+ PromiseConstructor: new Map(Object.entries({
19070
+ es2015: [
19071
+ "all",
19072
+ "race",
19073
+ "reject",
19074
+ "resolve"
19075
+ ],
19076
+ es2020: [
19077
+ "allSettled"
19078
+ ],
19079
+ es2021: [
19080
+ "any"
19081
+ ]
19082
+ })),
19083
+ Symbol: new Map(Object.entries({
19084
+ es2015: [
19085
+ "for",
19086
+ "keyFor"
19087
+ ],
19088
+ es2019: [
19089
+ "description"
19090
+ ]
19091
+ })),
19092
+ WeakMap: new Map(Object.entries({
19093
+ es2015: [
19094
+ "entries",
19095
+ "keys",
19096
+ "values"
19097
+ ]
19098
+ })),
19099
+ WeakSet: new Map(Object.entries({
19100
+ es2015: [
19101
+ "entries",
19102
+ "keys",
19103
+ "values"
19104
+ ]
19105
+ })),
19106
+ String: new Map(Object.entries({
19107
+ es2015: [
19108
+ "codePointAt",
19109
+ "includes",
19110
+ "endsWith",
19111
+ "normalize",
19112
+ "repeat",
19113
+ "startsWith",
19114
+ "anchor",
19115
+ "big",
19116
+ "blink",
19117
+ "bold",
19118
+ "fixed",
19119
+ "fontcolor",
19120
+ "fontsize",
19121
+ "italics",
19122
+ "link",
19123
+ "small",
19124
+ "strike",
19125
+ "sub",
19126
+ "sup"
19127
+ ],
19128
+ es2017: [
19129
+ "padStart",
19130
+ "padEnd"
19131
+ ],
19132
+ es2019: [
19133
+ "trimStart",
19134
+ "trimEnd",
19135
+ "trimLeft",
19136
+ "trimRight"
19137
+ ],
19138
+ es2020: [
19139
+ "matchAll"
19140
+ ],
19141
+ es2021: [
19142
+ "replaceAll"
19143
+ ],
19144
+ es2022: [
19145
+ "at"
19146
+ ]
19147
+ })),
19148
+ StringConstructor: new Map(Object.entries({
19149
+ es2015: [
19150
+ "fromCodePoint",
19151
+ "raw"
19152
+ ]
19153
+ })),
19154
+ DateTimeFormat: new Map(Object.entries({
19155
+ es2017: [
19156
+ "formatToParts"
19157
+ ]
19158
+ })),
19159
+ Promise: new Map(Object.entries({
19160
+ es2015: emptyArray,
19161
+ es2018: [
19162
+ "finally"
19163
+ ]
19164
+ })),
19165
+ RegExpMatchArray: new Map(Object.entries({
19166
+ es2018: [
19167
+ "groups"
19168
+ ]
19169
+ })),
19170
+ RegExpExecArray: new Map(Object.entries({
19171
+ es2018: [
19172
+ "groups"
19173
+ ]
19174
+ })),
19175
+ Intl: new Map(Object.entries({
19176
+ es2018: [
19177
+ "PluralRules"
19178
+ ]
19179
+ })),
19180
+ NumberFormat: new Map(Object.entries({
19181
+ es2018: [
19182
+ "formatToParts"
19183
+ ]
19184
+ })),
19185
+ SymbolConstructor: new Map(Object.entries({
19186
+ es2020: [
19187
+ "matchAll"
19188
+ ]
19189
+ })),
19190
+ DataView: new Map(Object.entries({
19191
+ es2020: [
19192
+ "setBigInt64",
19193
+ "setBigUint64",
19194
+ "getBigInt64",
19195
+ "getBigUint64"
19196
+ ]
19197
+ })),
19198
+ BigInt: new Map(Object.entries({
19199
+ es2020: emptyArray
19200
+ })),
19201
+ RelativeTimeFormat: new Map(Object.entries({
19202
+ es2020: [
19203
+ "format",
19204
+ "formatToParts",
19205
+ "resolvedOptions"
19206
+ ]
19207
+ })),
19208
+ Int8Array: new Map(Object.entries({
19209
+ es2022: [
19210
+ "at"
19211
+ ],
19212
+ es2023: [
19213
+ "findLastIndex",
19214
+ "findLast"
19215
+ ]
19216
+ })),
19217
+ Uint8Array: new Map(Object.entries({
19218
+ es2022: [
19219
+ "at"
19220
+ ],
19221
+ es2023: [
19222
+ "findLastIndex",
19223
+ "findLast"
19224
+ ]
19225
+ })),
19226
+ Uint8ClampedArray: new Map(Object.entries({
19227
+ es2022: [
19228
+ "at"
19229
+ ],
19230
+ es2023: [
19231
+ "findLastIndex",
19232
+ "findLast"
19233
+ ]
19234
+ })),
19235
+ Int16Array: new Map(Object.entries({
19236
+ es2022: [
19237
+ "at"
19238
+ ],
19239
+ es2023: [
19240
+ "findLastIndex",
19241
+ "findLast"
19242
+ ]
19243
+ })),
19244
+ Uint16Array: new Map(Object.entries({
19245
+ es2022: [
19246
+ "at"
19247
+ ],
19248
+ es2023: [
19249
+ "findLastIndex",
19250
+ "findLast"
19251
+ ]
19252
+ })),
19253
+ Int32Array: new Map(Object.entries({
19254
+ es2022: [
19255
+ "at"
19256
+ ],
19257
+ es2023: [
19258
+ "findLastIndex",
19259
+ "findLast"
19260
+ ]
19261
+ })),
19262
+ Uint32Array: new Map(Object.entries({
19263
+ es2022: [
19264
+ "at"
19265
+ ],
19266
+ es2023: [
19267
+ "findLastIndex",
19268
+ "findLast"
19269
+ ]
19270
+ })),
19271
+ Float32Array: new Map(Object.entries({
19272
+ es2022: [
19273
+ "at"
19274
+ ],
19275
+ es2023: [
19276
+ "findLastIndex",
19277
+ "findLast"
19278
+ ]
19279
+ })),
19280
+ Float64Array: new Map(Object.entries({
19281
+ es2022: [
19282
+ "at"
19283
+ ],
19284
+ es2023: [
19285
+ "findLastIndex",
19286
+ "findLast"
19287
+ ]
19288
+ })),
19289
+ BigInt64Array: new Map(Object.entries({
19290
+ es2020: emptyArray,
19291
+ es2022: [
19292
+ "at"
19293
+ ],
19294
+ es2023: [
19295
+ "findLastIndex",
19296
+ "findLast"
19297
+ ]
19298
+ })),
19299
+ BigUint64Array: new Map(Object.entries({
19300
+ es2020: emptyArray,
19301
+ es2022: [
19302
+ "at"
19303
+ ],
19304
+ es2023: [
19305
+ "findLastIndex",
19306
+ "findLast"
19307
+ ]
19308
+ })),
19309
+ Error: new Map(Object.entries({
19310
+ es2022: [
19311
+ "cause"
19312
+ ]
19313
+ }))
19314
+ }))
19315
+ );
19316
19316
  GetLiteralTextFlags = /* @__PURE__ */ ((GetLiteralTextFlags2) => {
19317
19317
  GetLiteralTextFlags2[GetLiteralTextFlags2["None"] = 0] = "None";
19318
19318
  GetLiteralTextFlags2[GetLiteralTextFlags2["NeverAsciiEscape"] = 1] = "NeverAsciiEscape";
@@ -51099,11 +51099,17 @@ ${lanes.join("\n")}
51099
51099
  const constraintNode = constraint && typeToTypeNodeHelper(constraint, context);
51100
51100
  return typeParameterToDeclarationWithConstraint(type, context, constraintNode);
51101
51101
  }
51102
- function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
51103
- let parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);
51104
- if (!parameterDeclaration && !isTransientSymbol(parameterSymbol)) {
51105
- parameterDeclaration = getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */);
51102
+ function getEffectiveParameterDeclaration(parameterSymbol) {
51103
+ const parameterDeclaration = getDeclarationOfKind(parameterSymbol, 169 /* Parameter */);
51104
+ if (parameterDeclaration) {
51105
+ return parameterDeclaration;
51106
51106
  }
51107
+ if (!isTransientSymbol(parameterSymbol)) {
51108
+ return getDeclarationOfKind(parameterSymbol, 348 /* JSDocParameterTag */);
51109
+ }
51110
+ }
51111
+ function symbolToParameterDeclaration(parameterSymbol, context, preserveModifierFlags, privateSymbolVisitor, bundledImports) {
51112
+ const parameterDeclaration = getEffectiveParameterDeclaration(parameterSymbol);
51107
51113
  let parameterType = getTypeOfSymbol(parameterSymbol);
51108
51114
  if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
51109
51115
  parameterType = getOptionalType(parameterType);
@@ -51112,7 +51118,7 @@ ${lanes.join("\n")}
51112
51118
  const modifiers = !(context.flags & 8192 /* OmitParameterModifiers */) && preserveModifierFlags && parameterDeclaration && canHaveModifiers(parameterDeclaration) ? map(getModifiers(parameterDeclaration), factory.cloneNode) : void 0;
51113
51119
  const isRest = parameterDeclaration && isRestParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 32768 /* RestParameter */;
51114
51120
  const dotDotDotToken = isRest ? factory.createToken(26 /* DotDotDotToken */) : void 0;
51115
- const name = parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol);
51121
+ const name = parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context);
51116
51122
  const isOptional = parameterDeclaration && isOptionalParameter(parameterDeclaration) || getCheckFlags(parameterSymbol) & 16384 /* OptionalParameter */;
51117
51123
  const questionToken = isOptional ? factory.createToken(58 /* QuestionToken */) : void 0;
51118
51124
  const parameterNode = factory.createParameterDeclaration(
@@ -51126,6 +51132,9 @@ ${lanes.join("\n")}
51126
51132
  );
51127
51133
  context.approximateLength += symbolName(parameterSymbol).length + 3;
51128
51134
  return parameterNode;
51135
+ }
51136
+ function parameterToParameterDeclarationName(parameterSymbol, parameterDeclaration, context) {
51137
+ return parameterDeclaration ? parameterDeclaration.name ? parameterDeclaration.name.kind === 80 /* Identifier */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name), 16777216 /* NoAsciiEscaping */) : parameterDeclaration.name.kind === 166 /* QualifiedName */ ? setEmitFlags(factory.cloneNode(parameterDeclaration.name.right), 16777216 /* NoAsciiEscaping */) : cloneBindingName(parameterDeclaration.name) : symbolName(parameterSymbol) : symbolName(parameterSymbol);
51129
51138
  function cloneBindingName(node) {
51130
51139
  return elideInitializerAndSetEmitFlags(node);
51131
51140
  function elideInitializerAndSetEmitFlags(node2) {
@@ -53106,6 +53115,21 @@ ${lanes.join("\n")}
53106
53115
  if (p.flags & 98304 /* Accessor */ && useAccessors) {
53107
53116
  const result = [];
53108
53117
  if (p.flags & 65536 /* SetAccessor */) {
53118
+ const setter = p.declarations && forEach(p.declarations, (d) => {
53119
+ if (d.kind === 178 /* SetAccessor */) {
53120
+ return d;
53121
+ }
53122
+ if (isCallExpression(d) && isBindableObjectDefinePropertyCall(d)) {
53123
+ return forEach(d.arguments[2].properties, (propDecl) => {
53124
+ const id = getNameOfDeclaration(propDecl);
53125
+ if (!!id && isIdentifier(id) && idText(id) === "set") {
53126
+ return propDecl;
53127
+ }
53128
+ });
53129
+ }
53130
+ });
53131
+ Debug.assert(setter && isFunctionLikeDeclaration(setter));
53132
+ const paramSymbol = getSignatureFromDeclaration(setter).parameters[0];
53109
53133
  result.push(setTextRange(
53110
53134
  factory.createSetAccessorDeclaration(
53111
53135
  factory.createModifiersFromModifierFlags(flag),
@@ -53115,7 +53139,7 @@ ${lanes.join("\n")}
53115
53139
  void 0,
53116
53140
  /*dotDotDotToken*/
53117
53141
  void 0,
53118
- "arg",
53142
+ paramSymbol ? parameterToParameterDeclarationName(paramSymbol, getEffectiveParameterDeclaration(paramSymbol), context) : "value",
53119
53143
  /*questionToken*/
53120
53144
  void 0,
53121
53145
  isPrivate ? void 0 : serializeTypeForDeclaration(context, getTypeOfSymbol(p), p, enclosingDeclaration, includePrivateSymbol, bundled)
@@ -66465,12 +66489,14 @@ ${lanes.join("\n")}
66465
66489
  }
66466
66490
  function inferFromSignatures(source, target, kind) {
66467
66491
  const sourceSignatures = getSignaturesOfType(source, kind);
66468
- const targetSignatures = getSignaturesOfType(target, kind);
66469
66492
  const sourceLen = sourceSignatures.length;
66470
- const targetLen = targetSignatures.length;
66471
- const len = sourceLen < targetLen ? sourceLen : targetLen;
66472
- for (let i = 0; i < len; i++) {
66473
- inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]));
66493
+ if (sourceLen > 0) {
66494
+ const targetSignatures = getSignaturesOfType(target, kind);
66495
+ const targetLen = targetSignatures.length;
66496
+ for (let i = 0; i < targetLen; i++) {
66497
+ const sourceIndex = Math.max(sourceLen - targetLen + i, 0);
66498
+ inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i]));
66499
+ }
66474
66500
  }
66475
66501
  }
66476
66502
  function inferFromSignature(source, target) {
@@ -68006,7 +68032,7 @@ ${lanes.join("\n")}
68006
68032
  return void 0;
68007
68033
  }
68008
68034
  function getDiscriminantPropertyAccess(expr, computedType) {
68009
- const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
68035
+ const type = !(computedType.flags & 1048576 /* Union */) && declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
68010
68036
  if (type.flags & 1048576 /* Union */) {
68011
68037
  const access = getCandidateDiscriminantPropertyAccess(expr);
68012
68038
  if (access) {
@@ -163988,11 +164014,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
163988
164014
  function isSignatureSupportingReturnAnnotation(node) {
163989
164015
  return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
163990
164016
  }
163991
- function addParameterHints(text, parameter, position, isFirstVariadicArgument, sourceFile) {
164017
+ function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
163992
164018
  let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
163993
164019
  let displayParts;
163994
164020
  if (shouldUseInteractiveInlayHints(preferences)) {
163995
- displayParts = [getNodeDisplayPart(hintText, parameter, sourceFile), { text: ":" }];
164021
+ displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
163996
164022
  hintText = "";
163997
164023
  } else {
163998
164024
  hintText += ":";
@@ -164064,7 +164090,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164064
164090
  if (!signature || !candidates.length) {
164065
164091
  return;
164066
164092
  }
164067
- const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
164068
164093
  let signatureParamPos = 0;
164069
164094
  for (const originalArg of args) {
164070
164095
  const arg = skipParentheses(originalArg);
@@ -164099,7 +164124,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164099
164124
  if (leadingCommentsContainsParameterName(arg, name)) {
164100
164125
  continue;
164101
164126
  }
164102
- addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument, sourceFile);
164127
+ addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
164103
164128
  }
164104
164129
  }
164105
164130
  }
@@ -164235,7 +164260,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164235
164260
  }
164236
164261
  return true;
164237
164262
  }
164238
- function getNodeDisplayPart(text, node, sourceFile) {
164263
+ function getNodeDisplayPart(text, node) {
164264
+ const sourceFile = node.getSourceFile();
164239
164265
  return {
164240
164266
  text,
164241
164267
  span: createTextSpanFromNode(node, sourceFile),
@@ -167123,11 +167149,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167123
167149
  if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) {
167124
167150
  const declaration = symbol.valueDeclaration;
167125
167151
  const parent2 = declaration.parent;
167126
- if (isIdentifier(declaration.name) && isObjectBindingPattern(parent2)) {
167127
- const name = getTextOfIdentifierOrLiteral(declaration.name);
167152
+ const name = declaration.propertyName || declaration.name;
167153
+ if (isIdentifier(name) && isObjectBindingPattern(parent2)) {
167154
+ const propertyName = getTextOfIdentifierOrLiteral(name);
167128
167155
  const objectType = typeChecker.getTypeAtLocation(parent2);
167129
167156
  documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => {
167130
- const prop = t.getProperty(name);
167157
+ const prop = t.getProperty(propertyName);
167131
167158
  return prop ? prop.getDocumentationComment(typeChecker) : void 0;
167132
167159
  }) || emptyArray;
167133
167160
  }
@@ -180978,14 +181005,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
180978
181005
  return {
180979
181006
  ...hint,
180980
181007
  position: scriptInfo.positionToLineOffset(position),
180981
- displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => ({
180982
- text,
180983
- span: span && {
180984
- start: scriptInfo.positionToLineOffset(span.start),
180985
- end: scriptInfo.positionToLineOffset(span.start + span.length),
180986
- file: file2
181008
+ displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {
181009
+ if (span) {
181010
+ Debug.assertIsDefined(file2, "Target file should be defined together with its span.");
181011
+ const scriptInfo2 = this.projectService.getScriptInfo(file2);
181012
+ return {
181013
+ text,
181014
+ span: {
181015
+ start: scriptInfo2.positionToLineOffset(span.start),
181016
+ end: scriptInfo2.positionToLineOffset(span.start + span.length),
181017
+ file: file2
181018
+ }
181019
+ };
181020
+ } else {
181021
+ return { text };
180987
181022
  }
180988
- }))
181023
+ })
180989
181024
  };
180990
181025
  });
180991
181026
  }