@typescript-deploys/pr-build 5.3.0-pr-55459-3 → 5.3.0-pr-55476-8
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/tsc.js +72 -56
- package/lib/tsserver.js +92 -68
- package/lib/typescript.js +485 -461
- package/lib/typingsInstaller.js +1 -1
- package/package.json +2 -2
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-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20230823`;
|
|
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
|
|
51103
|
-
|
|
51104
|
-
if (
|
|
51105
|
-
parameterDeclaration
|
|
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 =
|
|
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
|
-
"
|
|
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)
|
|
@@ -53881,7 +53905,7 @@ ${lanes.join("\n")}
|
|
|
53881
53905
|
const pattern = declaration.parent;
|
|
53882
53906
|
if (strictNullChecks && declaration.flags & 33554432 /* Ambient */ && isParameterDeclaration(declaration)) {
|
|
53883
53907
|
parentType = getNonNullableType(parentType);
|
|
53884
|
-
} else if (strictNullChecks && pattern.parent.initializer && !
|
|
53908
|
+
} else if (strictNullChecks && pattern.parent.initializer && !(getTypeFacts(getTypeOfInitializer(pattern.parent.initializer)) & 65536 /* EQUndefined */)) {
|
|
53885
53909
|
parentType = getTypeWithFacts(parentType, 524288 /* NEUndefined */);
|
|
53886
53910
|
}
|
|
53887
53911
|
let type;
|
|
@@ -53924,7 +53948,7 @@ ${lanes.join("\n")}
|
|
|
53924
53948
|
return type;
|
|
53925
53949
|
}
|
|
53926
53950
|
if (getEffectiveTypeAnnotationNode(walkUpBindingElementsAndPatterns(declaration))) {
|
|
53927
|
-
return strictNullChecks && !
|
|
53951
|
+
return strictNullChecks && !(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */) ? getNonUndefinedType(type) : type;
|
|
53928
53952
|
}
|
|
53929
53953
|
return widenTypeInferredFromInitializer(declaration, getUnionType([getNonUndefinedType(type), checkDeclarationInitializer(declaration, 0 /* Normal */)], 2 /* Subtype */));
|
|
53930
53954
|
}
|
|
@@ -62032,7 +62056,7 @@ ${lanes.join("\n")}
|
|
|
62032
62056
|
if (sourceType && targetType) {
|
|
62033
62057
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
62034
62058
|
const targetSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(targetType));
|
|
62035
|
-
const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) &&
|
|
62059
|
+
const callbacks = sourceSig && targetSig && !getTypePredicateOfSignature(sourceSig) && !getTypePredicateOfSignature(targetSig) && (getTypeFacts(sourceType) & 50331648 /* IsUndefinedOrNull */) === (getTypeFacts(targetType) & 50331648 /* IsUndefinedOrNull */);
|
|
62036
62060
|
let related = callbacks ? compareSignaturesRelated(targetSig, sourceSig, checkMode & 8 /* StrictArity */ | (strictVariance ? 2 /* StrictCallback */ : 1 /* BivariantCallback */), reportErrors2, errorReporter, incompatibleErrorReporter, compareTypes, reportUnreliableMarkers) : !(checkMode & 3 /* Callback */) && !strictVariance && compareTypes(
|
|
62037
62061
|
sourceType,
|
|
62038
62062
|
targetType,
|
|
@@ -65189,7 +65213,7 @@ ${lanes.join("\n")}
|
|
|
65189
65213
|
return value.base10Value === "0";
|
|
65190
65214
|
}
|
|
65191
65215
|
function removeDefinitelyFalsyTypes(type) {
|
|
65192
|
-
return filterType(type, (t) =>
|
|
65216
|
+
return filterType(type, (t) => !!(getTypeFacts(t) & 4194304 /* Truthy */));
|
|
65193
65217
|
}
|
|
65194
65218
|
function extractDefinitelyFalsyTypes(type) {
|
|
65195
65219
|
return mapType(type, getDefinitelyFalsyPartOfType);
|
|
@@ -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
|
-
|
|
66471
|
-
|
|
66472
|
-
|
|
66473
|
-
|
|
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) {
|
|
@@ -66932,13 +66958,7 @@ ${lanes.join("\n")}
|
|
|
66932
66958
|
const resolved = resolveStructuredTypeMembers(type);
|
|
66933
66959
|
return !!(resolved.callSignatures.length || resolved.constructSignatures.length || resolved.members.get("bind") && isTypeSubtypeOf(type, globalFunctionType));
|
|
66934
66960
|
}
|
|
66935
|
-
function
|
|
66936
|
-
return getTypeFactsWorker(type, mask2) & mask2;
|
|
66937
|
-
}
|
|
66938
|
-
function hasTypeFacts(type, mask2) {
|
|
66939
|
-
return getOnlyTypeFacts(type, mask2) !== 0;
|
|
66940
|
-
}
|
|
66941
|
-
function getTypeFactsWorker(type, callerOnlyNeeds) {
|
|
66961
|
+
function getTypeFacts(type) {
|
|
66942
66962
|
if (type.flags & (2097152 /* Intersection */ | 465829888 /* Instantiable */)) {
|
|
66943
66963
|
type = getBaseConstraintOfType(type) || unknownType;
|
|
66944
66964
|
}
|
|
@@ -66971,10 +66991,6 @@ ${lanes.join("\n")}
|
|
|
66971
66991
|
return strictNullChecks ? type === falseType || type === regularFalseType ? 12121864 /* FalseStrictFacts */ : 7927560 /* TrueStrictFacts */ : type === falseType || type === regularFalseType ? 12580616 /* FalseFacts */ : 16774920 /* TrueFacts */;
|
|
66972
66992
|
}
|
|
66973
66993
|
if (flags & 524288 /* Object */) {
|
|
66974
|
-
const possibleFacts = strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ | 7880640 /* FunctionStrictFacts */ | 7888800 /* ObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ | 16728e3 /* FunctionFacts */ | 16736160 /* ObjectFacts */;
|
|
66975
|
-
if ((callerOnlyNeeds & possibleFacts) === 0) {
|
|
66976
|
-
return 0;
|
|
66977
|
-
}
|
|
66978
66994
|
return getObjectFlags(type) & 16 /* Anonymous */ && isEmptyObjectType(type) ? strictNullChecks ? 83427327 /* EmptyObjectStrictFacts */ : 83886079 /* EmptyObjectFacts */ : isFunctionObjectType(type) ? strictNullChecks ? 7880640 /* FunctionStrictFacts */ : 16728e3 /* FunctionFacts */ : strictNullChecks ? 7888800 /* ObjectStrictFacts */ : 16736160 /* ObjectFacts */;
|
|
66979
66995
|
}
|
|
66980
66996
|
if (flags & 16384 /* Void */) {
|
|
@@ -66996,20 +67012,20 @@ ${lanes.join("\n")}
|
|
|
66996
67012
|
return 0 /* None */;
|
|
66997
67013
|
}
|
|
66998
67014
|
if (flags & 1048576 /* Union */) {
|
|
66999
|
-
return reduceLeft(type.types, (facts, t) => facts |
|
|
67015
|
+
return reduceLeft(type.types, (facts, t) => facts | getTypeFacts(t), 0 /* None */);
|
|
67000
67016
|
}
|
|
67001
67017
|
if (flags & 2097152 /* Intersection */) {
|
|
67002
|
-
return getIntersectionTypeFacts(type
|
|
67018
|
+
return getIntersectionTypeFacts(type);
|
|
67003
67019
|
}
|
|
67004
67020
|
return 83886079 /* UnknownFacts */;
|
|
67005
67021
|
}
|
|
67006
|
-
function getIntersectionTypeFacts(type
|
|
67022
|
+
function getIntersectionTypeFacts(type) {
|
|
67007
67023
|
const ignoreObjects = maybeTypeOfKind(type, 402784252 /* Primitive */);
|
|
67008
67024
|
let oredFacts = 0 /* None */;
|
|
67009
67025
|
let andedFacts = 134217727 /* All */;
|
|
67010
67026
|
for (const t of type.types) {
|
|
67011
67027
|
if (!(ignoreObjects && t.flags & 524288 /* Object */)) {
|
|
67012
|
-
const f =
|
|
67028
|
+
const f = getTypeFacts(t);
|
|
67013
67029
|
oredFacts |= f;
|
|
67014
67030
|
andedFacts &= f;
|
|
67015
67031
|
}
|
|
@@ -67017,19 +67033,19 @@ ${lanes.join("\n")}
|
|
|
67017
67033
|
return oredFacts & 8256 /* OrFactsMask */ | andedFacts & 134209471 /* AndFactsMask */;
|
|
67018
67034
|
}
|
|
67019
67035
|
function getTypeWithFacts(type, include) {
|
|
67020
|
-
return filterType(type, (t) =>
|
|
67036
|
+
return filterType(type, (t) => (getTypeFacts(t) & include) !== 0);
|
|
67021
67037
|
}
|
|
67022
67038
|
function getAdjustedTypeWithFacts(type, facts) {
|
|
67023
67039
|
const reduced = recombineUnknownType(getTypeWithFacts(strictNullChecks && type.flags & 2 /* Unknown */ ? unknownUnionType : type, facts));
|
|
67024
67040
|
if (strictNullChecks) {
|
|
67025
67041
|
switch (facts) {
|
|
67026
67042
|
case 524288 /* NEUndefined */:
|
|
67027
|
-
return mapType(reduced, (t) =>
|
|
67043
|
+
return mapType(reduced, (t) => getTypeFacts(t) & 65536 /* EQUndefined */ ? getIntersectionType([t, getTypeFacts(t) & 131072 /* EQNull */ && !maybeTypeOfKind(reduced, 65536 /* Null */) ? getUnionType([emptyObjectType, nullType]) : emptyObjectType]) : t);
|
|
67028
67044
|
case 1048576 /* NENull */:
|
|
67029
|
-
return mapType(reduced, (t) =>
|
|
67045
|
+
return mapType(reduced, (t) => getTypeFacts(t) & 131072 /* EQNull */ ? getIntersectionType([t, getTypeFacts(t) & 65536 /* EQUndefined */ && !maybeTypeOfKind(reduced, 32768 /* Undefined */) ? getUnionType([emptyObjectType, undefinedType]) : emptyObjectType]) : t);
|
|
67030
67046
|
case 2097152 /* NEUndefinedOrNull */:
|
|
67031
67047
|
case 4194304 /* Truthy */:
|
|
67032
|
-
return mapType(reduced, (t) =>
|
|
67048
|
+
return mapType(reduced, (t) => getTypeFacts(t) & 262144 /* EQUndefinedOrNull */ ? getGlobalNonNullableTypeInstantiation(t) : t);
|
|
67033
67049
|
}
|
|
67034
67050
|
}
|
|
67035
67051
|
return reduced;
|
|
@@ -68016,7 +68032,7 @@ ${lanes.join("\n")}
|
|
|
68016
68032
|
return void 0;
|
|
68017
68033
|
}
|
|
68018
68034
|
function getDiscriminantPropertyAccess(expr, computedType) {
|
|
68019
|
-
const type = declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
|
|
68035
|
+
const type = !(computedType.flags & 1048576 /* Union */) && declaredType.flags & 1048576 /* Union */ ? declaredType : computedType;
|
|
68020
68036
|
if (type.flags & 1048576 /* Union */) {
|
|
68021
68037
|
const access = getCandidateDiscriminantPropertyAccess(expr);
|
|
68022
68038
|
if (access) {
|
|
@@ -68366,14 +68382,14 @@ ${lanes.join("\n")}
|
|
|
68366
68382
|
// the constituent based on its type facts. We use the strict subtype relation because it treats `object`
|
|
68367
68383
|
// as a subtype of `{}`, and we need the type facts check because function types are subtypes of `object`,
|
|
68368
68384
|
// but are classified as "function" according to `typeof`.
|
|
68369
|
-
isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ?
|
|
68385
|
+
isTypeRelatedTo(t, impliedType, strictSubtypeRelation) ? getTypeFacts(t) & facts ? t : neverType : (
|
|
68370
68386
|
// We next check if the consituent is a supertype of the implied type. If so, we substitute the implied
|
|
68371
68387
|
// type. This handles top types like `unknown` and `{}`, and supertypes like `{ toString(): string }`.
|
|
68372
68388
|
isTypeSubtypeOf(impliedType, t) ? impliedType : (
|
|
68373
68389
|
// Neither the constituent nor the implied type is a subtype of the other, however their domains may still
|
|
68374
68390
|
// overlap. For example, an unconstrained type parameter and type `string`. If the type facts indicate
|
|
68375
68391
|
// possible overlap, we form an intersection. Otherwise, we eliminate the constituent.
|
|
68376
|
-
|
|
68392
|
+
getTypeFacts(t) & facts ? getIntersectionType([t, impliedType]) : neverType
|
|
68377
68393
|
)
|
|
68378
68394
|
)
|
|
68379
68395
|
));
|
|
@@ -68387,7 +68403,7 @@ ${lanes.join("\n")}
|
|
|
68387
68403
|
const hasDefaultClause = clauseStart === clauseEnd || defaultIndex >= clauseStart && defaultIndex < clauseEnd;
|
|
68388
68404
|
if (hasDefaultClause) {
|
|
68389
68405
|
const notEqualFacts = getNotEqualFactsFromTypeofSwitch(clauseStart, clauseEnd, witnesses);
|
|
68390
|
-
return filterType(type, (t) =>
|
|
68406
|
+
return filterType(type, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts);
|
|
68391
68407
|
}
|
|
68392
68408
|
const clauseWitnesses = witnesses.slice(clauseStart, clauseEnd);
|
|
68393
68409
|
return getUnionType(map(clauseWitnesses, (text) => text ? narrowTypeByTypeName(type, text) : neverType));
|
|
@@ -68525,7 +68541,7 @@ ${lanes.join("\n")}
|
|
|
68525
68541
|
false
|
|
68526
68542
|
);
|
|
68527
68543
|
}
|
|
68528
|
-
if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !
|
|
68544
|
+
if (strictNullChecks && assumeTrue && optionalChainContainsReference(predicateArgument, reference) && !(getTypeFacts(predicate.type) & 65536 /* EQUndefined */)) {
|
|
68529
68545
|
type = getAdjustedTypeWithFacts(type, 2097152 /* NEUndefinedOrNull */);
|
|
68530
68546
|
}
|
|
68531
68547
|
const access = getDiscriminantPropertyAccess(predicateArgument, type);
|
|
@@ -68659,7 +68675,7 @@ ${lanes.join("\n")}
|
|
|
68659
68675
|
reportCircularityError(declaration.symbol);
|
|
68660
68676
|
return true;
|
|
68661
68677
|
}
|
|
68662
|
-
const containsUndefined = !!
|
|
68678
|
+
const containsUndefined = !!(getTypeFacts(checkDeclarationInitializer(declaration, 0 /* Normal */)) & 16777216 /* IsUndefined */);
|
|
68663
68679
|
if (!popTypeResolution()) {
|
|
68664
68680
|
reportCircularityError(declaration.symbol);
|
|
68665
68681
|
return true;
|
|
@@ -68669,7 +68685,7 @@ ${lanes.join("\n")}
|
|
|
68669
68685
|
return links.parameterInitializerContainsUndefined;
|
|
68670
68686
|
}
|
|
68671
68687
|
function removeOptionalityFromDeclaredType(declaredType, declaration) {
|
|
68672
|
-
const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer &&
|
|
68688
|
+
const removeUndefined = strictNullChecks && declaration.kind === 169 /* Parameter */ && declaration.initializer && getTypeFacts(declaredType) & 16777216 /* IsUndefined */ && !parameterInitializerContainsUndefined(declaration);
|
|
68673
68689
|
return removeUndefined ? getTypeWithFacts(declaredType, 524288 /* NEUndefined */) : declaredType;
|
|
68674
68690
|
}
|
|
68675
68691
|
function isConstraintPosition(type, node) {
|
|
@@ -71499,7 +71515,7 @@ ${lanes.join("\n")}
|
|
|
71499
71515
|
return checkNonNullType(checkExpression(node), node);
|
|
71500
71516
|
}
|
|
71501
71517
|
function isNullableType(type) {
|
|
71502
|
-
return
|
|
71518
|
+
return !!(getTypeFacts(type) & 50331648 /* IsUndefinedOrNull */);
|
|
71503
71519
|
}
|
|
71504
71520
|
function getNonNullableTypeIfNeeded(type) {
|
|
71505
71521
|
return isNullableType(type) ? getNonNullableType(type) : type;
|
|
@@ -71545,7 +71561,7 @@ ${lanes.join("\n")}
|
|
|
71545
71561
|
error2(node, Diagnostics.Object_is_of_type_unknown);
|
|
71546
71562
|
return errorType;
|
|
71547
71563
|
}
|
|
71548
|
-
const facts =
|
|
71564
|
+
const facts = getTypeFacts(type);
|
|
71549
71565
|
if (facts & 50331648 /* IsUndefinedOrNull */) {
|
|
71550
71566
|
reportError(node, facts);
|
|
71551
71567
|
const t = getNonNullableType(type);
|
|
@@ -75325,7 +75341,7 @@ ${lanes.join("\n")}
|
|
|
75325
75341
|
if (operandConstraint.flags & 3 /* AnyOrUnknown */) {
|
|
75326
75342
|
return (556800 /* AllTypeofNE */ & notEqualFacts) === 556800 /* AllTypeofNE */;
|
|
75327
75343
|
}
|
|
75328
|
-
return !someType(operandConstraint, (t) =>
|
|
75344
|
+
return !someType(operandConstraint, (t) => (getTypeFacts(t) & notEqualFacts) === notEqualFacts);
|
|
75329
75345
|
}
|
|
75330
75346
|
const type = checkExpressionCached(node.expression);
|
|
75331
75347
|
if (!isLiteralType(type)) {
|
|
@@ -75650,7 +75666,7 @@ ${lanes.join("\n")}
|
|
|
75650
75666
|
}
|
|
75651
75667
|
function checkDeleteExpressionMustBeOptional(expr, symbol) {
|
|
75652
75668
|
const type = getTypeOfSymbol(symbol);
|
|
75653
|
-
if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ :
|
|
75669
|
+
if (strictNullChecks && !(type.flags & (3 /* AnyOrUnknown */ | 131072 /* Never */)) && !(exactOptionalPropertyTypes ? symbol.flags & 16777216 /* Optional */ : getTypeFacts(type) & 16777216 /* IsUndefined */)) {
|
|
75654
75670
|
error2(expr, Diagnostics.The_operand_of_a_delete_operator_must_be_optional);
|
|
75655
75671
|
}
|
|
75656
75672
|
}
|
|
@@ -75785,7 +75801,7 @@ ${lanes.join("\n")}
|
|
|
75785
75801
|
return getUnaryResultType(operandType);
|
|
75786
75802
|
case 54 /* ExclamationToken */:
|
|
75787
75803
|
checkTruthinessOfType(operandType, node.operand);
|
|
75788
|
-
const facts =
|
|
75804
|
+
const facts = getTypeFacts(operandType) & (4194304 /* Truthy */ | 8388608 /* Falsy */);
|
|
75789
75805
|
return facts === 4194304 /* Truthy */ ? falseType : facts === 8388608 /* Falsy */ ? trueType : booleanType;
|
|
75790
75806
|
case 46 /* PlusPlusToken */:
|
|
75791
75807
|
case 47 /* MinusMinusToken */:
|
|
@@ -76016,7 +76032,7 @@ ${lanes.join("\n")}
|
|
|
76016
76032
|
if (exprOrAssignment.kind === 304 /* ShorthandPropertyAssignment */) {
|
|
76017
76033
|
const prop = exprOrAssignment;
|
|
76018
76034
|
if (prop.objectAssignmentInitializer) {
|
|
76019
|
-
if (strictNullChecks && !
|
|
76035
|
+
if (strictNullChecks && !(getTypeFacts(checkExpression(prop.objectAssignmentInitializer)) & 16777216 /* IsUndefined */)) {
|
|
76020
76036
|
sourceType = getTypeWithFacts(sourceType, 524288 /* NEUndefined */);
|
|
76021
76037
|
}
|
|
76022
76038
|
checkBinaryLikeExpression(prop.name, prop.equalsToken, prop.objectAssignmentInitializer, checkMode);
|
|
@@ -76428,7 +76444,7 @@ ${lanes.join("\n")}
|
|
|
76428
76444
|
return checkInExpression(left, right, leftType, rightType);
|
|
76429
76445
|
case 56 /* AmpersandAmpersandToken */:
|
|
76430
76446
|
case 77 /* AmpersandAmpersandEqualsToken */: {
|
|
76431
|
-
const resultType2 =
|
|
76447
|
+
const resultType2 = getTypeFacts(leftType) & 4194304 /* Truthy */ ? getUnionType([extractDefinitelyFalsyTypes(strictNullChecks ? leftType : getBaseTypeOfLiteralType(rightType)), rightType]) : leftType;
|
|
76432
76448
|
if (operator === 77 /* AmpersandAmpersandEqualsToken */) {
|
|
76433
76449
|
checkAssignmentOperator(rightType);
|
|
76434
76450
|
}
|
|
@@ -76436,7 +76452,7 @@ ${lanes.join("\n")}
|
|
|
76436
76452
|
}
|
|
76437
76453
|
case 57 /* BarBarToken */:
|
|
76438
76454
|
case 76 /* BarBarEqualsToken */: {
|
|
76439
|
-
const resultType2 =
|
|
76455
|
+
const resultType2 = getTypeFacts(leftType) & 8388608 /* Falsy */ ? getUnionType([getNonNullableType(removeDefinitelyFalsyTypes(leftType)), rightType], 2 /* Subtype */) : leftType;
|
|
76440
76456
|
if (operator === 76 /* BarBarEqualsToken */) {
|
|
76441
76457
|
checkAssignmentOperator(rightType);
|
|
76442
76458
|
}
|
|
@@ -76444,7 +76460,7 @@ ${lanes.join("\n")}
|
|
|
76444
76460
|
}
|
|
76445
76461
|
case 61 /* QuestionQuestionToken */:
|
|
76446
76462
|
case 78 /* QuestionQuestionEqualsToken */: {
|
|
76447
|
-
const resultType2 =
|
|
76463
|
+
const resultType2 = getTypeFacts(leftType) & 262144 /* EQUndefinedOrNull */ ? getUnionType([getNonNullableType(leftType), rightType], 2 /* Subtype */) : leftType;
|
|
76448
76464
|
if (operator === 78 /* QuestionQuestionEqualsToken */) {
|
|
76449
76465
|
checkAssignmentOperator(rightType);
|
|
76450
76466
|
}
|
|
@@ -79761,7 +79777,7 @@ ${lanes.join("\n")}
|
|
|
79761
79777
|
}
|
|
79762
79778
|
const type = location === condExpr2 ? condType : checkTruthinessExpression(location);
|
|
79763
79779
|
const isPropertyExpressionCast = isPropertyAccessExpression(location) && isTypeAssertion(location.expression);
|
|
79764
|
-
if (!
|
|
79780
|
+
if (!(getTypeFacts(type) & 4194304 /* Truthy */) || isPropertyExpressionCast)
|
|
79765
79781
|
return;
|
|
79766
79782
|
const callSignatures = getSignaturesOfType(type, 0 /* Call */);
|
|
79767
79783
|
const isPromise = !!getAwaitedTypeOfPromise(type);
|
|
@@ -163998,11 +164014,11 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
163998
164014
|
function isSignatureSupportingReturnAnnotation(node) {
|
|
163999
164015
|
return isArrowFunction(node) || isFunctionExpression(node) || isFunctionDeclaration(node) || isMethodDeclaration(node) || isGetAccessorDeclaration(node);
|
|
164000
164016
|
}
|
|
164001
|
-
function addParameterHints(text, parameter, position, isFirstVariadicArgument
|
|
164017
|
+
function addParameterHints(text, parameter, position, isFirstVariadicArgument) {
|
|
164002
164018
|
let hintText = `${isFirstVariadicArgument ? "..." : ""}${text}`;
|
|
164003
164019
|
let displayParts;
|
|
164004
164020
|
if (shouldUseInteractiveInlayHints(preferences)) {
|
|
164005
|
-
displayParts = [getNodeDisplayPart(hintText, parameter
|
|
164021
|
+
displayParts = [getNodeDisplayPart(hintText, parameter), { text: ":" }];
|
|
164006
164022
|
hintText = "";
|
|
164007
164023
|
} else {
|
|
164008
164024
|
hintText += ":";
|
|
@@ -164074,7 +164090,6 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164074
164090
|
if (!signature || !candidates.length) {
|
|
164075
164091
|
return;
|
|
164076
164092
|
}
|
|
164077
|
-
const sourceFile = shouldUseInteractiveInlayHints(preferences) ? expr.getSourceFile() : void 0;
|
|
164078
164093
|
let signatureParamPos = 0;
|
|
164079
164094
|
for (const originalArg of args) {
|
|
164080
164095
|
const arg = skipParentheses(originalArg);
|
|
@@ -164109,7 +164124,7 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164109
164124
|
if (leadingCommentsContainsParameterName(arg, name)) {
|
|
164110
164125
|
continue;
|
|
164111
164126
|
}
|
|
164112
|
-
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument
|
|
164127
|
+
addParameterHints(name, parameter, originalArg.getStart(), isFirstVariadicArgument);
|
|
164113
164128
|
}
|
|
164114
164129
|
}
|
|
164115
164130
|
}
|
|
@@ -164245,7 +164260,8 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
164245
164260
|
}
|
|
164246
164261
|
return true;
|
|
164247
164262
|
}
|
|
164248
|
-
function getNodeDisplayPart(text, node
|
|
164263
|
+
function getNodeDisplayPart(text, node) {
|
|
164264
|
+
const sourceFile = node.getSourceFile();
|
|
164249
164265
|
return {
|
|
164250
164266
|
text,
|
|
164251
164267
|
span: createTextSpanFromNode(node, sourceFile),
|
|
@@ -180988,14 +181004,22 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
180988
181004
|
return {
|
|
180989
181005
|
...hint,
|
|
180990
181006
|
position: scriptInfo.positionToLineOffset(position),
|
|
180991
|
-
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) =>
|
|
180992
|
-
|
|
180993
|
-
|
|
180994
|
-
|
|
180995
|
-
|
|
180996
|
-
|
|
181007
|
+
displayParts: displayParts == null ? void 0 : displayParts.map(({ text, span, file: file2 }) => {
|
|
181008
|
+
if (span) {
|
|
181009
|
+
Debug.assertIsDefined(file2, "Target file should be defined together with its span.");
|
|
181010
|
+
const scriptInfo2 = this.projectService.getScriptInfo(file2);
|
|
181011
|
+
return {
|
|
181012
|
+
text,
|
|
181013
|
+
span: {
|
|
181014
|
+
start: scriptInfo2.positionToLineOffset(span.start),
|
|
181015
|
+
end: scriptInfo2.positionToLineOffset(span.start + span.length),
|
|
181016
|
+
file: file2
|
|
181017
|
+
}
|
|
181018
|
+
};
|
|
181019
|
+
} else {
|
|
181020
|
+
return { text };
|
|
180997
181021
|
}
|
|
180998
|
-
})
|
|
181022
|
+
})
|
|
180999
181023
|
};
|
|
181000
181024
|
});
|
|
181001
181025
|
}
|