typescript 5.3.0-dev.20230823 → 5.3.0-dev.20230825

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.20230823`;
38
+ version = `${versionMajorMinor}.0-dev.20230825`;
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";
@@ -32436,7 +32436,9 @@ ${lanes.join("\n")}
32436
32436
  let dotDotDotToken;
32437
32437
  let expression;
32438
32438
  if (token() !== 20 /* CloseBraceToken */) {
32439
- dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
32439
+ if (!inExpressionContext) {
32440
+ dotDotDotToken = parseOptionalToken(26 /* DotDotDotToken */);
32441
+ }
32440
32442
  expression = parseExpression();
32441
32443
  }
32442
32444
  if (inExpressionContext) {
@@ -46887,6 +46889,9 @@ ${lanes.join("\n")}
46887
46889
  const sourceFiles = host.getSourceFiles();
46888
46890
  return sourceFiles.indexOf(declarationFile) <= sourceFiles.indexOf(useFile);
46889
46891
  }
46892
+ if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) {
46893
+ return true;
46894
+ }
46890
46895
  if (declaration.pos <= usage.pos && !(isPropertyDeclaration(declaration) && isThisProperty(usage.parent) && !declaration.initializer && !declaration.exclamationToken)) {
46891
46896
  if (declaration.kind === 208 /* BindingElement */) {
46892
46897
  const errorBindingElement = getAncestor(usage, 208 /* BindingElement */);
@@ -46916,9 +46921,6 @@ ${lanes.join("\n")}
46916
46921
  if (usage.kind === 277 /* ExportAssignment */ && usage.isExportEquals) {
46917
46922
  return true;
46918
46923
  }
46919
- if (!!(usage.flags & 16777216 /* JSDoc */) || isInTypeQuery(usage) || isInAmbientOrTypeNode(usage)) {
46920
- return true;
46921
- }
46922
46924
  if (isUsedInFunctionOrInstanceProperty(usage, declaration)) {
46923
46925
  if (emitStandardClassFields && getContainingClass(declaration) && (isPropertyDeclaration(declaration) || isParameterPropertyDeclaration(declaration, declaration.parent))) {
46924
46926
  return !isPropertyImmediatelyReferencedWithinDeclaration(
@@ -53128,8 +53130,8 @@ ${lanes.join("\n")}
53128
53130
  });
53129
53131
  }
53130
53132
  });
53131
- Debug.assert(setter && isFunctionLikeDeclaration(setter));
53132
- const paramSymbol = getSignatureFromDeclaration(setter).parameters[0];
53133
+ Debug.assert(!!setter);
53134
+ const paramSymbol = isFunctionLikeDeclaration(setter) ? getSignatureFromDeclaration(setter).parameters[0] : void 0;
53133
53135
  result.push(setTextRange(
53134
53136
  factory.createSetAccessorDeclaration(
53135
53137
  factory.createModifiersFromModifierFlags(flag),
@@ -53905,7 +53907,7 @@ ${lanes.join("\n")}
53905
53907
  const pattern = declaration.parent;
53906
53908
  if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) {
53907
53909
  parentType = getNonNullableType(parentType);
53908
- } else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) {
53910
+ } else if (strictNullChecks && pattern.parent.initializer && !hasTypeFacts(getTypeOfInitializer(pattern.parent.initializer), 65536 /* EQUndefined */)) {
53909
53911
  parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */);
53910
53912
  }
53911
53913
  let type;
@@ -53948,7 +53950,7 @@ ${lanes.join("\n")}
53948
53950
  return type;
53949
53951
  }
53950
53952
  if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) {
53951
- return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type;
53953
+ return strictNullChecks && !hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type;
53952
53954
  }
53953
53955
  return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */));
53954
53956
  }
@@ -62056,7 +62058,7 @@ ${lanes.join("\n")}
62056
62058
  if (sourceType && targetType) {
62057
62059
  const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
62058
62060
  const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
62059
- const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */);
62061
+ const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && getTypeFacts(sourceType, 50331648 /* IsUndefinedOrNull */) === getTypeFacts(targetType, 50331648 /* IsUndefinedOrNull */);
62060
62062
  let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes(
62061
62063
  sourceType,
62062
62064
  targetType,
@@ -65213,7 +65215,7 @@ ${lanes.join("\n")}
65213
65215
  return value.base10Value === "0";
65214
65216
  }
65215
65217
  function removeDefinitelyFalsyTypes(type) {
65216
- return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */));
65218
+ return filterType(type, (t) => hasTypeFacts(t, 4194304 /* Truthy */));
65217
65219
  }
65218
65220
  function extractDefinitelyFalsyTypes(type) {
65219
65221
  return mapType(type, getDefinitelyFalsyPartOfType);
@@ -66489,12 +66491,14 @@ ${lanes.join("\n")}
66489
66491
  }
66490
66492
  function inferFromSignatures(source, target, kind) {
66491
66493
  const sourceSignatures = getSignaturesOfType(source, kind);
66492
- const targetSignatures = getSignaturesOfType(target, kind);
66493
66494
  const sourceLen = sourceSignatures.length;
66494
- const targetLen = targetSignatures.length;
66495
- const len = sourceLen < targetLen ? sourceLen : targetLen;
66496
- for (let i = 0; i < len; i++) {
66497
- inferFromSignature(getBaseSignature(sourceSignatures[sourceLen - len + i]), getErasedSignature(targetSignatures[targetLen - len + i]));
66495
+ if (sourceLen > 0) {
66496
+ const targetSignatures = getSignaturesOfType(target, kind);
66497
+ const targetLen = targetSignatures.length;
66498
+ for (let i = 0; i < targetLen; i++) {
66499
+ const sourceIndex = Math.max(sourceLen - targetLen + i, 0);
66500
+ inferFromSignature(getBaseSignature(sourceSignatures[sourceIndex]), getErasedSignature(targetSignatures[i]));
66501
+ }
66498
66502
  }
66499
66503
  }
66500
66504
  function inferFromSignature(source, target) {
@@ -66956,7 +66960,13 @@ ${lanes.join("\n")}
66956
66960
  const resolved = resolveStructuredTypeMembers(type);
66957
66961
  return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
66958
66962
  }
66959
- function getTypeFacts(type) {
66963
+ function getTypeFacts(type, mask2) {
66964
+ return getTypeFactsWorker(type, mask2) & mask2;
66965
+ }
66966
+ function hasTypeFacts(type, mask2) {
66967
+ return getTypeFacts(type, mask2) !== 0;
66968
+ }
66969
+ function getTypeFactsWorker(type, callerOnlyNeeds) {
66960
66970
  if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
66961
66971
  type = getBaseConstraintOfType(type) || unknownType;
66962
66972
  }
@@ -66989,6 +66999,10 @@ ${lanes.join("\n")}
66989
66999
  return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
66990
67000
  }
66991
67001
  if (flags & 524288 /* Object */) {
67002
+ const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */;
67003
+ if ((callerOnlyNeeds & possibleFacts) === 0) {
67004
+ return 0;
67005
+ }
66992
67006
  return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
66993
67007
  }
66994
67008
  if (flags & 16384 /* Void */) {
@@ -67010,20 +67024,20 @@ ${lanes.join("\n")}
67010
67024
  return 0 /* None */;
67011
67025
  }
67012
67026
  if (flags & 1048576 /* Union */) {
67013
- return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
67027
+ return reduceLeft(type.types, (facts, t) => facts | getTypeFactsWorker(t, callerOnlyNeeds), 0 /* None */);
67014
67028
  }
67015
67029
  if (flags & 2097152 /* Intersection */) {
67016
- return getIntersectionTypeFacts(type);
67030
+ return getIntersectionTypeFacts(type, callerOnlyNeeds);
67017
67031
  }
67018
67032
  return 83886079 /* UnknownFacts */;
67019
67033
  }
67020
- function getIntersectionTypeFacts(type) {
67034
+ function getIntersectionTypeFacts(type, callerOnlyNeeds) {
67021
67035
  const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */);
67022
67036
  let oredFacts = 0 /* None */;
67023
67037
  let andedFacts = 134217727 /* All */;
67024
67038
  for (const t of type.types) {
67025
67039
  if (!(ignoreObjects && t.flags & 524288 /* Object */)) {
67026
- const f = getTypeFacts(t);
67040
+ const f = getTypeFactsWorker(t, callerOnlyNeeds);
67027
67041
  oredFacts |= f;
67028
67042
  andedFacts &= f;
67029
67043
  }
@@ -67031,19 +67045,19 @@ ${lanes.join("\n")}
67031
67045
  return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
67032
67046
  }
67033
67047
  function getTypeWithFacts(type, include) {
67034
- return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
67048
+ return filterType(type, (t) => hasTypeFacts(t, include));
67035
67049
  }
67036
67050
  function getAdjustedTypeWithFacts(type, facts) {
67037
67051
  const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
67038
67052
  if (strictNullChecks) {
67039
67053
  switch (facts) {
67040
67054
  case 524288 /* NEUndefined */:
67041
- return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t);
67055
+ return mapType(reduced, (t) => hasTypeFacts(t, 65536 /* EQUndefined */) ? getIntersectionType([t, hasTypeFacts(t, 131072 /* EQNull */) && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t);
67042
67056
  case 1048576 /* NENull */:
67043
- return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t);
67057
+ return mapType(reduced, (t) => hasTypeFacts(t, 131072 /* EQNull */) ? getIntersectionType([t, hasTypeFacts(t, 65536 /* EQUndefined */) && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t);
67044
67058
  case 2097152 /* NEUndefinedOrNull */:
67045
67059
  case 4194304 /* Truthy */:
67046
- return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t);
67060
+ return mapType(reduced, (t) => hasTypeFacts(t, 262144 /* EQUndefinedOrNull */) ? getGlobalNonNullableTypeInstantiation(t) : t);
67047
67061
  }
67048
67062
  }
67049
67063
  return reduced;
@@ -68030,7 +68044,7 @@ ${lanes.join("\n")}
68030
68044
  return void 0;
68031
68045
  }
68032
68046
  function getDiscriminantPropertyAccess(expr, computedType) {
68033
- const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
68047
+ const type = !(computedType.flags & 1048576 /* Union */) && declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
68034
68048
  if (type.flags & 1048576 /* Union */) {
68035
68049
  const access = getCandidateDiscriminantPropertyAccess(expr);
68036
68050
  if (access) {
@@ -68380,14 +68394,14 @@ ${lanes.join("\n")}
68380
68394
  // the constituent based on its type facts. We use the strict subtype relation because it treats `object`
68381
68395
  // as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`,
68382
68396
  // but are classified as "function" according to `typeof`.
68383
- isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : (
68397
+ isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? hasTypeFacts(t, facts) ? t : neverType : (
68384
68398
  // We next check if the consituent is a supertype of the implied type. If so, we substitute the implied
68385
68399
  // type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`.
68386
68400
  isTypeSubtypeOf(impliedType, t) ? impliedType : (
68387
68401
  // Neither the constituent nor the implied type is a subtype of the other, however their domains may still
68388
68402
  // overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate
68389
68403
  // possible overlap, we form an intersection. Otherwise, we eliminate the constituent.
68390
- getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType
68404
+ hasTypeFacts(t, facts) ? getIntersectionType([t, impliedType]) : neverType
68391
68405
  )
68392
68406
  )
68393
68407
  ));
@@ -68401,7 +68415,7 @@ ${lanes.join("\n")}
68401
68415
  const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
68402
68416
  if (hasDefaultClause) {
68403
68417
  const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses);
68404
- return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts);
68418
+ return filterType(type, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);
68405
68419
  }
68406
68420
  const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);
68407
68421
  return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType));
@@ -68539,7 +68553,7 @@ ${lanes.join("\n")}
68539
68553
  false
68540
68554
  );
68541
68555
  }
68542
- if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) {
68556
+ if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !hasTypeFacts(predicate.type, 65536 /* EQUndefined */)) {
68543
68557
  type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
68544
68558
  }
68545
68559
  const access = getDiscriminantPropertyAccess(predicateArgument, type);
@@ -68673,7 +68687,7 @@ ${lanes.join("\n")}
68673
68687
  reportCircularityError(declaration.symbol);
68674
68688
  return true;
68675
68689
  }
68676
- const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */);
68690
+ const containsUndefined = !!hasTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */), 16777216 /* IsUndefined */);
68677
68691
  if (!popTypeResolution()) {
68678
68692
  reportCircularityError(declaration.symbol);
68679
68693
  return true;
@@ -68683,7 +68697,7 @@ ${lanes.join("\n")}
68683
68697
  return links.parameterInitializerContainsUndefined;
68684
68698
  }
68685
68699
  function removeOptionalityFromDeclaredType(declaredType, declaration) {
68686
- const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration);
68700
+ const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && hasTypeFacts(declaredType, 16777216 /* IsUndefined */) && !parameterInitializerContainsUndefined(declaration);
68687
68701
  return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;
68688
68702
  }
68689
68703
  function isConstraintPosition(type, node) {
@@ -71513,7 +71527,7 @@ ${lanes.join("\n")}
71513
71527
  return checkNonNullType(checkExpression(node), node);
71514
71528
  }
71515
71529
  function isNullableType(type) {
71516
- return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */);
71530
+ return hasTypeFacts(type, 50331648 /* IsUndefinedOrNull */);
71517
71531
  }
71518
71532
  function getNonNullableTypeIfNeeded(type) {
71519
71533
  return isNullableType(type) ? getNonNullableType(type) : type;
@@ -71559,7 +71573,7 @@ ${lanes.join("\n")}
71559
71573
  error2(node, Diagnostics.Object_is_of_type_unknown);
71560
71574
  return errorType;
71561
71575
  }
71562
- const facts = getTypeFacts(type);
71576
+ const facts = getTypeFacts(type, 50331648 /* IsUndefinedOrNull */);
71563
71577
  if (facts & 50331648 /* IsUndefinedOrNull */) {
71564
71578
  reportError(node, facts);
71565
71579
  const t = getNonNullableType(type);
@@ -75339,7 +75353,7 @@ ${lanes.join("\n")}
75339
75353
  if (operandConstraint.flags & 3 /* AnyOrUnknown */) {
75340
75354
  return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */;
75341
75355
  }
75342
- return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts);
75356
+ return !someType(operandConstraint, (t) => getTypeFacts(t, notEqualFacts) === notEqualFacts);
75343
75357
  }
75344
75358
  const type = checkExpressionCached(node.expression);
75345
75359
  if (!isLiteralType(type)) {
@@ -75657,14 +75671,15 @@ ${lanes.join("\n")}
75657
75671
  if (symbol) {
75658
75672
  if (isReadonlySymbol(symbol)) {
75659
75673
  error2(expr, Diagnostics.The_operand_of_a_delete_operator_cannot_be_a_read_only_property);
75674
+ } else {
75675
+ checkDeleteExpressionMustBeOptional(expr, symbol);
75660
75676
  }
75661
- checkDeleteExpressionMustBeOptional(expr, symbol);
75662
75677
  }
75663
75678
  return booleanType;
75664
75679
  }
75665
75680
  function checkDeleteExpressionMustBeOptional(expr, symbol) {
75666
75681
  const type = getTypeOfSymbol(symbol);
75667
- if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) {
75682
+ if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : hasTypeFacts(type, 16777216 /* IsUndefined */))) {
75668
75683
  error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
75669
75684
  }
75670
75685
  }
@@ -75799,7 +75814,7 @@ ${lanes.join("\n")}
75799
75814
  return getUnaryResultType(operandType);
75800
75815
  case 54 /* ExclamationToken */:
75801
75816
  checkTruthinessOfType(operandType, node.operand);
75802
- const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */);
75817
+ const facts = getTypeFacts(operandType, 4194304 /* Truthy */ | 8388608 /* Falsy */);
75803
75818
  return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType;
75804
75819
  case 46 /* PlusPlusToken */:
75805
75820
  case 47 /* MinusMinusToken */:
@@ -76030,7 +76045,7 @@ ${lanes.join("\n")}
76030
76045
  if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) {
76031
76046
  const prop = exprOrAssignment;
76032
76047
  if (prop.objectAssignmentInitializer) {
76033
- if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) {
76048
+ if (strictNullChecks && !hasTypeFacts(checkExpression(prop.objectAssignmentInitializer), 16777216 /* IsUndefined */)) {
76034
76049
  sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */);
76035
76050
  }
76036
76051
  checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
@@ -76442,7 +76457,7 @@ ${lanes.join("\n")}
76442
76457
  return checkInExpression(left, right, leftType, rightType);
76443
76458
  case 56 /* AmpersandAmpersandToken */:
76444
76459
  case 77 /* AmpersandAmpersandEqualsToken */: {
76445
- const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType;
76460
+ const resultType2 = hasTypeFacts(leftType, 4194304 /* Truthy */) ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType;
76446
76461
  if (operator === 77 /* AmpersandAmpersandEqualsToken */) {
76447
76462
  checkAssignmentOperator(rightType);
76448
76463
  }
@@ -76450,7 +76465,7 @@ ${lanes.join("\n")}
76450
76465
  }
76451
76466
  case 57 /* BarBarToken */:
76452
76467
  case 76 /* BarBarEqualsToken */: {
76453
- const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType;
76468
+ const resultType2 = hasTypeFacts(leftType, 8388608 /* Falsy */) ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType;
76454
76469
  if (operator === 76 /* BarBarEqualsToken */) {
76455
76470
  checkAssignmentOperator(rightType);
76456
76471
  }
@@ -76458,7 +76473,7 @@ ${lanes.join("\n")}
76458
76473
  }
76459
76474
  case 61 /* QuestionQuestionToken */:
76460
76475
  case 78 /* QuestionQuestionEqualsToken */: {
76461
- const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType;
76476
+ const resultType2 = hasTypeFacts(leftType, 262144 /* EQUndefinedOrNull */) ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType;
76462
76477
  if (operator === 78 /* QuestionQuestionEqualsToken */) {
76463
76478
  checkAssignmentOperator(rightType);
76464
76479
  }
@@ -79775,7 +79790,7 @@ ${lanes.join("\n")}
79775
79790
  }
79776
79791
  const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
79777
79792
  const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
79778
- if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
79793
+ if (!hasTypeFacts(type, 4194304 /* Truthy */) || isPropertyExpressionCast)
79779
79794
  return;
79780
79795
  const callSignatures = getSignaturesOfType(type, 0 /* Call */);
79781
79796
  const isPromise = !!getAwaitedTypeOfPromise(type);
@@ -164012,11 +164027,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164012
164027
  function isSignatureSupportingReturnAnnotation(node) {
164013
164028
  return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
164014
164029
  }
164015
- function addParameterHints(text, parameter, position, isFirstVariadicArgument, sourceFile) {
164030
+ function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
164016
164031
  let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
164017
164032
  let displayParts;
164018
164033
  if (shouldUseInteractiveInlayHints(preferences)) {
164019
- displayParts = [getNodeDisplayPart(hintText, parameter, sourceFile), { text: ":" }];
164034
+ displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
164020
164035
  hintText = "";
164021
164036
  } else {
164022
164037
  hintText += ":";
@@ -164088,7 +164103,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164088
164103
  if (!signature || !candidates.length) {
164089
164104
  return;
164090
164105
  }
164091
- const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
164092
164106
  let signatureParamPos = 0;
164093
164107
  for (const originalArg of args) {
164094
164108
  const arg = skipParentheses(originalArg);
@@ -164123,7 +164137,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164123
164137
  if (leadingCommentsContainsParameterName(arg, name)) {
164124
164138
  continue;
164125
164139
  }
164126
- addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument, sourceFile);
164140
+ addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
164127
164141
  }
164128
164142
  }
164129
164143
  }
@@ -164259,7 +164273,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
164259
164273
  }
164260
164274
  return true;
164261
164275
  }
164262
- function getNodeDisplayPart(text, node, sourceFile) {
164276
+ function getNodeDisplayPart(text, node) {
164277
+ const sourceFile = node.getSourceFile();
164263
164278
  return {
164264
164279
  text,
164265
164280
  span: createTextSpanFromNode(node, sourceFile),
@@ -167147,11 +167162,12 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
167147
167162
  if (documentation.length === 0 && isIdentifier(location) && symbol.valueDeclaration && isBindingElement(symbol.valueDeclaration)) {
167148
167163
  const declaration = symbol.valueDeclaration;
167149
167164
  const parent2 = declaration.parent;
167150
- if (isIdentifier(declaration.name) && isObjectBindingPattern(parent2)) {
167151
- const name = getTextOfIdentifierOrLiteral(declaration.name);
167165
+ const name = declaration.propertyName || declaration.name;
167166
+ if (isIdentifier(name) && isObjectBindingPattern(parent2)) {
167167
+ const propertyName = getTextOfIdentifierOrLiteral(name);
167152
167168
  const objectType = typeChecker.getTypeAtLocation(parent2);
167153
167169
  documentation = firstDefined(objectType.isUnion() ? objectType.types : [objectType], (t) => {
167154
- const prop = t.getProperty(name);
167170
+ const prop = t.getProperty(propertyName);
167155
167171
  return prop ? prop.getDocumentationComment(typeChecker) : void 0;
167156
167172
  }) || emptyArray;
167157
167173
  }
@@ -181002,14 +181018,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
181002
181018
  return {
181003
181019
  ...hint,
181004
181020
  position: scriptInfo.positionToLineOffset(position),
181005
- displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => ({
181006
- text,
181007
- span: span && {
181008
- start: scriptInfo.positionToLineOffset(span.start),
181009
- end: scriptInfo.positionToLineOffset(span.start + span.length),
181010
- file: file2
181021
+ displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {
181022
+ if (span) {
181023
+ Debug.assertIsDefined(file2, "Target file should be defined together with its span.");
181024
+ const scriptInfo2 = this.projectService.getScriptInfo(file2);
181025
+ return {
181026
+ text,
181027
+ span: {
181028
+ start: scriptInfo2.positionToLineOffset(span.start),
181029
+ end: scriptInfo2.positionToLineOffset(span.start + span.length),
181030
+ file: file2
181031
+ }
181032
+ };
181033
+ } else {
181034
+ return { text };
181011
181035
  }
181012
- }))
181036
+ })
181013
181037
  };
181014
181038
  });
181015
181039
  }