@typescript-deploys/pr-build 5.1.0-pr-53388-13 → 5.1.0-pr-53420-2
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 +409 -263
- package/lib/tsserver.js +542 -390
- package/lib/tsserverlibrary.js +542 -390
- package/lib/typescript.js +538 -386
- package/lib/typingsInstaller.js +17 -17
- package/package.json +2 -2
package/lib/tsserver.js
CHANGED
|
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2286
2286
|
|
|
2287
2287
|
// src/compiler/corePublic.ts
|
|
2288
2288
|
var versionMajorMinor = "5.1";
|
|
2289
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2289
|
+
var version = `${versionMajorMinor}.0-insiders.20230324`;
|
|
2290
2290
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2291
2291
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2292
2292
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -12556,7 +12556,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
12556
12556
|
return token = 10 /* StringLiteral */;
|
|
12557
12557
|
case 96 /* backtick */:
|
|
12558
12558
|
return token = scanTemplateAndSetTokenValue(
|
|
12559
|
-
/*
|
|
12559
|
+
/*isTaggedTemplate*/
|
|
12560
12560
|
false
|
|
12561
12561
|
);
|
|
12562
12562
|
case 37 /* percent */:
|
|
@@ -13059,7 +13059,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
13059
13059
|
function reScanTemplateHeadOrNoSubstitutionTemplate() {
|
|
13060
13060
|
pos = tokenStart;
|
|
13061
13061
|
return token = scanTemplateAndSetTokenValue(
|
|
13062
|
-
/*
|
|
13062
|
+
/*isTaggedTemplate*/
|
|
13063
13063
|
true
|
|
13064
13064
|
);
|
|
13065
13065
|
}
|
|
@@ -16110,7 +16110,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
|
16110
16110
|
true,
|
|
16111
16111
|
sourceFile.languageVariant,
|
|
16112
16112
|
sourceFile.text,
|
|
16113
|
-
/*onError
|
|
16113
|
+
/*onError*/
|
|
16114
16114
|
void 0,
|
|
16115
16115
|
pos
|
|
16116
16116
|
);
|
|
@@ -16125,7 +16125,7 @@ function scanTokenAtPosition(sourceFile, pos) {
|
|
|
16125
16125
|
true,
|
|
16126
16126
|
sourceFile.languageVariant,
|
|
16127
16127
|
sourceFile.text,
|
|
16128
|
-
/*onError
|
|
16128
|
+
/*onError*/
|
|
16129
16129
|
void 0,
|
|
16130
16130
|
pos
|
|
16131
16131
|
);
|
|
@@ -17107,7 +17107,7 @@ function isSameEntityName(name, initializer) {
|
|
|
17107
17107
|
function getRightMostAssignedExpression(node) {
|
|
17108
17108
|
while (isAssignmentExpression(
|
|
17109
17109
|
node,
|
|
17110
|
-
/*
|
|
17110
|
+
/*excludeCompoundAssignment*/
|
|
17111
17111
|
true
|
|
17112
17112
|
)) {
|
|
17113
17113
|
node = node.right;
|
|
@@ -17310,7 +17310,7 @@ function tryGetImportFromModuleSpecifier(node) {
|
|
|
17310
17310
|
case 211 /* CallExpression */:
|
|
17311
17311
|
return isImportCall(node.parent) || isRequireCall(
|
|
17312
17312
|
node.parent,
|
|
17313
|
-
/*
|
|
17313
|
+
/*requireStringLiteralLikeArgument*/
|
|
17314
17314
|
false
|
|
17315
17315
|
) ? node.parent : void 0;
|
|
17316
17316
|
case 199 /* LiteralType */:
|
|
@@ -19106,9 +19106,9 @@ function getEffectiveModifierFlags(node) {
|
|
|
19106
19106
|
function getEffectiveModifierFlagsAlwaysIncludeJSDoc(node) {
|
|
19107
19107
|
return getModifierFlagsWorker(
|
|
19108
19108
|
node,
|
|
19109
|
-
/*
|
|
19109
|
+
/*includeJSDoc*/
|
|
19110
19110
|
true,
|
|
19111
|
-
/*
|
|
19111
|
+
/*alwaysIncludeJSDoc*/
|
|
19112
19112
|
true
|
|
19113
19113
|
);
|
|
19114
19114
|
}
|
|
@@ -21583,7 +21583,7 @@ function createParenthesizerRules(factory2) {
|
|
|
21583
21583
|
if (!needsParens) {
|
|
21584
21584
|
switch (getLeftmostExpression(
|
|
21585
21585
|
check,
|
|
21586
|
-
/*
|
|
21586
|
+
/*stopAtCallExpressions*/
|
|
21587
21587
|
false
|
|
21588
21588
|
).kind) {
|
|
21589
21589
|
case 229 /* ClassExpression */:
|
|
@@ -27382,7 +27382,7 @@ function createEmitHelperFactory(context) {
|
|
|
27382
27382
|
context.requestEmitHelper(classPrivateFieldInHelper);
|
|
27383
27383
|
return factory2.createCallExpression(
|
|
27384
27384
|
getUnscopedHelperName("__classPrivateFieldIn"),
|
|
27385
|
-
/*
|
|
27385
|
+
/*typeArguments*/
|
|
27386
27386
|
void 0,
|
|
27387
27387
|
[state, receiver]
|
|
27388
27388
|
);
|
|
@@ -29572,7 +29572,7 @@ function createAccessorPropertySetRedirector(factory2, node, modifiers, name) {
|
|
|
29572
29572
|
[factory2.createParameterDeclaration(
|
|
29573
29573
|
/*modifiers*/
|
|
29574
29574
|
void 0,
|
|
29575
|
-
/*
|
|
29575
|
+
/*dotDotDotToken*/
|
|
29576
29576
|
void 0,
|
|
29577
29577
|
"value"
|
|
29578
29578
|
)],
|
|
@@ -30533,7 +30533,7 @@ var Parser;
|
|
|
30533
30533
|
fileName2,
|
|
30534
30534
|
2 /* ES2015 */,
|
|
30535
30535
|
6 /* JSON */,
|
|
30536
|
-
/*
|
|
30536
|
+
/*isDeclarationFile*/
|
|
30537
30537
|
false,
|
|
30538
30538
|
statements,
|
|
30539
30539
|
endOfFileToken,
|
|
@@ -31888,7 +31888,7 @@ var Parser;
|
|
|
31888
31888
|
entity,
|
|
31889
31889
|
parseRightSideOfDot(
|
|
31890
31890
|
allowReservedWords,
|
|
31891
|
-
/*
|
|
31891
|
+
/*allowPrivateIdentifiers*/
|
|
31892
31892
|
false
|
|
31893
31893
|
)
|
|
31894
31894
|
),
|
|
@@ -33825,7 +33825,7 @@ var Parser;
|
|
|
33825
33825
|
parseExpected(43 /* SlashToken */);
|
|
33826
33826
|
if (parseExpected(
|
|
33827
33827
|
31 /* GreaterThanToken */,
|
|
33828
|
-
/*
|
|
33828
|
+
/*diagnosticMessage*/
|
|
33829
33829
|
void 0,
|
|
33830
33830
|
/*shouldAdvance*/
|
|
33831
33831
|
false
|
|
@@ -33870,7 +33870,7 @@ var Parser;
|
|
|
33870
33870
|
} else {
|
|
33871
33871
|
if (parseExpected(
|
|
33872
33872
|
19 /* CloseBraceToken */,
|
|
33873
|
-
/*
|
|
33873
|
+
/*diagnosticMessage*/
|
|
33874
33874
|
void 0,
|
|
33875
33875
|
/*shouldAdvance*/
|
|
33876
33876
|
false
|
|
@@ -33923,7 +33923,7 @@ var Parser;
|
|
|
33923
33923
|
const tagName = parseJsxElementName();
|
|
33924
33924
|
if (parseExpected(
|
|
33925
33925
|
31 /* GreaterThanToken */,
|
|
33926
|
-
/*
|
|
33926
|
+
/*diagnosticMessage*/
|
|
33927
33927
|
void 0,
|
|
33928
33928
|
/*shouldAdvance*/
|
|
33929
33929
|
false
|
|
@@ -34203,7 +34203,7 @@ var Parser;
|
|
|
34203
34203
|
break;
|
|
34204
34204
|
case 15 /* TemplateHead */:
|
|
34205
34205
|
return parseTemplateExpression(
|
|
34206
|
-
/*
|
|
34206
|
+
/*isTaggedTemplate*/
|
|
34207
34207
|
false
|
|
34208
34208
|
);
|
|
34209
34209
|
case 80 /* PrivateIdentifier */:
|
|
@@ -35910,7 +35910,7 @@ var Parser;
|
|
|
35910
35910
|
"file.js",
|
|
35911
35911
|
content,
|
|
35912
35912
|
99 /* Latest */,
|
|
35913
|
-
/*
|
|
35913
|
+
/*syntaxCursor*/
|
|
35914
35914
|
void 0,
|
|
35915
35915
|
1 /* JS */
|
|
35916
35916
|
);
|
|
@@ -35953,7 +35953,7 @@ var Parser;
|
|
|
35953
35953
|
const hasBrace = parseOptional(18 /* OpenBraceToken */);
|
|
35954
35954
|
const p2 = getNodePos();
|
|
35955
35955
|
let entityName = parseEntityName(
|
|
35956
|
-
/*
|
|
35956
|
+
/*allowReservedWords*/
|
|
35957
35957
|
false
|
|
35958
35958
|
);
|
|
35959
35959
|
while (token() === 80 /* PrivateIdentifier */) {
|
|
@@ -35974,7 +35974,7 @@ var Parser;
|
|
|
35974
35974
|
"",
|
|
35975
35975
|
content,
|
|
35976
35976
|
99 /* Latest */,
|
|
35977
|
-
/*
|
|
35977
|
+
/*syntaxCursor*/
|
|
35978
35978
|
void 0,
|
|
35979
35979
|
1 /* JS */
|
|
35980
35980
|
);
|
|
@@ -41751,7 +41751,7 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
41751
41751
|
2 /* JavaScript */,
|
|
41752
41752
|
/*isConfigLookup*/
|
|
41753
41753
|
false,
|
|
41754
|
-
/*
|
|
41754
|
+
/*redirectedReference*/
|
|
41755
41755
|
void 0
|
|
41756
41756
|
);
|
|
41757
41757
|
}
|
|
@@ -41789,7 +41789,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
41789
41789
|
}
|
|
41790
41790
|
function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
41791
41791
|
return nodeModuleNameResolverWorker(
|
|
41792
|
-
|
|
41792
|
+
30 /* NodeNextDefault */,
|
|
41793
41793
|
moduleName,
|
|
41794
41794
|
getDirectoryPath(containingFile),
|
|
41795
41795
|
{ moduleResolution: 99 /* NodeNext */ },
|
|
@@ -42168,7 +42168,7 @@ function loadEntrypointsFromExportMap(scope, exports, state, extensions) {
|
|
|
42168
42168
|
const result = loadFileNameFromPackageJsonField(
|
|
42169
42169
|
extensions,
|
|
42170
42170
|
finalPath,
|
|
42171
|
-
/*
|
|
42171
|
+
/*onlyRecordFailures*/
|
|
42172
42172
|
false,
|
|
42173
42173
|
state
|
|
42174
42174
|
);
|
|
@@ -45648,7 +45648,7 @@ function createBinder() {
|
|
|
45648
45648
|
parentSymbol,
|
|
45649
45649
|
node.left.expression,
|
|
45650
45650
|
isTopLevelNamespaceAssignment(node.left),
|
|
45651
|
-
/*
|
|
45651
|
+
/*isPrototypeProperty*/
|
|
45652
45652
|
false,
|
|
45653
45653
|
/*containerIsClass*/
|
|
45654
45654
|
false
|
|
@@ -45780,7 +45780,7 @@ function createBinder() {
|
|
|
45780
45780
|
function bindCallExpression(node) {
|
|
45781
45781
|
if (!file.commonJsModuleIndicator && isRequireCall(
|
|
45782
45782
|
node,
|
|
45783
|
-
/*
|
|
45783
|
+
/*requireStringLiteralLikeArgument*/
|
|
45784
45784
|
false
|
|
45785
45785
|
)) {
|
|
45786
45786
|
setCommonJsModuleIndicator(node);
|
|
@@ -47695,21 +47695,77 @@ function createTypeChecker(host) {
|
|
|
47695
47695
|
}
|
|
47696
47696
|
return t;
|
|
47697
47697
|
}, () => "(unreliable reporter)");
|
|
47698
|
-
var emptyObjectType = createAnonymousType(
|
|
47699
|
-
|
|
47698
|
+
var emptyObjectType = createAnonymousType(
|
|
47699
|
+
/*symbol*/
|
|
47700
|
+
void 0,
|
|
47701
|
+
emptySymbols,
|
|
47702
|
+
emptyArray,
|
|
47703
|
+
emptyArray,
|
|
47704
|
+
emptyArray
|
|
47705
|
+
);
|
|
47706
|
+
var emptyJsxObjectType = createAnonymousType(
|
|
47707
|
+
/*symbol*/
|
|
47708
|
+
void 0,
|
|
47709
|
+
emptySymbols,
|
|
47710
|
+
emptyArray,
|
|
47711
|
+
emptyArray,
|
|
47712
|
+
emptyArray
|
|
47713
|
+
);
|
|
47700
47714
|
emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
|
|
47701
47715
|
var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
|
|
47702
47716
|
emptyTypeLiteralSymbol.members = createSymbolTable();
|
|
47703
47717
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray);
|
|
47704
|
-
var unknownEmptyObjectType = createAnonymousType(
|
|
47718
|
+
var unknownEmptyObjectType = createAnonymousType(
|
|
47719
|
+
/*symbol*/
|
|
47720
|
+
void 0,
|
|
47721
|
+
emptySymbols,
|
|
47722
|
+
emptyArray,
|
|
47723
|
+
emptyArray,
|
|
47724
|
+
emptyArray
|
|
47725
|
+
);
|
|
47705
47726
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
47706
|
-
var emptyGenericType = createAnonymousType(
|
|
47727
|
+
var emptyGenericType = createAnonymousType(
|
|
47728
|
+
/*symbol*/
|
|
47729
|
+
void 0,
|
|
47730
|
+
emptySymbols,
|
|
47731
|
+
emptyArray,
|
|
47732
|
+
emptyArray,
|
|
47733
|
+
emptyArray
|
|
47734
|
+
);
|
|
47707
47735
|
emptyGenericType.instantiations = /* @__PURE__ */ new Map();
|
|
47708
|
-
var anyFunctionType = createAnonymousType(
|
|
47736
|
+
var anyFunctionType = createAnonymousType(
|
|
47737
|
+
/*symbol*/
|
|
47738
|
+
void 0,
|
|
47739
|
+
emptySymbols,
|
|
47740
|
+
emptyArray,
|
|
47741
|
+
emptyArray,
|
|
47742
|
+
emptyArray
|
|
47743
|
+
);
|
|
47709
47744
|
anyFunctionType.objectFlags |= 262144 /* NonInferrableType */;
|
|
47710
|
-
var noConstraintType = createAnonymousType(
|
|
47711
|
-
|
|
47712
|
-
|
|
47745
|
+
var noConstraintType = createAnonymousType(
|
|
47746
|
+
/*symbol*/
|
|
47747
|
+
void 0,
|
|
47748
|
+
emptySymbols,
|
|
47749
|
+
emptyArray,
|
|
47750
|
+
emptyArray,
|
|
47751
|
+
emptyArray
|
|
47752
|
+
);
|
|
47753
|
+
var circularConstraintType = createAnonymousType(
|
|
47754
|
+
/*symbol*/
|
|
47755
|
+
void 0,
|
|
47756
|
+
emptySymbols,
|
|
47757
|
+
emptyArray,
|
|
47758
|
+
emptyArray,
|
|
47759
|
+
emptyArray
|
|
47760
|
+
);
|
|
47761
|
+
var resolvingDefaultType = createAnonymousType(
|
|
47762
|
+
/*symbol*/
|
|
47763
|
+
void 0,
|
|
47764
|
+
emptySymbols,
|
|
47765
|
+
emptyArray,
|
|
47766
|
+
emptyArray,
|
|
47767
|
+
emptyArray
|
|
47768
|
+
);
|
|
47713
47769
|
var markerSuperType = createTypeParameter();
|
|
47714
47770
|
var markerSubType = createTypeParameter();
|
|
47715
47771
|
markerSubType.constraint = markerSuperType;
|
|
@@ -47719,8 +47775,11 @@ function createTypeChecker(host) {
|
|
|
47719
47775
|
markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
|
|
47720
47776
|
var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
|
|
47721
47777
|
var anySignature = createSignature(
|
|
47778
|
+
/*declaration*/
|
|
47722
47779
|
void 0,
|
|
47780
|
+
/*typeParameters*/
|
|
47723
47781
|
void 0,
|
|
47782
|
+
/*thisParameter*/
|
|
47724
47783
|
void 0,
|
|
47725
47784
|
emptyArray,
|
|
47726
47785
|
anyType,
|
|
@@ -47730,8 +47789,11 @@ function createTypeChecker(host) {
|
|
|
47730
47789
|
0 /* None */
|
|
47731
47790
|
);
|
|
47732
47791
|
var unknownSignature = createSignature(
|
|
47792
|
+
/*declaration*/
|
|
47733
47793
|
void 0,
|
|
47794
|
+
/*typeParameters*/
|
|
47734
47795
|
void 0,
|
|
47796
|
+
/*thisParameter*/
|
|
47735
47797
|
void 0,
|
|
47736
47798
|
emptyArray,
|
|
47737
47799
|
errorType,
|
|
@@ -47741,8 +47803,11 @@ function createTypeChecker(host) {
|
|
|
47741
47803
|
0 /* None */
|
|
47742
47804
|
);
|
|
47743
47805
|
var resolvingSignature = createSignature(
|
|
47806
|
+
/*declaration*/
|
|
47744
47807
|
void 0,
|
|
47808
|
+
/*typeParameters*/
|
|
47745
47809
|
void 0,
|
|
47810
|
+
/*thisParameter*/
|
|
47746
47811
|
void 0,
|
|
47747
47812
|
emptyArray,
|
|
47748
47813
|
anyType,
|
|
@@ -47752,8 +47817,11 @@ function createTypeChecker(host) {
|
|
|
47752
47817
|
0 /* None */
|
|
47753
47818
|
);
|
|
47754
47819
|
var silentNeverSignature = createSignature(
|
|
47820
|
+
/*declaration*/
|
|
47755
47821
|
void 0,
|
|
47822
|
+
/*typeParameters*/
|
|
47756
47823
|
void 0,
|
|
47824
|
+
/*thisParameter*/
|
|
47757
47825
|
void 0,
|
|
47758
47826
|
emptyArray,
|
|
47759
47827
|
silentNeverType,
|
|
@@ -48810,7 +48878,7 @@ function createTypeChecker(host) {
|
|
|
48810
48878
|
if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) {
|
|
48811
48879
|
if (isRequireCall(
|
|
48812
48880
|
originalLocation.parent,
|
|
48813
|
-
/*
|
|
48881
|
+
/*requireStringLiteralLikeArgument*/
|
|
48814
48882
|
false
|
|
48815
48883
|
)) {
|
|
48816
48884
|
return requireSymbol;
|
|
@@ -49431,7 +49499,7 @@ function createTypeChecker(host) {
|
|
|
49431
49499
|
node,
|
|
49432
49500
|
moduleSymbol,
|
|
49433
49501
|
resolved,
|
|
49434
|
-
/*
|
|
49502
|
+
/*overwriteEmpty*/
|
|
49435
49503
|
false
|
|
49436
49504
|
);
|
|
49437
49505
|
return resolved;
|
|
@@ -49441,7 +49509,7 @@ function createTypeChecker(host) {
|
|
|
49441
49509
|
exportDefaultSymbol,
|
|
49442
49510
|
/*finalTarget*/
|
|
49443
49511
|
void 0,
|
|
49444
|
-
/*
|
|
49512
|
+
/*overwriteEmpty*/
|
|
49445
49513
|
false
|
|
49446
49514
|
);
|
|
49447
49515
|
return exportDefaultSymbol;
|
|
@@ -49492,7 +49560,7 @@ function createTypeChecker(host) {
|
|
|
49492
49560
|
immediate,
|
|
49493
49561
|
moduleSpecifier,
|
|
49494
49562
|
dontResolveAlias,
|
|
49495
|
-
/*
|
|
49563
|
+
/*suppressInteropError*/
|
|
49496
49564
|
false
|
|
49497
49565
|
);
|
|
49498
49566
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -49511,7 +49579,7 @@ function createTypeChecker(host) {
|
|
|
49511
49579
|
immediate,
|
|
49512
49580
|
moduleSpecifier,
|
|
49513
49581
|
dontResolveAlias,
|
|
49514
|
-
/*
|
|
49582
|
+
/*suppressInteropError*/
|
|
49515
49583
|
false
|
|
49516
49584
|
);
|
|
49517
49585
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -50003,6 +50071,7 @@ function createTypeChecker(host) {
|
|
|
50003
50071
|
left,
|
|
50004
50072
|
left.escapedText,
|
|
50005
50073
|
111551 /* Value */,
|
|
50074
|
+
/*nameNotFoundMessage*/
|
|
50006
50075
|
void 0,
|
|
50007
50076
|
left,
|
|
50008
50077
|
/*isUse*/
|
|
@@ -50038,6 +50107,7 @@ function createTypeChecker(host) {
|
|
|
50038
50107
|
name,
|
|
50039
50108
|
/*isUse*/
|
|
50040
50109
|
true,
|
|
50110
|
+
/*excludeGlobals*/
|
|
50041
50111
|
false
|
|
50042
50112
|
));
|
|
50043
50113
|
if (!symbol) {
|
|
@@ -50742,7 +50812,7 @@ function createTypeChecker(host) {
|
|
|
50742
50812
|
container,
|
|
50743
50813
|
enclosingDeclaration,
|
|
50744
50814
|
1920 /* Namespace */,
|
|
50745
|
-
/*
|
|
50815
|
+
/*useOnlyExternalAliasing*/
|
|
50746
50816
|
false
|
|
50747
50817
|
)) {
|
|
50748
50818
|
return append(concatenate(concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer);
|
|
@@ -51055,7 +51125,7 @@ function createTypeChecker(host) {
|
|
|
51055
51125
|
if (symbolFromSymbolTable.escapedName === symbol.escapedName && symbolFromSymbolTable.exportSymbol) {
|
|
51056
51126
|
if (isAccessible(
|
|
51057
51127
|
getMergedSymbol(symbolFromSymbolTable.exportSymbol),
|
|
51058
|
-
/*
|
|
51128
|
+
/*resolvedAliasSymbol*/
|
|
51059
51129
|
void 0,
|
|
51060
51130
|
ignoreQualification
|
|
51061
51131
|
)) {
|
|
@@ -51307,7 +51377,7 @@ function createTypeChecker(host) {
|
|
|
51307
51377
|
enclosingDeclaration,
|
|
51308
51378
|
firstIdentifier.escapedText,
|
|
51309
51379
|
meaning,
|
|
51310
|
-
/*
|
|
51380
|
+
/*nameNotFoundMessage*/
|
|
51311
51381
|
void 0,
|
|
51312
51382
|
/*nameArg*/
|
|
51313
51383
|
void 0,
|
|
@@ -51327,7 +51397,7 @@ function createTypeChecker(host) {
|
|
|
51327
51397
|
)),
|
|
51328
51398
|
firstIdentifier,
|
|
51329
51399
|
meaning,
|
|
51330
|
-
/*
|
|
51400
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
51331
51401
|
false
|
|
51332
51402
|
).accessibility === 0 /* Accessible */) {
|
|
51333
51403
|
return { accessibility: 0 /* Accessible */ };
|
|
@@ -51886,7 +51956,7 @@ function createTypeChecker(host) {
|
|
|
51886
51956
|
symbol,
|
|
51887
51957
|
context.enclosingDeclaration,
|
|
51888
51958
|
isInstanceType,
|
|
51889
|
-
/*
|
|
51959
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
51890
51960
|
false
|
|
51891
51961
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
51892
51962
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -51982,7 +52052,7 @@ function createTypeChecker(host) {
|
|
|
51982
52052
|
function deepCloneOrReuseNodes(nodes, visitor, test, start2, count) {
|
|
51983
52053
|
if (nodes && nodes.length === 0) {
|
|
51984
52054
|
return setTextRange(factory.createNodeArray(
|
|
51985
|
-
/*
|
|
52055
|
+
/*elements*/
|
|
51986
52056
|
void 0,
|
|
51987
52057
|
nodes.hasTrailingComma
|
|
51988
52058
|
), nodes);
|
|
@@ -52570,12 +52640,12 @@ function createTypeChecker(host) {
|
|
|
52570
52640
|
const thisTag = getJSDocThisTag(signature.declaration);
|
|
52571
52641
|
if (thisTag && thisTag.typeExpression) {
|
|
52572
52642
|
return factory.createParameterDeclaration(
|
|
52573
|
-
/*
|
|
52643
|
+
/*modifiers*/
|
|
52574
52644
|
void 0,
|
|
52575
|
-
/*
|
|
52645
|
+
/*dotDotDotToken*/
|
|
52576
52646
|
void 0,
|
|
52577
52647
|
"this",
|
|
52578
|
-
/*
|
|
52648
|
+
/*questionToken*/
|
|
52579
52649
|
void 0,
|
|
52580
52650
|
typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context)
|
|
52581
52651
|
);
|
|
@@ -52662,7 +52732,7 @@ function createTypeChecker(host) {
|
|
|
52662
52732
|
firstIdentifier,
|
|
52663
52733
|
firstIdentifier.escapedText,
|
|
52664
52734
|
111551 /* Value */ | 1048576 /* ExportValue */,
|
|
52665
|
-
/*
|
|
52735
|
+
/*nameNotFoundMessage*/
|
|
52666
52736
|
void 0,
|
|
52667
52737
|
/*nameArg*/
|
|
52668
52738
|
void 0,
|
|
@@ -52995,7 +53065,7 @@ function createTypeChecker(host) {
|
|
|
52995
53065
|
context.enclosingDeclaration,
|
|
52996
53066
|
escapedName,
|
|
52997
53067
|
788968 /* Type */,
|
|
52998
|
-
/*
|
|
53068
|
+
/*nameNotFoundMessage*/
|
|
52999
53069
|
void 0,
|
|
53000
53070
|
escapedName,
|
|
53001
53071
|
/*isUse*/
|
|
@@ -53237,7 +53307,7 @@ function createTypeChecker(host) {
|
|
|
53237
53307
|
67108863 /* All */,
|
|
53238
53308
|
/*ignoreErrors*/
|
|
53239
53309
|
true,
|
|
53240
|
-
/*
|
|
53310
|
+
/*dontResolveAlias*/
|
|
53241
53311
|
true
|
|
53242
53312
|
);
|
|
53243
53313
|
if (sym) {
|
|
@@ -53316,7 +53386,7 @@ function createTypeChecker(host) {
|
|
|
53316
53386
|
[factory.createParameterDeclaration(
|
|
53317
53387
|
/*modifiers*/
|
|
53318
53388
|
void 0,
|
|
53319
|
-
/*
|
|
53389
|
+
/*dotDotDotToken*/
|
|
53320
53390
|
void 0,
|
|
53321
53391
|
"x",
|
|
53322
53392
|
/*questionToken*/
|
|
@@ -53439,13 +53509,13 @@ function createTypeChecker(host) {
|
|
|
53439
53509
|
const serializePropertySymbolForClass = makeSerializePropertySymbol(
|
|
53440
53510
|
factory.createPropertyDeclaration,
|
|
53441
53511
|
172 /* MethodDeclaration */,
|
|
53442
|
-
/*
|
|
53512
|
+
/*useAccessors*/
|
|
53443
53513
|
true
|
|
53444
53514
|
);
|
|
53445
53515
|
const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(
|
|
53446
53516
|
(mods, name, question, type) => factory.createPropertySignature(mods, name, question, type),
|
|
53447
53517
|
171 /* MethodSignature */,
|
|
53448
|
-
/*
|
|
53518
|
+
/*useAccessors*/
|
|
53449
53519
|
false
|
|
53450
53520
|
);
|
|
53451
53521
|
const enclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -53467,7 +53537,7 @@ function createTypeChecker(host) {
|
|
|
53467
53537
|
sym,
|
|
53468
53538
|
decl,
|
|
53469
53539
|
meaning,
|
|
53470
|
-
/*
|
|
53540
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
53471
53541
|
false
|
|
53472
53542
|
);
|
|
53473
53543
|
if (accessibleResult.accessibility === 0 /* Accessible */) {
|
|
@@ -53526,7 +53596,7 @@ function createTypeChecker(host) {
|
|
|
53526
53596
|
factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(
|
|
53527
53597
|
/*isTypeOnly*/
|
|
53528
53598
|
false,
|
|
53529
|
-
/*
|
|
53599
|
+
/*propertyName*/
|
|
53530
53600
|
void 0,
|
|
53531
53601
|
id
|
|
53532
53602
|
))),
|
|
@@ -53819,7 +53889,7 @@ function createTypeChecker(host) {
|
|
|
53819
53889
|
addResult(factory.createExportAssignment(
|
|
53820
53890
|
/*modifiers*/
|
|
53821
53891
|
void 0,
|
|
53822
|
-
/*
|
|
53892
|
+
/*isExportEquals*/
|
|
53823
53893
|
false,
|
|
53824
53894
|
factory.createIdentifier(getInternalSymbolName(symbol, symbolName2))
|
|
53825
53895
|
), 0 /* None */);
|
|
@@ -54242,7 +54312,7 @@ function createTypeChecker(host) {
|
|
|
54242
54312
|
)])
|
|
54243
54313
|
),
|
|
54244
54314
|
factory.createStringLiteral(specifier2),
|
|
54245
|
-
/*
|
|
54315
|
+
/*assertClause*/
|
|
54246
54316
|
void 0
|
|
54247
54317
|
), 0 /* None */);
|
|
54248
54318
|
break;
|
|
@@ -54331,7 +54401,7 @@ function createTypeChecker(host) {
|
|
|
54331
54401
|
factory.createImportClause(
|
|
54332
54402
|
/*isTypeOnly*/
|
|
54333
54403
|
false,
|
|
54334
|
-
/*
|
|
54404
|
+
/*name*/
|
|
54335
54405
|
void 0,
|
|
54336
54406
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
54337
54407
|
),
|
|
@@ -54359,7 +54429,7 @@ function createTypeChecker(host) {
|
|
|
54359
54429
|
factory.createImportClause(
|
|
54360
54430
|
/*isTypeOnly*/
|
|
54361
54431
|
false,
|
|
54362
|
-
/*
|
|
54432
|
+
/*name*/
|
|
54363
54433
|
void 0,
|
|
54364
54434
|
factory.createNamedImports([
|
|
54365
54435
|
factory.createImportSpecifier(
|
|
@@ -54720,7 +54790,7 @@ function createTypeChecker(host) {
|
|
|
54720
54790
|
addResult(statement, 0 /* None */);
|
|
54721
54791
|
return factory.createExpressionWithTypeArguments(
|
|
54722
54792
|
factory.createIdentifier(tempName),
|
|
54723
|
-
/*
|
|
54793
|
+
/*typeArguments*/
|
|
54724
54794
|
void 0
|
|
54725
54795
|
);
|
|
54726
54796
|
}
|
|
@@ -54745,7 +54815,7 @@ function createTypeChecker(host) {
|
|
|
54745
54815
|
if (t.symbol) {
|
|
54746
54816
|
return factory.createExpressionWithTypeArguments(
|
|
54747
54817
|
symbolToExpression(t.symbol, context, 788968 /* Type */),
|
|
54748
|
-
/*
|
|
54818
|
+
/*typeArguments*/
|
|
54749
54819
|
void 0
|
|
54750
54820
|
);
|
|
54751
54821
|
}
|
|
@@ -55051,7 +55121,9 @@ function createTypeChecker(host) {
|
|
|
55051
55121
|
declaration,
|
|
55052
55122
|
firstIdentifier.escapedText,
|
|
55053
55123
|
111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,
|
|
55124
|
+
/*nameNotFoundMessage*/
|
|
55054
55125
|
void 0,
|
|
55126
|
+
/*nameArg*/
|
|
55055
55127
|
void 0,
|
|
55056
55128
|
/*isUse*/
|
|
55057
55129
|
false
|
|
@@ -55836,7 +55908,14 @@ function createTypeChecker(host) {
|
|
|
55836
55908
|
symbol.links.bindingElement = e;
|
|
55837
55909
|
members.set(symbol.escapedName, symbol);
|
|
55838
55910
|
});
|
|
55839
|
-
const result = createAnonymousType(
|
|
55911
|
+
const result = createAnonymousType(
|
|
55912
|
+
/*symbol*/
|
|
55913
|
+
void 0,
|
|
55914
|
+
members,
|
|
55915
|
+
emptyArray,
|
|
55916
|
+
emptyArray,
|
|
55917
|
+
stringIndexInfo ? [stringIndexInfo] : emptyArray
|
|
55918
|
+
);
|
|
55840
55919
|
result.objectFlags |= objectFlags;
|
|
55841
55920
|
if (includePatternInType) {
|
|
55842
55921
|
result.pattern = pattern;
|
|
@@ -55998,7 +56077,7 @@ function createTypeChecker(host) {
|
|
|
55998
56077
|
} else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) {
|
|
55999
56078
|
type = getWidenedTypeForVariableLikeDeclaration(
|
|
56000
56079
|
declaration,
|
|
56001
|
-
/*
|
|
56080
|
+
/*reportErrors*/
|
|
56002
56081
|
true
|
|
56003
56082
|
);
|
|
56004
56083
|
} else if (isEnumDeclaration(declaration)) {
|
|
@@ -56055,7 +56134,7 @@ function createTypeChecker(host) {
|
|
|
56055
56134
|
const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);
|
|
56056
56135
|
let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration(
|
|
56057
56136
|
accessor,
|
|
56058
|
-
/*
|
|
56137
|
+
/*reportErrors*/
|
|
56059
56138
|
true
|
|
56060
56139
|
);
|
|
56061
56140
|
if (!type) {
|
|
@@ -56169,7 +56248,7 @@ function createTypeChecker(host) {
|
|
|
56169
56248
|
const targetSymbol = resolveAlias(symbol);
|
|
56170
56249
|
const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(
|
|
56171
56250
|
getDeclarationOfAliasSymbol(symbol),
|
|
56172
|
-
/*
|
|
56251
|
+
/*dontRecursivelyResolve*/
|
|
56173
56252
|
true
|
|
56174
56253
|
);
|
|
56175
56254
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
@@ -57200,8 +57279,10 @@ function createTypeChecker(host) {
|
|
|
57200
57279
|
const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */);
|
|
57201
57280
|
if (baseSignatures.length === 0) {
|
|
57202
57281
|
return [createSignature(
|
|
57282
|
+
/*declaration*/
|
|
57203
57283
|
void 0,
|
|
57204
57284
|
classType.localTypeParameters,
|
|
57285
|
+
/*thisParameter*/
|
|
57205
57286
|
void 0,
|
|
57206
57287
|
emptyArray,
|
|
57207
57288
|
classType,
|
|
@@ -58191,7 +58272,7 @@ function createTypeChecker(host) {
|
|
|
58191
58272
|
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
58192
58273
|
type,
|
|
58193
58274
|
type,
|
|
58194
|
-
/*
|
|
58275
|
+
/*needApparentType*/
|
|
58195
58276
|
true
|
|
58196
58277
|
));
|
|
58197
58278
|
}
|
|
@@ -58688,7 +58769,9 @@ function createTypeChecker(host) {
|
|
|
58688
58769
|
param,
|
|
58689
58770
|
paramSymbol.escapedName,
|
|
58690
58771
|
111551 /* Value */,
|
|
58772
|
+
/*nameNotFoundMessage*/
|
|
58691
58773
|
void 0,
|
|
58774
|
+
/*nameArg*/
|
|
58692
58775
|
void 0,
|
|
58693
58776
|
/*isUse*/
|
|
58694
58777
|
false
|
|
@@ -59585,7 +59668,14 @@ function createTypeChecker(host) {
|
|
|
59585
59668
|
/*isReadonly*/
|
|
59586
59669
|
false
|
|
59587
59670
|
)] : emptyArray;
|
|
59588
|
-
return createAnonymousType(
|
|
59671
|
+
return createAnonymousType(
|
|
59672
|
+
/*symbol*/
|
|
59673
|
+
void 0,
|
|
59674
|
+
emptySymbols,
|
|
59675
|
+
emptyArray,
|
|
59676
|
+
emptyArray,
|
|
59677
|
+
indexInfo
|
|
59678
|
+
);
|
|
59589
59679
|
}
|
|
59590
59680
|
return anyType;
|
|
59591
59681
|
}
|
|
@@ -59693,6 +59783,7 @@ function createTypeChecker(host) {
|
|
|
59693
59783
|
}
|
|
59694
59784
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
59695
59785
|
return resolveName(
|
|
59786
|
+
/*location*/
|
|
59696
59787
|
void 0,
|
|
59697
59788
|
name,
|
|
59698
59789
|
meaning,
|
|
@@ -61252,7 +61343,7 @@ function createTypeChecker(host) {
|
|
|
61252
61343
|
let errorInfo;
|
|
61253
61344
|
if (indexType.flags & 1024 /* EnumLiteral */) {
|
|
61254
61345
|
errorInfo = chainDiagnosticMessages(
|
|
61255
|
-
/*
|
|
61346
|
+
/*details*/
|
|
61256
61347
|
void 0,
|
|
61257
61348
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
61258
61349
|
"[" + typeToString(indexType) + "]",
|
|
@@ -61261,7 +61352,7 @@ function createTypeChecker(host) {
|
|
|
61261
61352
|
} else if (indexType.flags & 8192 /* UniqueESSymbol */) {
|
|
61262
61353
|
const symbolName2 = getFullyQualifiedName(indexType.symbol, accessExpression);
|
|
61263
61354
|
errorInfo = chainDiagnosticMessages(
|
|
61264
|
-
/*
|
|
61355
|
+
/*details*/
|
|
61265
61356
|
void 0,
|
|
61266
61357
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
61267
61358
|
"[" + symbolName2 + "]",
|
|
@@ -61269,7 +61360,7 @@ function createTypeChecker(host) {
|
|
|
61269
61360
|
);
|
|
61270
61361
|
} else if (indexType.flags & 128 /* StringLiteral */) {
|
|
61271
61362
|
errorInfo = chainDiagnosticMessages(
|
|
61272
|
-
/*
|
|
61363
|
+
/*details*/
|
|
61273
61364
|
void 0,
|
|
61274
61365
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
61275
61366
|
indexType.value,
|
|
@@ -61277,7 +61368,7 @@ function createTypeChecker(host) {
|
|
|
61277
61368
|
);
|
|
61278
61369
|
} else if (indexType.flags & 256 /* NumberLiteral */) {
|
|
61279
61370
|
errorInfo = chainDiagnosticMessages(
|
|
61280
|
-
/*
|
|
61371
|
+
/*details*/
|
|
61281
61372
|
void 0,
|
|
61282
61373
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
61283
61374
|
indexType.value,
|
|
@@ -61285,7 +61376,7 @@ function createTypeChecker(host) {
|
|
|
61285
61376
|
);
|
|
61286
61377
|
} else if (indexType.flags & (8 /* Number */ | 4 /* String */)) {
|
|
61287
61378
|
errorInfo = chainDiagnosticMessages(
|
|
61288
|
-
/*
|
|
61379
|
+
/*details*/
|
|
61289
61380
|
void 0,
|
|
61290
61381
|
Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,
|
|
61291
61382
|
typeToString(indexType),
|
|
@@ -62905,7 +62996,7 @@ function createTypeChecker(host) {
|
|
|
62905
62996
|
targetReturn,
|
|
62906
62997
|
relation,
|
|
62907
62998
|
returnExpression,
|
|
62908
|
-
/*
|
|
62999
|
+
/*headMessage*/
|
|
62909
63000
|
void 0,
|
|
62910
63001
|
containingMessageChain,
|
|
62911
63002
|
resultObj
|
|
@@ -63229,7 +63320,7 @@ function createTypeChecker(host) {
|
|
|
63229
63320
|
const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
|
|
63230
63321
|
const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
|
|
63231
63322
|
invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
|
|
63232
|
-
/*
|
|
63323
|
+
/*dummy*/
|
|
63233
63324
|
void 0,
|
|
63234
63325
|
diagnostic,
|
|
63235
63326
|
tagNameText,
|
|
@@ -63320,7 +63411,7 @@ function createTypeChecker(host) {
|
|
|
63320
63411
|
false,
|
|
63321
63412
|
/*errorReporter*/
|
|
63322
63413
|
void 0,
|
|
63323
|
-
/*
|
|
63414
|
+
/*incompatibleErrorReporter*/
|
|
63324
63415
|
void 0,
|
|
63325
63416
|
compareTypesAssignable,
|
|
63326
63417
|
/*reportUnreliableMarkers*/
|
|
@@ -63394,12 +63485,7 @@ function createTypeChecker(host) {
|
|
|
63394
63485
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
63395
63486
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
63396
63487
|
for (let i = 0; i < paramCount; i++) {
|
|
63397
|
-
const sourceType = i === restIndex ? getRestTypeAtPosition(
|
|
63398
|
-
source,
|
|
63399
|
-
i,
|
|
63400
|
-
/*readonly*/
|
|
63401
|
-
true
|
|
63402
|
-
) : tryGetTypeAtPosition(source, i);
|
|
63488
|
+
const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
|
|
63403
63489
|
const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
|
|
63404
63490
|
if (sourceType && targetType) {
|
|
63405
63491
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
@@ -63792,7 +63878,7 @@ function createTypeChecker(host) {
|
|
|
63792
63878
|
reportError(...stack[0]);
|
|
63793
63879
|
if (info) {
|
|
63794
63880
|
reportRelationError(
|
|
63795
|
-
/*
|
|
63881
|
+
/*message*/
|
|
63796
63882
|
void 0,
|
|
63797
63883
|
...info
|
|
63798
63884
|
);
|
|
@@ -63867,7 +63953,7 @@ function createTypeChecker(host) {
|
|
|
63867
63953
|
}
|
|
63868
63954
|
if (info) {
|
|
63869
63955
|
reportRelationError(
|
|
63870
|
-
/*
|
|
63956
|
+
/*message*/
|
|
63871
63957
|
void 0,
|
|
63872
63958
|
...info
|
|
63873
63959
|
);
|
|
@@ -64309,7 +64395,7 @@ function createTypeChecker(host) {
|
|
|
64309
64395
|
if (containsType(targetTypes, source2)) {
|
|
64310
64396
|
return -1 /* True */;
|
|
64311
64397
|
}
|
|
64312
|
-
if (getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
|
|
64398
|
+
if (relation !== comparableRelation && getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
|
|
64313
64399
|
const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType;
|
|
64314
64400
|
const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0;
|
|
64315
64401
|
return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */;
|
|
@@ -64540,7 +64626,7 @@ function createTypeChecker(host) {
|
|
|
64540
64626
|
target2,
|
|
64541
64627
|
intersectionState,
|
|
64542
64628
|
relation,
|
|
64543
|
-
/*
|
|
64629
|
+
/*ignoreConstraints*/
|
|
64544
64630
|
false
|
|
64545
64631
|
);
|
|
64546
64632
|
const entry = relation.get(id);
|
|
@@ -64936,7 +65022,7 @@ function createTypeChecker(host) {
|
|
|
64936
65022
|
constraint,
|
|
64937
65023
|
2 /* Target */,
|
|
64938
65024
|
reportErrors2,
|
|
64939
|
-
/*
|
|
65025
|
+
/*headMessage*/
|
|
64940
65026
|
void 0,
|
|
64941
65027
|
intersectionState
|
|
64942
65028
|
)) {
|
|
@@ -65348,7 +65434,7 @@ function createTypeChecker(host) {
|
|
|
65348
65434
|
source2,
|
|
65349
65435
|
type,
|
|
65350
65436
|
0 /* Call */,
|
|
65351
|
-
/*
|
|
65437
|
+
/*reportErrors*/
|
|
65352
65438
|
false,
|
|
65353
65439
|
0 /* None */
|
|
65354
65440
|
);
|
|
@@ -65357,7 +65443,7 @@ function createTypeChecker(host) {
|
|
|
65357
65443
|
source2,
|
|
65358
65444
|
type,
|
|
65359
65445
|
1 /* Construct */,
|
|
65360
|
-
/*
|
|
65446
|
+
/*reportErrors*/
|
|
65361
65447
|
false,
|
|
65362
65448
|
0 /* None */
|
|
65363
65449
|
);
|
|
@@ -65367,7 +65453,7 @@ function createTypeChecker(host) {
|
|
|
65367
65453
|
type,
|
|
65368
65454
|
/*sourceIsPrimitive*/
|
|
65369
65455
|
false,
|
|
65370
|
-
/*
|
|
65456
|
+
/*reportErrors*/
|
|
65371
65457
|
false,
|
|
65372
65458
|
0 /* None */
|
|
65373
65459
|
);
|
|
@@ -66857,6 +66943,7 @@ function createTypeChecker(host) {
|
|
|
66857
66943
|
param,
|
|
66858
66944
|
param.name.escapedText,
|
|
66859
66945
|
788968 /* Type */,
|
|
66946
|
+
/*nameNotFoundMessage*/
|
|
66860
66947
|
void 0,
|
|
66861
66948
|
param.name.escapedText,
|
|
66862
66949
|
/*isUse*/
|
|
@@ -67084,7 +67171,14 @@ function createTypeChecker(host) {
|
|
|
67084
67171
|
/*isReadonly*/
|
|
67085
67172
|
false
|
|
67086
67173
|
)] : emptyArray;
|
|
67087
|
-
return createAnonymousType(
|
|
67174
|
+
return createAnonymousType(
|
|
67175
|
+
/*symbol*/
|
|
67176
|
+
void 0,
|
|
67177
|
+
members,
|
|
67178
|
+
emptyArray,
|
|
67179
|
+
emptyArray,
|
|
67180
|
+
indexInfos
|
|
67181
|
+
);
|
|
67088
67182
|
}
|
|
67089
67183
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
67090
67184
|
if (inInferTypeForHomomorphicMappedType) {
|
|
@@ -68580,7 +68674,7 @@ function createTypeChecker(host) {
|
|
|
68580
68674
|
return source.flags & 1048576 /* Union */ ? !forEach(source.types, (t) => !contains(types, t)) : contains(types, source);
|
|
68581
68675
|
}
|
|
68582
68676
|
function isTypeSubsetOf(source, target) {
|
|
68583
|
-
return source === target || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target);
|
|
68677
|
+
return !!(source === target || source.flags & 131072 /* Never */ || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target));
|
|
68584
68678
|
}
|
|
68585
68679
|
function isTypeSubsetOfUnion(source, target) {
|
|
68586
68680
|
if (source.flags & 1048576 /* Union */) {
|
|
@@ -69280,7 +69374,7 @@ function createTypeChecker(host) {
|
|
|
69280
69374
|
return type;
|
|
69281
69375
|
}
|
|
69282
69376
|
pushIfUnique(antecedentTypes, type);
|
|
69283
|
-
if (!isTypeSubsetOf(type,
|
|
69377
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
69284
69378
|
subtypeReduction = true;
|
|
69285
69379
|
}
|
|
69286
69380
|
if (isIncomplete(flowType)) {
|
|
@@ -69295,7 +69389,7 @@ function createTypeChecker(host) {
|
|
|
69295
69389
|
return type;
|
|
69296
69390
|
}
|
|
69297
69391
|
antecedentTypes.push(type);
|
|
69298
|
-
if (!isTypeSubsetOf(type,
|
|
69392
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
69299
69393
|
subtypeReduction = true;
|
|
69300
69394
|
}
|
|
69301
69395
|
if (isIncomplete(flowType)) {
|
|
@@ -69349,7 +69443,7 @@ function createTypeChecker(host) {
|
|
|
69349
69443
|
}
|
|
69350
69444
|
const type = getTypeFromFlowType(flowType);
|
|
69351
69445
|
pushIfUnique(antecedentTypes, type);
|
|
69352
|
-
if (!isTypeSubsetOf(type,
|
|
69446
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
69353
69447
|
subtypeReduction = true;
|
|
69354
69448
|
}
|
|
69355
69449
|
if (type === declaredType) {
|
|
@@ -70429,7 +70523,7 @@ function createTypeChecker(host) {
|
|
|
70429
70523
|
const isNodeInTypeQuery = isInTypeQuery(node);
|
|
70430
70524
|
let container = getThisContainer(
|
|
70431
70525
|
node,
|
|
70432
|
-
/*
|
|
70526
|
+
/*includeArrowFunctions*/
|
|
70433
70527
|
true,
|
|
70434
70528
|
/*includeClassComputedPropertyName*/
|
|
70435
70529
|
true
|
|
@@ -70443,7 +70537,7 @@ function createTypeChecker(host) {
|
|
|
70443
70537
|
if (container.kind === 217 /* ArrowFunction */) {
|
|
70444
70538
|
container = getThisContainer(
|
|
70445
70539
|
container,
|
|
70446
|
-
/*
|
|
70540
|
+
/*includeArrowFunctions*/
|
|
70447
70541
|
false,
|
|
70448
70542
|
!thisInComputedPropertyName
|
|
70449
70543
|
);
|
|
@@ -71056,6 +71150,7 @@ function createTypeChecker(host) {
|
|
|
71056
71150
|
id,
|
|
71057
71151
|
id.escapedText,
|
|
71058
71152
|
111551 /* Value */,
|
|
71153
|
+
/*nameNotFoundMessage*/
|
|
71059
71154
|
void 0,
|
|
71060
71155
|
id.escapedText,
|
|
71061
71156
|
/*isUse*/
|
|
@@ -71105,7 +71200,9 @@ function createTypeChecker(host) {
|
|
|
71105
71200
|
declaration.left,
|
|
71106
71201
|
name,
|
|
71107
71202
|
111551 /* Value */,
|
|
71203
|
+
/*nameNotFoundMessage*/
|
|
71108
71204
|
void 0,
|
|
71205
|
+
/*nameArg*/
|
|
71109
71206
|
void 0,
|
|
71110
71207
|
/*isUse*/
|
|
71111
71208
|
true,
|
|
@@ -72458,7 +72555,7 @@ function createTypeChecker(host) {
|
|
|
72458
72555
|
location,
|
|
72459
72556
|
namespaceName,
|
|
72460
72557
|
1920 /* Namespace */,
|
|
72461
|
-
/*
|
|
72558
|
+
/*nameNotFoundMessage*/
|
|
72462
72559
|
void 0,
|
|
72463
72560
|
namespaceName,
|
|
72464
72561
|
/*isUse*/
|
|
@@ -72481,7 +72578,7 @@ function createTypeChecker(host) {
|
|
|
72481
72578
|
const s = resolveSymbol(getGlobalSymbol(
|
|
72482
72579
|
JsxNames.JSX,
|
|
72483
72580
|
1920 /* Namespace */,
|
|
72484
|
-
/*
|
|
72581
|
+
/*diagnostic*/
|
|
72485
72582
|
void 0
|
|
72486
72583
|
));
|
|
72487
72584
|
if (s === unknownSymbol) {
|
|
@@ -72575,7 +72672,7 @@ function createTypeChecker(host) {
|
|
|
72575
72672
|
function generateInitialErrorChain() {
|
|
72576
72673
|
const componentName = getTextOfNode(openingLikeElement.tagName);
|
|
72577
72674
|
return chainDiagnosticMessages(
|
|
72578
|
-
/*
|
|
72675
|
+
/*details*/
|
|
72579
72676
|
void 0,
|
|
72580
72677
|
Diagnostics._0_cannot_be_used_as_a_JSX_component,
|
|
72581
72678
|
componentName
|
|
@@ -72833,7 +72930,7 @@ function createTypeChecker(host) {
|
|
|
72833
72930
|
function getThisParameterFromNodeContext(node) {
|
|
72834
72931
|
const thisContainer = getThisContainer(
|
|
72835
72932
|
node,
|
|
72836
|
-
/*
|
|
72933
|
+
/*includeArrowFunctions*/
|
|
72837
72934
|
false,
|
|
72838
72935
|
/*includeClassComputedPropertyName*/
|
|
72839
72936
|
false
|
|
@@ -72971,9 +73068,9 @@ function createTypeChecker(host) {
|
|
|
72971
73068
|
if (symbol) {
|
|
72972
73069
|
markPropertyAsReferenced(
|
|
72973
73070
|
symbol,
|
|
72974
|
-
/*
|
|
73071
|
+
/*nodeForCheckWriteOnly*/
|
|
72975
73072
|
void 0,
|
|
72976
|
-
/*
|
|
73073
|
+
/*isSelfTypeAccess*/
|
|
72977
73074
|
false
|
|
72978
73075
|
);
|
|
72979
73076
|
}
|
|
@@ -73514,7 +73611,7 @@ function createTypeChecker(host) {
|
|
|
73514
73611
|
return isPropertyAccessible(
|
|
73515
73612
|
node,
|
|
73516
73613
|
node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */,
|
|
73517
|
-
/*
|
|
73614
|
+
/*isWrite*/
|
|
73518
73615
|
false,
|
|
73519
73616
|
type,
|
|
73520
73617
|
property
|
|
@@ -73528,7 +73625,7 @@ function createTypeChecker(host) {
|
|
|
73528
73625
|
return !!prop && isPropertyAccessible(
|
|
73529
73626
|
node,
|
|
73530
73627
|
isSuper,
|
|
73531
|
-
/*
|
|
73628
|
+
/*isWrite*/
|
|
73532
73629
|
false,
|
|
73533
73630
|
type,
|
|
73534
73631
|
prop
|
|
@@ -74241,7 +74338,17 @@ function createTypeChecker(host) {
|
|
|
74241
74338
|
function isPromiseResolveArityError(node) {
|
|
74242
74339
|
if (!isCallExpression(node) || !isIdentifier(node.expression))
|
|
74243
74340
|
return false;
|
|
74244
|
-
const symbol = resolveName(
|
|
74341
|
+
const symbol = resolveName(
|
|
74342
|
+
node.expression,
|
|
74343
|
+
node.expression.escapedText,
|
|
74344
|
+
111551 /* Value */,
|
|
74345
|
+
/*nameNotFoundMessage*/
|
|
74346
|
+
void 0,
|
|
74347
|
+
/*nameArg*/
|
|
74348
|
+
void 0,
|
|
74349
|
+
/*isUse*/
|
|
74350
|
+
false
|
|
74351
|
+
);
|
|
74245
74352
|
const decl = symbol == null ? void 0 : symbol.valueDeclaration;
|
|
74246
74353
|
if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) {
|
|
74247
74354
|
return false;
|
|
@@ -74720,7 +74827,7 @@ function createTypeChecker(host) {
|
|
|
74720
74827
|
parameters,
|
|
74721
74828
|
/*resolvedReturnType*/
|
|
74722
74829
|
getIntersectionType(candidates.map(getReturnTypeOfSignature)),
|
|
74723
|
-
/*
|
|
74830
|
+
/*resolvedTypePredicate*/
|
|
74724
74831
|
void 0,
|
|
74725
74832
|
minArgumentCount,
|
|
74726
74833
|
flags
|
|
@@ -74841,7 +74948,7 @@ function createTypeChecker(host) {
|
|
|
74841
74948
|
if (isLineBreak(text.charCodeAt(skipTrivia(
|
|
74842
74949
|
text,
|
|
74843
74950
|
node.expression.end,
|
|
74844
|
-
/*
|
|
74951
|
+
/*stopAfterLineBreak*/
|
|
74845
74952
|
true
|
|
74846
74953
|
) - 1))) {
|
|
74847
74954
|
relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon);
|
|
@@ -75020,7 +75127,7 @@ function createTypeChecker(host) {
|
|
|
75020
75127
|
}
|
|
75021
75128
|
if (!hasSignatures) {
|
|
75022
75129
|
errorInfo = chainDiagnosticMessages(
|
|
75023
|
-
/*
|
|
75130
|
+
/*details*/
|
|
75024
75131
|
void 0,
|
|
75025
75132
|
isCall ? Diagnostics.No_constituent_of_type_0_is_callable : Diagnostics.No_constituent_of_type_0_is_constructable,
|
|
75026
75133
|
typeToString(apparentType)
|
|
@@ -75061,7 +75168,7 @@ function createTypeChecker(host) {
|
|
|
75061
75168
|
if (isCallExpression(errorTarget.parent)) {
|
|
75062
75169
|
const { start: start2, length: length2 } = getDiagnosticSpanForCallNode(
|
|
75063
75170
|
errorTarget.parent,
|
|
75064
|
-
/*
|
|
75171
|
+
/*doNotIncludeArguments*/
|
|
75065
75172
|
true
|
|
75066
75173
|
);
|
|
75067
75174
|
diagnostic.start = start2;
|
|
@@ -75169,10 +75276,10 @@ function createTypeChecker(host) {
|
|
|
75169
75276
|
[factory.createParameterDeclaration(
|
|
75170
75277
|
/*modifiers*/
|
|
75171
75278
|
void 0,
|
|
75172
|
-
/*
|
|
75279
|
+
/*dotDotDotToken*/
|
|
75173
75280
|
void 0,
|
|
75174
75281
|
"props",
|
|
75175
|
-
/*
|
|
75282
|
+
/*questionToken*/
|
|
75176
75283
|
void 0,
|
|
75177
75284
|
nodeBuilder.typeToTypeNode(result, node)
|
|
75178
75285
|
)],
|
|
@@ -75192,7 +75299,7 @@ function createTypeChecker(host) {
|
|
|
75192
75299
|
void 0,
|
|
75193
75300
|
[parameterSymbol],
|
|
75194
75301
|
typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,
|
|
75195
|
-
/*
|
|
75302
|
+
/*resolvedTypePredicate*/
|
|
75196
75303
|
void 0,
|
|
75197
75304
|
1,
|
|
75198
75305
|
0 /* None */
|
|
@@ -75262,8 +75369,11 @@ function createTypeChecker(host) {
|
|
|
75262
75369
|
return cached;
|
|
75263
75370
|
}
|
|
75264
75371
|
links.resolvedSignature = resolvingSignature;
|
|
75265
|
-
|
|
75372
|
+
let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);
|
|
75266
75373
|
if (result !== resolvingSignature) {
|
|
75374
|
+
if (links.resolvedSignature !== resolvingSignature) {
|
|
75375
|
+
result = links.resolvedSignature;
|
|
75376
|
+
}
|
|
75267
75377
|
links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached;
|
|
75268
75378
|
}
|
|
75269
75379
|
return result;
|
|
@@ -75509,9 +75619,9 @@ function createTypeChecker(host) {
|
|
|
75509
75619
|
const esModuleSymbol = resolveESModuleSymbol(
|
|
75510
75620
|
moduleSymbol,
|
|
75511
75621
|
specifier,
|
|
75512
|
-
/*
|
|
75622
|
+
/*dontResolveAlias*/
|
|
75513
75623
|
true,
|
|
75514
|
-
/*
|
|
75624
|
+
/*suppressInteropError*/
|
|
75515
75625
|
false
|
|
75516
75626
|
);
|
|
75517
75627
|
if (esModuleSymbol) {
|
|
@@ -75581,7 +75691,7 @@ function createTypeChecker(host) {
|
|
|
75581
75691
|
function isCommonJsRequire(node) {
|
|
75582
75692
|
if (!isRequireCall(
|
|
75583
75693
|
node,
|
|
75584
|
-
/*
|
|
75694
|
+
/*requireStringLiteralLikeArgument*/
|
|
75585
75695
|
true
|
|
75586
75696
|
)) {
|
|
75587
75697
|
return false;
|
|
@@ -75622,14 +75732,14 @@ function createTypeChecker(host) {
|
|
|
75622
75732
|
checkDeprecatedSignature(signature, node);
|
|
75623
75733
|
return getReturnTypeOfSignature(signature);
|
|
75624
75734
|
}
|
|
75625
|
-
function checkAssertion(node) {
|
|
75735
|
+
function checkAssertion(node, checkMode) {
|
|
75626
75736
|
if (node.kind === 214 /* TypeAssertionExpression */) {
|
|
75627
75737
|
const file = getSourceFileOfNode(node);
|
|
75628
75738
|
if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) {
|
|
75629
75739
|
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
|
75630
75740
|
}
|
|
75631
75741
|
}
|
|
75632
|
-
return checkAssertionWorker(node,
|
|
75742
|
+
return checkAssertionWorker(node, checkMode);
|
|
75633
75743
|
}
|
|
75634
75744
|
function isValidConstAssertionArgument(node) {
|
|
75635
75745
|
switch (node.kind) {
|
|
@@ -75662,8 +75772,9 @@ function createTypeChecker(host) {
|
|
|
75662
75772
|
}
|
|
75663
75773
|
return false;
|
|
75664
75774
|
}
|
|
75665
|
-
function checkAssertionWorker(
|
|
75666
|
-
|
|
75775
|
+
function checkAssertionWorker(node, checkMode) {
|
|
75776
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
75777
|
+
const exprType = checkExpression(expression, checkMode);
|
|
75667
75778
|
if (isConstTypeReference(type)) {
|
|
75668
75779
|
if (!isValidConstAssertionArgument(expression)) {
|
|
75669
75780
|
error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
|
|
@@ -75671,7 +75782,29 @@ function createTypeChecker(host) {
|
|
|
75671
75782
|
return getRegularTypeOfLiteralType(exprType);
|
|
75672
75783
|
}
|
|
75673
75784
|
checkSourceElement(type);
|
|
75674
|
-
|
|
75785
|
+
checkNodeDeferred(node);
|
|
75786
|
+
return getTypeFromTypeNode(type);
|
|
75787
|
+
}
|
|
75788
|
+
function getAssertionTypeAndExpression(node) {
|
|
75789
|
+
let type;
|
|
75790
|
+
let expression;
|
|
75791
|
+
switch (node.kind) {
|
|
75792
|
+
case 232 /* AsExpression */:
|
|
75793
|
+
case 214 /* TypeAssertionExpression */:
|
|
75794
|
+
type = node.type;
|
|
75795
|
+
expression = node.expression;
|
|
75796
|
+
break;
|
|
75797
|
+
case 215 /* ParenthesizedExpression */:
|
|
75798
|
+
type = getJSDocTypeAssertionType(node);
|
|
75799
|
+
expression = node.expression;
|
|
75800
|
+
break;
|
|
75801
|
+
}
|
|
75802
|
+
return { type, expression };
|
|
75803
|
+
}
|
|
75804
|
+
function checkAssertionDeferred(node) {
|
|
75805
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
75806
|
+
const errNode = isParenthesizedExpression(node) ? type : node;
|
|
75807
|
+
const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(checkExpression(expression)));
|
|
75675
75808
|
const targetType = getTypeFromTypeNode(type);
|
|
75676
75809
|
if (!isErrorType(targetType)) {
|
|
75677
75810
|
addLazyDiagnostic(() => {
|
|
@@ -75686,7 +75819,6 @@ function createTypeChecker(host) {
|
|
|
75686
75819
|
}
|
|
75687
75820
|
});
|
|
75688
75821
|
}
|
|
75689
|
-
return targetType;
|
|
75690
75822
|
}
|
|
75691
75823
|
function checkNonNullChain(node) {
|
|
75692
75824
|
const leftType = checkExpression(node.expression);
|
|
@@ -75738,7 +75870,14 @@ function createTypeChecker(host) {
|
|
|
75738
75870
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
75739
75871
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
75740
75872
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
75741
|
-
const result3 = createAnonymousType(
|
|
75873
|
+
const result3 = createAnonymousType(
|
|
75874
|
+
/*symbol*/
|
|
75875
|
+
void 0,
|
|
75876
|
+
resolved.members,
|
|
75877
|
+
callSignatures,
|
|
75878
|
+
constructSignatures,
|
|
75879
|
+
resolved.indexInfos
|
|
75880
|
+
);
|
|
75742
75881
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
75743
75882
|
result3.node = node;
|
|
75744
75883
|
return result3;
|
|
@@ -75927,12 +76066,12 @@ function createTypeChecker(host) {
|
|
|
75927
76066
|
}
|
|
75928
76067
|
return void 0;
|
|
75929
76068
|
}
|
|
75930
|
-
function getRestTypeAtPosition(source, pos
|
|
76069
|
+
function getRestTypeAtPosition(source, pos) {
|
|
75931
76070
|
const parameterCount = getParameterCount(source);
|
|
75932
76071
|
const minArgumentCount = getMinArgumentCount(source);
|
|
75933
76072
|
const restType = getEffectiveRestType(source);
|
|
75934
76073
|
if (restType && pos >= parameterCount - 1) {
|
|
75935
|
-
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType)
|
|
76074
|
+
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType));
|
|
75936
76075
|
}
|
|
75937
76076
|
const types = [];
|
|
75938
76077
|
const flags = [];
|
|
@@ -75950,7 +76089,13 @@ function createTypeChecker(host) {
|
|
|
75950
76089
|
names.push(name);
|
|
75951
76090
|
}
|
|
75952
76091
|
}
|
|
75953
|
-
return createTupleType(
|
|
76092
|
+
return createTupleType(
|
|
76093
|
+
types,
|
|
76094
|
+
flags,
|
|
76095
|
+
/*readonly*/
|
|
76096
|
+
false,
|
|
76097
|
+
length(names) === length(types) ? names : void 0
|
|
76098
|
+
);
|
|
75954
76099
|
}
|
|
75955
76100
|
function getParameterCount(signature) {
|
|
75956
76101
|
const length2 = signature.parameters.length;
|
|
@@ -76180,13 +76325,13 @@ function createTypeChecker(host) {
|
|
|
76180
76325
|
}
|
|
76181
76326
|
function createClassAccessorDecoratorTargetType(thisType, valueType) {
|
|
76182
76327
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorTargetType(
|
|
76183
|
-
/*
|
|
76328
|
+
/*reportErrors*/
|
|
76184
76329
|
true
|
|
76185
76330
|
), [thisType, valueType]);
|
|
76186
76331
|
}
|
|
76187
76332
|
function createClassAccessorDecoratorResultType(thisType, valueType) {
|
|
76188
76333
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorResultType(
|
|
76189
|
-
/*
|
|
76334
|
+
/*reportErrors*/
|
|
76190
76335
|
true
|
|
76191
76336
|
), [thisType, valueType]);
|
|
76192
76337
|
}
|
|
@@ -76704,8 +76849,11 @@ function createTypeChecker(host) {
|
|
|
76704
76849
|
}
|
|
76705
76850
|
const returnType = getReturnTypeFromBody(node, checkMode);
|
|
76706
76851
|
const returnOnlySignature = createSignature(
|
|
76852
|
+
/*declaration*/
|
|
76707
76853
|
void 0,
|
|
76854
|
+
/*typeParameters*/
|
|
76708
76855
|
void 0,
|
|
76856
|
+
/*thisParameter*/
|
|
76709
76857
|
void 0,
|
|
76710
76858
|
emptyArray,
|
|
76711
76859
|
returnType,
|
|
@@ -77753,6 +77901,7 @@ function createTypeChecker(host) {
|
|
|
77753
77901
|
prop.valueDeclaration,
|
|
77754
77902
|
name,
|
|
77755
77903
|
788968 /* Type */,
|
|
77904
|
+
/*nameNotFoundMessage*/
|
|
77756
77905
|
void 0,
|
|
77757
77906
|
name,
|
|
77758
77907
|
/*isUse*/
|
|
@@ -78359,7 +78508,7 @@ function createTypeChecker(host) {
|
|
|
78359
78508
|
}
|
|
78360
78509
|
if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall(
|
|
78361
78510
|
expr,
|
|
78362
|
-
/*
|
|
78511
|
+
/*requireStringLiteralLikeArgument*/
|
|
78363
78512
|
true
|
|
78364
78513
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
78365
78514
|
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
@@ -78419,8 +78568,7 @@ function createTypeChecker(host) {
|
|
|
78419
78568
|
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
78420
78569
|
}
|
|
78421
78570
|
if (isJSDocTypeAssertion(node)) {
|
|
78422
|
-
|
|
78423
|
-
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
78571
|
+
return checkAssertionWorker(node, checkMode);
|
|
78424
78572
|
}
|
|
78425
78573
|
}
|
|
78426
78574
|
return checkExpression(node.expression, checkMode);
|
|
@@ -78495,7 +78643,7 @@ function createTypeChecker(host) {
|
|
|
78495
78643
|
return checkTypeOfExpression(node);
|
|
78496
78644
|
case 214 /* TypeAssertionExpression */:
|
|
78497
78645
|
case 232 /* AsExpression */:
|
|
78498
|
-
return checkAssertion(node);
|
|
78646
|
+
return checkAssertion(node, checkMode);
|
|
78499
78647
|
case 233 /* NonNullExpression */:
|
|
78500
78648
|
return checkNonNullAssertion(node);
|
|
78501
78649
|
case 231 /* ExpressionWithTypeArguments */:
|
|
@@ -80012,7 +80160,7 @@ function createTypeChecker(host) {
|
|
|
80012
80160
|
void 0,
|
|
80013
80161
|
/*nameArg*/
|
|
80014
80162
|
void 0,
|
|
80015
|
-
/*
|
|
80163
|
+
/*isUse*/
|
|
80016
80164
|
true
|
|
80017
80165
|
);
|
|
80018
80166
|
if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */) {
|
|
@@ -80756,7 +80904,7 @@ function createTypeChecker(host) {
|
|
|
80756
80904
|
node,
|
|
80757
80905
|
node.name.escapedText,
|
|
80758
80906
|
3 /* Variable */,
|
|
80759
|
-
/*
|
|
80907
|
+
/*nameNotFoundMessage*/
|
|
80760
80908
|
void 0,
|
|
80761
80909
|
/*nameArg*/
|
|
80762
80910
|
void 0,
|
|
@@ -81574,12 +81722,12 @@ function createTypeChecker(host) {
|
|
|
81574
81722
|
const suggestAwait = (
|
|
81575
81723
|
// for (const x of Promise<...>) or [...Promise<...>]
|
|
81576
81724
|
!!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType(
|
|
81577
|
-
|
|
81725
|
+
/*reportErrors*/
|
|
81578
81726
|
false
|
|
81579
81727
|
) !== emptyGenericType && isTypeAssignableTo(
|
|
81580
81728
|
type,
|
|
81581
81729
|
getGlobalAsyncIterableType(
|
|
81582
|
-
|
|
81730
|
+
/*reportErrors*/
|
|
81583
81731
|
false
|
|
81584
81732
|
)
|
|
81585
81733
|
)
|
|
@@ -82447,7 +82595,7 @@ function createTypeChecker(host) {
|
|
|
82447
82595
|
type,
|
|
82448
82596
|
typeWithThis,
|
|
82449
82597
|
param,
|
|
82450
|
-
/*
|
|
82598
|
+
/*memberIsParameterProperty*/
|
|
82451
82599
|
true
|
|
82452
82600
|
);
|
|
82453
82601
|
}
|
|
@@ -82461,7 +82609,7 @@ function createTypeChecker(host) {
|
|
|
82461
82609
|
type,
|
|
82462
82610
|
typeWithThis,
|
|
82463
82611
|
member,
|
|
82464
|
-
/*
|
|
82612
|
+
/*memberIsParameterProperty*/
|
|
82465
82613
|
false
|
|
82466
82614
|
);
|
|
82467
82615
|
}
|
|
@@ -82565,7 +82713,7 @@ function createTypeChecker(host) {
|
|
|
82565
82713
|
getTypeOfSymbol(prop),
|
|
82566
82714
|
getTypeOfSymbol(baseProp),
|
|
82567
82715
|
member.name || member,
|
|
82568
|
-
/*
|
|
82716
|
+
/*headMessage*/
|
|
82569
82717
|
void 0,
|
|
82570
82718
|
rootChain
|
|
82571
82719
|
)) {
|
|
@@ -82613,7 +82761,7 @@ function createTypeChecker(host) {
|
|
|
82613
82761
|
memberHasOverrideModifier,
|
|
82614
82762
|
hasAbstractModifier(member),
|
|
82615
82763
|
isStatic(member),
|
|
82616
|
-
/*
|
|
82764
|
+
/*memberIsParameterProperty*/
|
|
82617
82765
|
false,
|
|
82618
82766
|
symbolName(memberSymbol)
|
|
82619
82767
|
);
|
|
@@ -84081,6 +84229,10 @@ function createTypeChecker(host) {
|
|
|
84081
84229
|
case 282 /* JsxElement */:
|
|
84082
84230
|
checkJsxElementDeferred(node);
|
|
84083
84231
|
break;
|
|
84232
|
+
case 214 /* TypeAssertionExpression */:
|
|
84233
|
+
case 232 /* AsExpression */:
|
|
84234
|
+
case 215 /* ParenthesizedExpression */:
|
|
84235
|
+
checkAssertionDeferred(node);
|
|
84084
84236
|
}
|
|
84085
84237
|
currentNode = saveCurrentNode;
|
|
84086
84238
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -84443,7 +84595,12 @@ function createTypeChecker(host) {
|
|
|
84443
84595
|
meaning = 1920 /* Namespace */;
|
|
84444
84596
|
}
|
|
84445
84597
|
meaning |= 2097152 /* Alias */;
|
|
84446
|
-
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
84598
|
+
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
84599
|
+
name,
|
|
84600
|
+
meaning,
|
|
84601
|
+
/*ignoreErrors*/
|
|
84602
|
+
true
|
|
84603
|
+
) : void 0;
|
|
84447
84604
|
if (entityNameSymbol) {
|
|
84448
84605
|
return entityNameSymbol;
|
|
84449
84606
|
}
|
|
@@ -84472,7 +84629,7 @@ function createTypeChecker(host) {
|
|
|
84472
84629
|
meaning,
|
|
84473
84630
|
/*ignoreErrors*/
|
|
84474
84631
|
false,
|
|
84475
|
-
/*
|
|
84632
|
+
/*dontResolveAlias*/
|
|
84476
84633
|
true,
|
|
84477
84634
|
getHostSignatureFromJSDoc(name)
|
|
84478
84635
|
);
|
|
@@ -84495,7 +84652,7 @@ function createTypeChecker(host) {
|
|
|
84495
84652
|
meaning,
|
|
84496
84653
|
/*ignoreErrors*/
|
|
84497
84654
|
true,
|
|
84498
|
-
/*
|
|
84655
|
+
/*dontResolveAlias*/
|
|
84499
84656
|
true,
|
|
84500
84657
|
getSourceFileOfNode(container)
|
|
84501
84658
|
) || result;
|
|
@@ -84668,7 +84825,7 @@ function createTypeChecker(host) {
|
|
|
84668
84825
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
84669
84826
|
if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall(
|
|
84670
84827
|
node.parent,
|
|
84671
|
-
/*
|
|
84828
|
+
/*requireStringLiteralLikeArgument*/
|
|
84672
84829
|
false
|
|
84673
84830
|
) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) {
|
|
84674
84831
|
return resolveExternalModuleName(node, node, ignoreErrors);
|
|
@@ -85282,7 +85439,7 @@ function createTypeChecker(host) {
|
|
|
85282
85439
|
location,
|
|
85283
85440
|
reference.escapedText,
|
|
85284
85441
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
85285
|
-
/*
|
|
85442
|
+
/*nameNotFoundMessage*/
|
|
85286
85443
|
void 0,
|
|
85287
85444
|
/*nameArg*/
|
|
85288
85445
|
void 0,
|
|
@@ -85299,7 +85456,7 @@ function createTypeChecker(host) {
|
|
|
85299
85456
|
reference,
|
|
85300
85457
|
reference.escapedText,
|
|
85301
85458
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
85302
|
-
/*
|
|
85459
|
+
/*nameNotFoundMessage*/
|
|
85303
85460
|
void 0,
|
|
85304
85461
|
/*nameArg*/
|
|
85305
85462
|
void 0,
|
|
@@ -85716,7 +85873,14 @@ function createTypeChecker(host) {
|
|
|
85716
85873
|
anyArrayType = createArrayType(anyType);
|
|
85717
85874
|
autoArrayType = createArrayType(autoType);
|
|
85718
85875
|
if (autoArrayType === emptyObjectType) {
|
|
85719
|
-
autoArrayType = createAnonymousType(
|
|
85876
|
+
autoArrayType = createAnonymousType(
|
|
85877
|
+
/*symbol*/
|
|
85878
|
+
void 0,
|
|
85879
|
+
emptySymbols,
|
|
85880
|
+
emptyArray,
|
|
85881
|
+
emptyArray,
|
|
85882
|
+
emptyArray
|
|
85883
|
+
);
|
|
85720
85884
|
}
|
|
85721
85885
|
globalReadonlyArrayType = getGlobalTypeOrUndefined(
|
|
85722
85886
|
"ReadonlyArray",
|
|
@@ -86834,7 +86998,7 @@ function createTypeChecker(host) {
|
|
|
86834
86998
|
if (node.label && current.label.escapedText === node.label.escapedText) {
|
|
86835
86999
|
const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement(
|
|
86836
87000
|
current.statement,
|
|
86837
|
-
/*
|
|
87001
|
+
/*lookInLabeledStatements*/
|
|
86838
87002
|
true
|
|
86839
87003
|
);
|
|
86840
87004
|
if (isMisplacedContinueLabel) {
|
|
@@ -86851,7 +87015,7 @@ function createTypeChecker(host) {
|
|
|
86851
87015
|
default:
|
|
86852
87016
|
if (isIterationStatement(
|
|
86853
87017
|
current,
|
|
86854
|
-
/*
|
|
87018
|
+
/*lookInLabeledStatements*/
|
|
86855
87019
|
false
|
|
86856
87020
|
) && !node.label) {
|
|
86857
87021
|
return false;
|
|
@@ -90630,7 +90794,7 @@ function transformTypeScript(context) {
|
|
|
90630
90794
|
let facts = 0 /* None */;
|
|
90631
90795
|
if (some(getProperties(
|
|
90632
90796
|
node,
|
|
90633
|
-
/*
|
|
90797
|
+
/*requireInitializer*/
|
|
90634
90798
|
true,
|
|
90635
90799
|
/*isStatic*/
|
|
90636
90800
|
true
|
|
@@ -92500,10 +92664,10 @@ function transformClassFields(context) {
|
|
|
92500
92664
|
filter(node.modifiers, (m) => isModifier(m) && !isStaticModifier(m) && !isAccessorModifier(m)),
|
|
92501
92665
|
node.asteriskToken,
|
|
92502
92666
|
functionName,
|
|
92503
|
-
/*
|
|
92667
|
+
/*typeParameters*/
|
|
92504
92668
|
void 0,
|
|
92505
92669
|
visitParameterList(node.parameters, visitor, context),
|
|
92506
|
-
/*
|
|
92670
|
+
/*type*/
|
|
92507
92671
|
void 0,
|
|
92508
92672
|
visitFunctionBody(node.body, visitor, context)
|
|
92509
92673
|
)
|
|
@@ -93108,7 +93272,7 @@ function transformClassFields(context) {
|
|
|
93108
93272
|
info.brandCheckIdentifier,
|
|
93109
93273
|
right,
|
|
93110
93274
|
info.kind,
|
|
93111
|
-
/*
|
|
93275
|
+
/*f*/
|
|
93112
93276
|
void 0
|
|
93113
93277
|
);
|
|
93114
93278
|
case "f" /* Field */:
|
|
@@ -93180,7 +93344,7 @@ function transformClassFields(context) {
|
|
|
93180
93344
|
if (facts & 4 /* NeedsClassSuperReference */) {
|
|
93181
93345
|
const temp = factory2.createTempVariable(
|
|
93182
93346
|
hoistVariableDeclaration,
|
|
93183
|
-
/*
|
|
93347
|
+
/*reservedInNestedScopes*/
|
|
93184
93348
|
true
|
|
93185
93349
|
);
|
|
93186
93350
|
getClassLexicalEnvironment().superClassReference = temp;
|
|
@@ -94013,7 +94177,7 @@ function transformClassFields(context) {
|
|
|
94013
94177
|
const identifier = typeof name === "object" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === "string" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable(
|
|
94014
94178
|
/*recordTempVariable*/
|
|
94015
94179
|
void 0,
|
|
94016
|
-
/*
|
|
94180
|
+
/*reservedInNestedScopes*/
|
|
94017
94181
|
true,
|
|
94018
94182
|
prefix,
|
|
94019
94183
|
suffix
|
|
@@ -94719,11 +94883,11 @@ function transformLegacyDecorators(context) {
|
|
|
94719
94883
|
}
|
|
94720
94884
|
function visitClassDeclaration(node) {
|
|
94721
94885
|
if (!(classOrConstructorParameterIsDecorated(
|
|
94722
|
-
/*
|
|
94886
|
+
/*useLegacyDecorators*/
|
|
94723
94887
|
true,
|
|
94724
94888
|
node
|
|
94725
94889
|
) || childIsDecorated(
|
|
94726
|
-
/*
|
|
94890
|
+
/*useLegacyDecorators*/
|
|
94727
94891
|
true,
|
|
94728
94892
|
node
|
|
94729
94893
|
))) {
|
|
@@ -94978,7 +95142,7 @@ function transformLegacyDecorators(context) {
|
|
|
94978
95142
|
}
|
|
94979
95143
|
function isDecoratedClassElement(member, isStaticElement, parent2) {
|
|
94980
95144
|
return nodeOrChildIsDecorated(
|
|
94981
|
-
/*
|
|
95145
|
+
/*useLegacyDecorators*/
|
|
94982
95146
|
true,
|
|
94983
95147
|
member,
|
|
94984
95148
|
parent2
|
|
@@ -95330,7 +95494,7 @@ function transformESDecorators(context) {
|
|
|
95330
95494
|
case 223 /* PostfixUnaryExpression */:
|
|
95331
95495
|
return visitPreOrPostfixUnaryExpression(
|
|
95332
95496
|
node,
|
|
95333
|
-
/*
|
|
95497
|
+
/*discarded*/
|
|
95334
95498
|
false
|
|
95335
95499
|
);
|
|
95336
95500
|
case 209 /* PropertyAccessExpression */:
|
|
@@ -95481,7 +95645,7 @@ function transformESDecorators(context) {
|
|
|
95481
95645
|
let hasStaticPrivateClassElements = false;
|
|
95482
95646
|
for (const member of node.members) {
|
|
95483
95647
|
if (isNamedClassElement(member) && nodeOrChildIsDecorated(
|
|
95484
|
-
/*
|
|
95648
|
+
/*useLegacyDecorators*/
|
|
95485
95649
|
false,
|
|
95486
95650
|
member,
|
|
95487
95651
|
node
|
|
@@ -95720,7 +95884,7 @@ function transformESDecorators(context) {
|
|
|
95720
95884
|
if (leadingBlockStatements) {
|
|
95721
95885
|
const leadingStaticBlockBody = factory2.createBlock(
|
|
95722
95886
|
leadingBlockStatements,
|
|
95723
|
-
/*
|
|
95887
|
+
/*multiLine*/
|
|
95724
95888
|
true
|
|
95725
95889
|
);
|
|
95726
95890
|
const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody);
|
|
@@ -95735,7 +95899,7 @@ function transformESDecorators(context) {
|
|
|
95735
95899
|
if (trailingBlockStatements) {
|
|
95736
95900
|
const trailingStaticBlockBody = factory2.createBlock(
|
|
95737
95901
|
trailingBlockStatements,
|
|
95738
|
-
/*
|
|
95902
|
+
/*multiLine*/
|
|
95739
95903
|
true
|
|
95740
95904
|
);
|
|
95741
95905
|
const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody);
|
|
@@ -95801,11 +95965,11 @@ function transformESDecorators(context) {
|
|
|
95801
95965
|
}
|
|
95802
95966
|
function isDecoratedClassLike(node) {
|
|
95803
95967
|
return classOrConstructorParameterIsDecorated(
|
|
95804
|
-
/*
|
|
95968
|
+
/*useLegacyDecorators*/
|
|
95805
95969
|
false,
|
|
95806
95970
|
node
|
|
95807
95971
|
) || childIsDecorated(
|
|
95808
|
-
/*
|
|
95972
|
+
/*useLegacyDecorators*/
|
|
95809
95973
|
false,
|
|
95810
95974
|
node
|
|
95811
95975
|
);
|
|
@@ -97485,15 +97649,15 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
97485
97649
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
97486
97650
|
"get",
|
|
97487
97651
|
factory2.createArrowFunction(
|
|
97488
|
-
/*
|
|
97652
|
+
/*modifiers*/
|
|
97489
97653
|
void 0,
|
|
97490
|
-
/*
|
|
97654
|
+
/*typeParameters*/
|
|
97491
97655
|
void 0,
|
|
97492
97656
|
/* parameters */
|
|
97493
97657
|
[],
|
|
97494
|
-
/*
|
|
97658
|
+
/*type*/
|
|
97495
97659
|
void 0,
|
|
97496
|
-
/*
|
|
97660
|
+
/*equalsGreaterThanToken*/
|
|
97497
97661
|
void 0,
|
|
97498
97662
|
setEmitFlags(
|
|
97499
97663
|
factory2.createPropertyAccessExpression(
|
|
@@ -97512,29 +97676,29 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
97512
97676
|
factory2.createPropertyAssignment(
|
|
97513
97677
|
"set",
|
|
97514
97678
|
factory2.createArrowFunction(
|
|
97515
|
-
/*
|
|
97679
|
+
/*modifiers*/
|
|
97516
97680
|
void 0,
|
|
97517
|
-
/*
|
|
97681
|
+
/*typeParameters*/
|
|
97518
97682
|
void 0,
|
|
97519
97683
|
/* parameters */
|
|
97520
97684
|
[
|
|
97521
97685
|
factory2.createParameterDeclaration(
|
|
97522
|
-
/*
|
|
97686
|
+
/*modifiers*/
|
|
97523
97687
|
void 0,
|
|
97524
|
-
/*
|
|
97688
|
+
/*dotDotDotToken*/
|
|
97525
97689
|
void 0,
|
|
97526
97690
|
"v",
|
|
97527
|
-
/*
|
|
97691
|
+
/*questionToken*/
|
|
97528
97692
|
void 0,
|
|
97529
|
-
/*
|
|
97693
|
+
/*type*/
|
|
97530
97694
|
void 0,
|
|
97531
|
-
/*
|
|
97695
|
+
/*initializer*/
|
|
97532
97696
|
void 0
|
|
97533
97697
|
)
|
|
97534
97698
|
],
|
|
97535
|
-
/*
|
|
97699
|
+
/*type*/
|
|
97536
97700
|
void 0,
|
|
97537
|
-
/*
|
|
97701
|
+
/*equalsGreaterThanToken*/
|
|
97538
97702
|
void 0,
|
|
97539
97703
|
factory2.createAssignment(
|
|
97540
97704
|
setEmitFlags(
|
|
@@ -97561,7 +97725,7 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
97561
97725
|
);
|
|
97562
97726
|
});
|
|
97563
97727
|
return factory2.createVariableStatement(
|
|
97564
|
-
/*
|
|
97728
|
+
/*modifiers*/
|
|
97565
97729
|
void 0,
|
|
97566
97730
|
factory2.createVariableDeclarationList(
|
|
97567
97731
|
[
|
|
@@ -97569,20 +97733,20 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
97569
97733
|
factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
97570
97734
|
/*exclamationToken*/
|
|
97571
97735
|
void 0,
|
|
97572
|
-
/*
|
|
97736
|
+
/*type*/
|
|
97573
97737
|
void 0,
|
|
97574
97738
|
factory2.createCallExpression(
|
|
97575
97739
|
factory2.createPropertyAccessExpression(
|
|
97576
97740
|
factory2.createIdentifier("Object"),
|
|
97577
97741
|
"create"
|
|
97578
97742
|
),
|
|
97579
|
-
/*
|
|
97743
|
+
/*typeArguments*/
|
|
97580
97744
|
void 0,
|
|
97581
97745
|
[
|
|
97582
97746
|
factory2.createNull(),
|
|
97583
97747
|
factory2.createObjectLiteralExpression(
|
|
97584
97748
|
accessors,
|
|
97585
|
-
/*
|
|
97749
|
+
/*multiLine*/
|
|
97586
97750
|
true
|
|
97587
97751
|
)
|
|
97588
97752
|
]
|
|
@@ -98454,7 +98618,7 @@ function transformES2018(context) {
|
|
|
98454
98618
|
enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,
|
|
98455
98619
|
visitNode(node.name, visitor, isPropertyName),
|
|
98456
98620
|
visitNode(
|
|
98457
|
-
/*
|
|
98621
|
+
/*node*/
|
|
98458
98622
|
void 0,
|
|
98459
98623
|
visitor,
|
|
98460
98624
|
isQuestionToken
|
|
@@ -98680,7 +98844,7 @@ function transformES2018(context) {
|
|
|
98680
98844
|
context,
|
|
98681
98845
|
1 /* ObjectRest */,
|
|
98682
98846
|
factory2.getGeneratedNameForNode(parameter),
|
|
98683
|
-
/*
|
|
98847
|
+
/*hoistTempVariables*/
|
|
98684
98848
|
false,
|
|
98685
98849
|
/*skipInitializer*/
|
|
98686
98850
|
true
|
|
@@ -99223,7 +99387,7 @@ function transformJsx(context) {
|
|
|
99223
99387
|
}
|
|
99224
99388
|
const declaration = factory2.createVariableDeclaration(
|
|
99225
99389
|
factory2.createUniqueName("_jsxFileName", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
99226
|
-
/*
|
|
99390
|
+
/*exclamationToken*/
|
|
99227
99391
|
void 0,
|
|
99228
99392
|
/*type*/
|
|
99229
99393
|
void 0,
|
|
@@ -99292,7 +99456,7 @@ function transformJsx(context) {
|
|
|
99292
99456
|
/*modifiers*/
|
|
99293
99457
|
void 0,
|
|
99294
99458
|
factory2.createImportClause(
|
|
99295
|
-
/*
|
|
99459
|
+
/*isTypeOnly*/
|
|
99296
99460
|
false,
|
|
99297
99461
|
/*name*/
|
|
99298
99462
|
void 0,
|
|
@@ -99315,12 +99479,12 @@ function transformJsx(context) {
|
|
|
99315
99479
|
factory2.createVariableDeclarationList([
|
|
99316
99480
|
factory2.createVariableDeclaration(
|
|
99317
99481
|
factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement(
|
|
99318
|
-
/*
|
|
99482
|
+
/*dotDotDotToken*/
|
|
99319
99483
|
void 0,
|
|
99320
99484
|
s.propertyName,
|
|
99321
99485
|
s.name
|
|
99322
99486
|
))),
|
|
99323
|
-
/*
|
|
99487
|
+
/*exclamationToken*/
|
|
99324
99488
|
void 0,
|
|
99325
99489
|
/*type*/
|
|
99326
99490
|
void 0,
|
|
@@ -101637,7 +101801,7 @@ function transformES2015(context) {
|
|
|
101637
101801
|
visitor,
|
|
101638
101802
|
context,
|
|
101639
101803
|
0 /* All */,
|
|
101640
|
-
/*
|
|
101804
|
+
/*rval*/
|
|
101641
101805
|
void 0,
|
|
101642
101806
|
(ancestorFacts & 32 /* ExportedVariableStatement */) !== 0
|
|
101643
101807
|
);
|
|
@@ -106000,7 +106164,7 @@ function transformModule(context) {
|
|
|
106000
106164
|
/*whenTrue*/
|
|
106001
106165
|
createImportCallExpressionCommonJS(
|
|
106002
106166
|
temp,
|
|
106003
|
-
/*
|
|
106167
|
+
/*isInlineable*/
|
|
106004
106168
|
true
|
|
106005
106169
|
),
|
|
106006
106170
|
/*colonToken*/
|
|
@@ -106436,9 +106600,9 @@ function transformModule(context) {
|
|
|
106436
106600
|
createExportExpression(
|
|
106437
106601
|
factory2.getExportName(specifier),
|
|
106438
106602
|
exportedValue,
|
|
106439
|
-
/*
|
|
106603
|
+
/*location*/
|
|
106440
106604
|
void 0,
|
|
106441
|
-
/*
|
|
106605
|
+
/*liveBinding*/
|
|
106442
106606
|
true
|
|
106443
106607
|
)
|
|
106444
106608
|
),
|
|
@@ -106748,7 +106912,7 @@ function transformModule(context) {
|
|
|
106748
106912
|
statements = appendExportsOfDeclaration(
|
|
106749
106913
|
statements,
|
|
106750
106914
|
importBinding,
|
|
106751
|
-
/*
|
|
106915
|
+
/*liveBinding*/
|
|
106752
106916
|
true
|
|
106753
106917
|
);
|
|
106754
106918
|
}
|
|
@@ -106817,7 +106981,7 @@ function transformModule(context) {
|
|
|
106817
106981
|
name,
|
|
106818
106982
|
/*location*/
|
|
106819
106983
|
exportSpecifier.name,
|
|
106820
|
-
/*
|
|
106984
|
+
/*allowComments*/
|
|
106821
106985
|
void 0,
|
|
106822
106986
|
liveBinding
|
|
106823
106987
|
);
|
|
@@ -106861,7 +107025,7 @@ function transformModule(context) {
|
|
|
106861
107025
|
const statement = setTextRange(factory2.createExpressionStatement(createExportExpression(
|
|
106862
107026
|
name,
|
|
106863
107027
|
value,
|
|
106864
|
-
/*
|
|
107028
|
+
/*location*/
|
|
106865
107029
|
void 0,
|
|
106866
107030
|
liveBinding
|
|
106867
107031
|
)), location);
|
|
@@ -107336,7 +107500,7 @@ function transformSystemModule(context) {
|
|
|
107336
107500
|
void 0,
|
|
107337
107501
|
factory2.createObjectLiteralExpression(
|
|
107338
107502
|
exportedNames,
|
|
107339
|
-
/*
|
|
107503
|
+
/*multiLine*/
|
|
107340
107504
|
true
|
|
107341
107505
|
)
|
|
107342
107506
|
)
|
|
@@ -107428,7 +107592,7 @@ function transformSystemModule(context) {
|
|
|
107428
107592
|
)
|
|
107429
107593
|
)
|
|
107430
107594
|
],
|
|
107431
|
-
/*
|
|
107595
|
+
/*multiLine*/
|
|
107432
107596
|
true
|
|
107433
107597
|
)
|
|
107434
107598
|
);
|
|
@@ -107493,7 +107657,7 @@ function transformSystemModule(context) {
|
|
|
107493
107657
|
void 0,
|
|
107494
107658
|
[factory2.createObjectLiteralExpression(
|
|
107495
107659
|
properties,
|
|
107496
|
-
/*
|
|
107660
|
+
/*multiLine*/
|
|
107497
107661
|
true
|
|
107498
107662
|
)]
|
|
107499
107663
|
)
|
|
@@ -109026,18 +109190,18 @@ function isInternalDeclaration(node, currentSourceFile) {
|
|
|
109026
109190
|
getTrailingCommentRanges(text, skipTrivia(
|
|
109027
109191
|
text,
|
|
109028
109192
|
previousSibling.end + 1,
|
|
109029
|
-
/*
|
|
109193
|
+
/*stopAfterLineBreak*/
|
|
109030
109194
|
false,
|
|
109031
|
-
/*
|
|
109195
|
+
/*stopAtComments*/
|
|
109032
109196
|
true
|
|
109033
109197
|
)),
|
|
109034
109198
|
getLeadingCommentRanges(text, node.pos)
|
|
109035
109199
|
) : getTrailingCommentRanges(text, skipTrivia(
|
|
109036
109200
|
text,
|
|
109037
109201
|
node.pos,
|
|
109038
|
-
/*
|
|
109202
|
+
/*stopAfterLineBreak*/
|
|
109039
109203
|
false,
|
|
109040
|
-
/*
|
|
109204
|
+
/*stopAtComments*/
|
|
109041
109205
|
true
|
|
109042
109206
|
));
|
|
109043
109207
|
return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile);
|
|
@@ -109153,7 +109317,7 @@ function transformDeclarations(context) {
|
|
|
109153
109317
|
symbol,
|
|
109154
109318
|
enclosingDeclaration2,
|
|
109155
109319
|
meaning,
|
|
109156
|
-
/*
|
|
109320
|
+
/*shouldComputeAliasToMarkVisible*/
|
|
109157
109321
|
true
|
|
109158
109322
|
));
|
|
109159
109323
|
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
|
|
@@ -109499,7 +109663,7 @@ function transformDeclarations(context) {
|
|
|
109499
109663
|
return factory2.updateBindingElement(
|
|
109500
109664
|
elem,
|
|
109501
109665
|
elem.dotDotDotToken,
|
|
109502
|
-
/*
|
|
109666
|
+
/*propertyName*/
|
|
109503
109667
|
void 0,
|
|
109504
109668
|
elem.propertyName,
|
|
109505
109669
|
shouldPrintWithInitializer(elem) ? elem.initializer : void 0
|
|
@@ -109861,7 +110025,7 @@ function transformDeclarations(context) {
|
|
|
109861
110025
|
return cleanup(factory2.createPropertyDeclaration(
|
|
109862
110026
|
ensureModifiers(input),
|
|
109863
110027
|
input.name,
|
|
109864
|
-
/*
|
|
110028
|
+
/*questionOrExclamationToken*/
|
|
109865
110029
|
void 0,
|
|
109866
110030
|
/*type*/
|
|
109867
110031
|
void 0,
|
|
@@ -110425,7 +110589,7 @@ function transformDeclarations(context) {
|
|
|
110425
110589
|
elems.push(factory2.createPropertyDeclaration(
|
|
110426
110590
|
ensureModifiers(param),
|
|
110427
110591
|
elem.name,
|
|
110428
|
-
/*
|
|
110592
|
+
/*questionOrExclamationToken*/
|
|
110429
110593
|
void 0,
|
|
110430
110594
|
ensureType(
|
|
110431
110595
|
elem,
|
|
@@ -110447,7 +110611,7 @@ function transformDeclarations(context) {
|
|
|
110447
110611
|
/*modifiers*/
|
|
110448
110612
|
void 0,
|
|
110449
110613
|
factory2.createPrivateIdentifier("#private"),
|
|
110450
|
-
/*
|
|
110614
|
+
/*questionOrExclamationToken*/
|
|
110451
110615
|
void 0,
|
|
110452
110616
|
/*type*/
|
|
110453
110617
|
void 0,
|
|
@@ -111860,7 +112024,7 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
111860
112024
|
declarationMapText,
|
|
111861
112025
|
buildInfoPath,
|
|
111862
112026
|
buildInfo,
|
|
111863
|
-
/*
|
|
112027
|
+
/*oldFileOfCurrentEmit*/
|
|
111864
112028
|
true
|
|
111865
112029
|
);
|
|
111866
112030
|
const outputFiles = [];
|
|
@@ -112053,7 +112217,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112053
112217
|
writeBundle(
|
|
112054
112218
|
bundle,
|
|
112055
112219
|
beginPrint(),
|
|
112056
|
-
/*
|
|
112220
|
+
/*sourceMapGenerator*/
|
|
112057
112221
|
void 0
|
|
112058
112222
|
);
|
|
112059
112223
|
return endPrint();
|
|
@@ -112062,7 +112226,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
112062
112226
|
writeFile2(
|
|
112063
112227
|
sourceFile,
|
|
112064
112228
|
beginPrint(),
|
|
112065
|
-
/*
|
|
112229
|
+
/*sourceMapGenerator*/
|
|
112066
112230
|
void 0
|
|
112067
112231
|
);
|
|
112068
112232
|
return endPrint();
|
|
@@ -113543,7 +113707,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
113543
113707
|
const indented = writeLineSeparatorsAndIndentBefore(node.expression, node);
|
|
113544
113708
|
emitExpression(
|
|
113545
113709
|
node.expression,
|
|
113546
|
-
/*
|
|
113710
|
+
/*parenthesizerRule*/
|
|
113547
113711
|
void 0
|
|
113548
113712
|
);
|
|
113549
113713
|
writeLineSeparatorsAfter(node.expression, node);
|
|
@@ -113757,7 +113921,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
113757
113921
|
function emitAsExpression(node) {
|
|
113758
113922
|
emitExpression(
|
|
113759
113923
|
node.expression,
|
|
113760
|
-
/*
|
|
113924
|
+
/*parenthesizerRule*/
|
|
113761
113925
|
void 0
|
|
113762
113926
|
);
|
|
113763
113927
|
if (node.type) {
|
|
@@ -113774,7 +113938,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
113774
113938
|
function emitSatisfiesExpression(node) {
|
|
113775
113939
|
emitExpression(
|
|
113776
113940
|
node.expression,
|
|
113777
|
-
/*
|
|
113941
|
+
/*parenthesizerRule*/
|
|
113778
113942
|
void 0
|
|
113779
113943
|
);
|
|
113780
113944
|
if (node.type) {
|
|
@@ -116094,7 +116258,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
116094
116258
|
case 165 /* ComputedPropertyName */:
|
|
116095
116259
|
return makeTempVariableName(
|
|
116096
116260
|
0 /* Auto */,
|
|
116097
|
-
/*
|
|
116261
|
+
/*reservedInNestedScopes*/
|
|
116098
116262
|
true,
|
|
116099
116263
|
privateName,
|
|
116100
116264
|
prefix,
|
|
@@ -116103,7 +116267,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
116103
116267
|
default:
|
|
116104
116268
|
return makeTempVariableName(
|
|
116105
116269
|
0 /* Auto */,
|
|
116106
|
-
/*
|
|
116270
|
+
/*reservedInNestedScopes*/
|
|
116107
116271
|
false,
|
|
116108
116272
|
privateName,
|
|
116109
116273
|
prefix,
|
|
@@ -118449,7 +118613,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
118449
118613
|
return resolveTypeReferenceDirectiveNamesWorker(
|
|
118450
118614
|
typeDirectiveNames,
|
|
118451
118615
|
containingFile,
|
|
118452
|
-
/*
|
|
118616
|
+
/*reusedNames*/
|
|
118453
118617
|
void 0
|
|
118454
118618
|
);
|
|
118455
118619
|
}
|
|
@@ -118777,7 +118941,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
118777
118941
|
void 0,
|
|
118778
118942
|
/*transformers*/
|
|
118779
118943
|
noTransformers,
|
|
118780
|
-
/*
|
|
118944
|
+
/*emitOnly*/
|
|
118781
118945
|
false,
|
|
118782
118946
|
/*onlyBuildInfo*/
|
|
118783
118947
|
true
|
|
@@ -119373,7 +119537,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
119373
119537
|
const node = getNodeAtPosition(file2, r.lastIndex);
|
|
119374
119538
|
if (shouldProcessRequires && isRequireCall(
|
|
119375
119539
|
node,
|
|
119376
|
-
/*
|
|
119540
|
+
/*requireStringLiteralLikeArgument*/
|
|
119377
119541
|
true
|
|
119378
119542
|
)) {
|
|
119379
119543
|
setParentRecursive(
|
|
@@ -119970,7 +120134,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
119970
120134
|
commandLine = host.getParsedCommandLine(refPath);
|
|
119971
120135
|
if (!commandLine) {
|
|
119972
120136
|
addFileToFilesByName(
|
|
119973
|
-
/*
|
|
120137
|
+
/*file*/
|
|
119974
120138
|
void 0,
|
|
119975
120139
|
sourceFilePath,
|
|
119976
120140
|
/*redirectedPath*/
|
|
@@ -121293,7 +121457,7 @@ var BuilderState;
|
|
|
121293
121457
|
), sourceFiles);
|
|
121294
121458
|
},
|
|
121295
121459
|
cancellationToken,
|
|
121296
|
-
/*
|
|
121460
|
+
/*emitOnly*/
|
|
121297
121461
|
true,
|
|
121298
121462
|
/*customTransformers*/
|
|
121299
121463
|
void 0,
|
|
@@ -122509,7 +122673,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
122509
122673
|
continue;
|
|
122510
122674
|
} else {
|
|
122511
122675
|
result = state.program.getSemanticDiagnostics(
|
|
122512
|
-
/*
|
|
122676
|
+
/*sourceFile*/
|
|
122513
122677
|
void 0,
|
|
122514
122678
|
cancellationToken
|
|
122515
122679
|
);
|
|
@@ -122796,8 +122960,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
122796
122960
|
resolutionHost.getCompilationSettings(),
|
|
122797
122961
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
122798
122962
|
);
|
|
122799
|
-
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
122800
|
-
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
122801
122963
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
122802
122964
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
122803
122965
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -122842,7 +123004,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
122842
123004
|
function clear2() {
|
|
122843
123005
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
122844
123006
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
122845
|
-
customFailedLookupPaths.clear();
|
|
122846
123007
|
nonRelativeExternalModuleResolutions.clear();
|
|
122847
123008
|
closeTypeRootsWatch();
|
|
122848
123009
|
resolvedModuleNames.clear();
|
|
@@ -123152,7 +123313,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123152
123313
|
dirPath = getDirectoryPath(dirPath);
|
|
123153
123314
|
}
|
|
123154
123315
|
if (isNodeModulesDirectory(dirPath)) {
|
|
123155
|
-
return canWatchDirectoryOrFile(
|
|
123316
|
+
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
123156
123317
|
}
|
|
123157
123318
|
let nonRecursive = true;
|
|
123158
123319
|
let subDirectoryPath, subDirectory;
|
|
@@ -123171,9 +123332,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123171
123332
|
}
|
|
123172
123333
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
123173
123334
|
}
|
|
123174
|
-
function isPathWithDefaultFailedLookupExtension(path) {
|
|
123175
|
-
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
123176
|
-
}
|
|
123177
123335
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
123178
123336
|
var _a2, _b;
|
|
123179
123337
|
if (resolution.refCount) {
|
|
@@ -123212,10 +123370,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123212
123370
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
123213
123371
|
if (toWatch) {
|
|
123214
123372
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
123215
|
-
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
123216
|
-
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
123217
|
-
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
123218
|
-
}
|
|
123219
123373
|
if (dirPath === rootPath) {
|
|
123220
123374
|
Debug.assert(!nonRecursive);
|
|
123221
123375
|
setAtRoot = true;
|
|
@@ -123250,6 +123404,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123250
123404
|
);
|
|
123251
123405
|
}
|
|
123252
123406
|
}
|
|
123407
|
+
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
123408
|
+
const path = resolutionHost.toPath(locationToWatch);
|
|
123409
|
+
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
123410
|
+
}
|
|
123253
123411
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
123254
123412
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
123255
123413
|
if (fileWatcher) {
|
|
@@ -123277,7 +123435,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123277
123435
|
}
|
|
123278
123436
|
const paths = /* @__PURE__ */ new Set();
|
|
123279
123437
|
paths.add(locationToWatch);
|
|
123280
|
-
let actualWatcher =
|
|
123438
|
+
let actualWatcher = isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
123281
123439
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
123282
123440
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
123283
123441
|
paths.forEach((path) => {
|
|
@@ -123313,7 +123471,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123313
123471
|
} else {
|
|
123314
123472
|
resolutions.forEach((resolution) => watchAffectingLocationsOfResolution(
|
|
123315
123473
|
resolution,
|
|
123316
|
-
/*
|
|
123474
|
+
/*addToResolutionsWithOnlyAffectingLocations*/
|
|
123317
123475
|
true
|
|
123318
123476
|
));
|
|
123319
123477
|
}
|
|
@@ -123348,15 +123506,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123348
123506
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
123349
123507
|
if (toWatch) {
|
|
123350
123508
|
const { dirPath } = toWatch;
|
|
123351
|
-
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
123352
|
-
if (refCount) {
|
|
123353
|
-
if (refCount === 1) {
|
|
123354
|
-
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
123355
|
-
} else {
|
|
123356
|
-
Debug.assert(refCount > 1);
|
|
123357
|
-
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
123358
|
-
}
|
|
123359
|
-
}
|
|
123360
123509
|
if (dirPath === rootPath) {
|
|
123361
123510
|
removeAtRoot = true;
|
|
123362
123511
|
} else {
|
|
@@ -123454,10 +123603,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123454
123603
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
123455
123604
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
123456
123605
|
} else {
|
|
123457
|
-
if (
|
|
123606
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
123458
123607
|
return false;
|
|
123459
123608
|
}
|
|
123460
|
-
if (
|
|
123609
|
+
if (fileExtensionIs(fileOrDirectoryPath, ".map")) {
|
|
123461
123610
|
return false;
|
|
123462
123611
|
}
|
|
123463
123612
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -123554,12 +123703,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
123554
123703
|
closeTypeRootsWatch();
|
|
123555
123704
|
}
|
|
123556
123705
|
}
|
|
123557
|
-
function canWatchTypeRootPath(
|
|
123558
|
-
|
|
123559
|
-
|
|
123560
|
-
|
|
123561
|
-
const dirPath = resolutionHost.toPath(dir);
|
|
123562
|
-
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
123706
|
+
function canWatchTypeRootPath(typeRoot) {
|
|
123707
|
+
return !!resolutionHost.getCompilationSettings().typeRoots || // Otherwise we'll only watch this path if it falls within `rootDir` or
|
|
123708
|
+
// the path is not disqualified by other criteria ("not `C:\Users\Name\Dir`").
|
|
123709
|
+
isInRootPathOrCanWatchDirectoryOrFile(getDirectoryPath(typeRoot));
|
|
123563
123710
|
}
|
|
123564
123711
|
}
|
|
123565
123712
|
function resolutionIsSymlink(resolution) {
|
|
@@ -123673,7 +123820,7 @@ function prettyPathForFileError(error, cwd) {
|
|
|
123673
123820
|
return getRelativePathFromDirectory(
|
|
123674
123821
|
cwd,
|
|
123675
123822
|
error.fileName,
|
|
123676
|
-
/*
|
|
123823
|
+
/*ignoreCase*/
|
|
123677
123824
|
false
|
|
123678
123825
|
) + line;
|
|
123679
123826
|
}
|
|
@@ -124843,7 +124990,6 @@ function createWatchProgram(host) {
|
|
|
124843
124990
|
);
|
|
124844
124991
|
}
|
|
124845
124992
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
124846
|
-
Debug.assert(configFileName);
|
|
124847
124993
|
updateSharedExtendedConfigFileWatcher(
|
|
124848
124994
|
forProjectPath,
|
|
124849
124995
|
options,
|
|
@@ -124859,7 +125005,7 @@ function createWatchProgram(host) {
|
|
|
124859
125005
|
if (!(projects == null ? void 0 : projects.size))
|
|
124860
125006
|
return;
|
|
124861
125007
|
projects.forEach((projectPath) => {
|
|
124862
|
-
if (toPath3(configFileName) === projectPath) {
|
|
125008
|
+
if (configFileName && toPath3(configFileName) === projectPath) {
|
|
124863
125009
|
reloadLevel = 2 /* Full */;
|
|
124864
125010
|
} else {
|
|
124865
125011
|
const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);
|
|
@@ -125612,7 +125758,7 @@ function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath,
|
|
|
125612
125758
|
void 0,
|
|
125613
125759
|
(name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }),
|
|
125614
125760
|
cancellationToken,
|
|
125615
|
-
/*
|
|
125761
|
+
/*emitOnlyDtsFiles*/
|
|
125616
125762
|
false,
|
|
125617
125763
|
customTransformers || ((_b = (_a2 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a2, project))
|
|
125618
125764
|
);
|
|
@@ -128474,7 +128620,7 @@ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTr
|
|
|
128474
128620
|
}
|
|
128475
128621
|
const start2 = allowPositionInLeadingTrivia ? children[middle].getFullStart() : children[middle].getStart(
|
|
128476
128622
|
sourceFile,
|
|
128477
|
-
/*
|
|
128623
|
+
/*includeJsDocComment*/
|
|
128478
128624
|
true
|
|
128479
128625
|
);
|
|
128480
128626
|
if (start2 > position) {
|
|
@@ -128509,7 +128655,7 @@ function getTokenAtPositionWorker(sourceFile, position, allowPositionInLeadingTr
|
|
|
128509
128655
|
}
|
|
128510
128656
|
start2 != null ? start2 : start2 = allowPositionInLeadingTrivia ? node.getFullStart() : node.getStart(
|
|
128511
128657
|
sourceFile,
|
|
128512
|
-
/*
|
|
128658
|
+
/*includeJsDocComment*/
|
|
128513
128659
|
true
|
|
128514
128660
|
);
|
|
128515
128661
|
if (start2 > position) {
|
|
@@ -129554,7 +129700,7 @@ function signatureToDisplayParts(typechecker, signature, enclosingDeclaration, f
|
|
|
129554
129700
|
signature,
|
|
129555
129701
|
enclosingDeclaration,
|
|
129556
129702
|
flags,
|
|
129557
|
-
/*
|
|
129703
|
+
/*kind*/
|
|
129558
129704
|
void 0,
|
|
129559
129705
|
writer
|
|
129560
129706
|
);
|
|
@@ -130209,13 +130355,13 @@ function getNamesForExportedSymbol(symbol, scriptTarget) {
|
|
|
130209
130355
|
const fileNameCase = ts_codefix_exports.moduleSymbolToValidIdentifier(
|
|
130210
130356
|
getSymbolParentOrFail(symbol),
|
|
130211
130357
|
scriptTarget,
|
|
130212
|
-
/*
|
|
130358
|
+
/*forceCapitalize*/
|
|
130213
130359
|
false
|
|
130214
130360
|
);
|
|
130215
130361
|
const capitalized = ts_codefix_exports.moduleSymbolToValidIdentifier(
|
|
130216
130362
|
getSymbolParentOrFail(symbol),
|
|
130217
130363
|
scriptTarget,
|
|
130218
|
-
/*
|
|
130364
|
+
/*forceCapitalize*/
|
|
130219
130365
|
true
|
|
130220
130366
|
);
|
|
130221
130367
|
if (fileNameCase === capitalized)
|
|
@@ -130859,7 +131005,7 @@ function createClassifier() {
|
|
|
130859
131005
|
const lastTemplateStackToken = lastOrUndefined(templateStack);
|
|
130860
131006
|
if (lastTemplateStackToken === 15 /* TemplateHead */) {
|
|
130861
131007
|
token = scanner2.reScanTemplateToken(
|
|
130862
|
-
/*
|
|
131008
|
+
/*isTaggedTemplate*/
|
|
130863
131009
|
false
|
|
130864
131010
|
);
|
|
130865
131011
|
if (token === 17 /* TemplateTail */) {
|
|
@@ -132557,7 +132703,7 @@ function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
|
132557
132703
|
candidate,
|
|
132558
132704
|
span,
|
|
132559
132705
|
chunk.text,
|
|
132560
|
-
/*ignoreCase
|
|
132706
|
+
/*ignoreCase*/
|
|
132561
132707
|
true
|
|
132562
132708
|
)) {
|
|
132563
132709
|
return createPatternMatch(
|
|
@@ -132567,7 +132713,7 @@ function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
|
132567
132713
|
candidate,
|
|
132568
132714
|
span,
|
|
132569
132715
|
chunk.text,
|
|
132570
|
-
/*ignoreCase
|
|
132716
|
+
/*ignoreCase*/
|
|
132571
132717
|
false
|
|
132572
132718
|
)
|
|
132573
132719
|
);
|
|
@@ -132576,7 +132722,7 @@ function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
|
132576
132722
|
if (chunk.text.length < candidate.length && isUpperCaseLetter(candidate.charCodeAt(index))) {
|
|
132577
132723
|
return createPatternMatch(
|
|
132578
132724
|
2 /* substring */,
|
|
132579
|
-
/*isCaseSensitive
|
|
132725
|
+
/*isCaseSensitive*/
|
|
132580
132726
|
false
|
|
132581
132727
|
);
|
|
132582
132728
|
}
|
|
@@ -132584,7 +132730,7 @@ function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
|
132584
132730
|
if (candidate.indexOf(chunk.text) > 0) {
|
|
132585
132731
|
return createPatternMatch(
|
|
132586
132732
|
2 /* substring */,
|
|
132587
|
-
/*isCaseSensitive
|
|
132733
|
+
/*isCaseSensitive*/
|
|
132588
132734
|
true
|
|
132589
132735
|
);
|
|
132590
132736
|
}
|
|
@@ -132594,13 +132740,13 @@ function matchTextChunk(candidate, chunk, stringToWordSpans) {
|
|
|
132594
132740
|
candidate,
|
|
132595
132741
|
candidateParts,
|
|
132596
132742
|
chunk,
|
|
132597
|
-
/*ignoreCase
|
|
132743
|
+
/*ignoreCase*/
|
|
132598
132744
|
false
|
|
132599
132745
|
) ? true : tryCamelCaseMatch(
|
|
132600
132746
|
candidate,
|
|
132601
132747
|
candidateParts,
|
|
132602
132748
|
chunk,
|
|
132603
|
-
/*ignoreCase
|
|
132749
|
+
/*ignoreCase*/
|
|
132604
132750
|
true
|
|
132605
132751
|
) ? false : void 0;
|
|
132606
132752
|
if (isCaseSensitive !== void 0) {
|
|
@@ -132754,14 +132900,14 @@ function createTextChunk(text) {
|
|
|
132754
132900
|
function breakIntoCharacterSpans(identifier) {
|
|
132755
132901
|
return breakIntoSpans(
|
|
132756
132902
|
identifier,
|
|
132757
|
-
/*word
|
|
132903
|
+
/*word*/
|
|
132758
132904
|
false
|
|
132759
132905
|
);
|
|
132760
132906
|
}
|
|
132761
132907
|
function breakIntoWordSpans(identifier) {
|
|
132762
132908
|
return breakIntoSpans(
|
|
132763
132909
|
identifier,
|
|
132764
|
-
/*word
|
|
132910
|
+
/*word*/
|
|
132765
132911
|
true
|
|
132766
132912
|
);
|
|
132767
132913
|
}
|
|
@@ -133119,7 +133265,7 @@ function preProcessFile(sourceText, readImportFiles = true, detectJavaScriptImpo
|
|
|
133119
133265
|
if (length(stack)) {
|
|
133120
133266
|
if (lastOrUndefined(stack) === 15 /* TemplateHead */) {
|
|
133121
133267
|
if (scanner.reScanTemplateToken(
|
|
133122
|
-
/*
|
|
133268
|
+
/*isTaggedTemplate*/
|
|
133123
133269
|
false
|
|
133124
133270
|
) === 17 /* TemplateTail */) {
|
|
133125
133271
|
stack.pop();
|
|
@@ -133356,7 +133502,7 @@ function computeSuggestionDiagnostics(sourceFile, program, cancellationToken) {
|
|
|
133356
133502
|
const init = node.declarationList.declarations[0].initializer;
|
|
133357
133503
|
if (init && isRequireCall(
|
|
133358
133504
|
init,
|
|
133359
|
-
/*
|
|
133505
|
+
/*requireStringLiteralLikeArgument*/
|
|
133360
133506
|
true
|
|
133361
133507
|
)) {
|
|
133362
133508
|
diags.push(createDiagnosticForNode(init, Diagnostics.require_call_may_be_converted_to_an_import));
|
|
@@ -133382,7 +133528,7 @@ function containsTopLevelCommonjs(sourceFile) {
|
|
|
133382
133528
|
case 241 /* VariableStatement */:
|
|
133383
133529
|
return statement.declarationList.declarations.some((decl) => !!decl.initializer && isRequireCall(
|
|
133384
133530
|
propertyAccessLeftHandSide(decl.initializer),
|
|
133385
|
-
/*
|
|
133531
|
+
/*requireStringLiteralLikeArgument*/
|
|
133386
133532
|
true
|
|
133387
133533
|
));
|
|
133388
133534
|
case 242 /* ExpressionStatement */: {
|
|
@@ -133390,7 +133536,7 @@ function containsTopLevelCommonjs(sourceFile) {
|
|
|
133390
133536
|
if (!isBinaryExpression(expression))
|
|
133391
133537
|
return isRequireCall(
|
|
133392
133538
|
expression,
|
|
133393
|
-
/*
|
|
133539
|
+
/*requireStringLiteralLikeArgument*/
|
|
133394
133540
|
true
|
|
133395
133541
|
);
|
|
133396
133542
|
const kind = getAssignmentDeclarationKind(expression);
|
|
@@ -133581,7 +133727,7 @@ function transpileModule(input, transpileOptions) {
|
|
|
133581
133727
|
languageVersion: getEmitScriptTarget(options),
|
|
133582
133728
|
impliedNodeFormat: getImpliedNodeFormatForFile(
|
|
133583
133729
|
toPath(inputFileName, "", compilerHost.getCanonicalFileName),
|
|
133584
|
-
/*
|
|
133730
|
+
/*packageJsonInfoCache*/
|
|
133585
133731
|
void 0,
|
|
133586
133732
|
compilerHost,
|
|
133587
133733
|
options
|
|
@@ -134161,10 +134307,10 @@ function tryMergeEs5Class(a, b, bIndex, parent2) {
|
|
|
134161
134307
|
if (ctorFunction !== void 0) {
|
|
134162
134308
|
const ctorNode = setTextRange(
|
|
134163
134309
|
factory.createConstructorDeclaration(
|
|
134164
|
-
/*
|
|
134310
|
+
/*modifiers*/
|
|
134165
134311
|
void 0,
|
|
134166
134312
|
[],
|
|
134167
|
-
/*
|
|
134313
|
+
/*body*/
|
|
134168
134314
|
void 0
|
|
134169
134315
|
),
|
|
134170
134316
|
ctorFunction
|
|
@@ -134183,12 +134329,12 @@ function tryMergeEs5Class(a, b, bIndex, parent2) {
|
|
|
134183
134329
|
}
|
|
134184
134330
|
}
|
|
134185
134331
|
lastANode = a.node = setTextRange(factory.createClassDeclaration(
|
|
134186
|
-
/*
|
|
134332
|
+
/*modifiers*/
|
|
134187
134333
|
void 0,
|
|
134188
134334
|
a.name || factory.createIdentifier("__class__"),
|
|
134189
|
-
/*
|
|
134335
|
+
/*typeParameters*/
|
|
134190
134336
|
void 0,
|
|
134191
|
-
/*
|
|
134337
|
+
/*heritageClauses*/
|
|
134192
134338
|
void 0,
|
|
134193
134339
|
[]
|
|
134194
134340
|
), a.node);
|
|
@@ -134205,12 +134351,12 @@ function tryMergeEs5Class(a, b, bIndex, parent2) {
|
|
|
134205
134351
|
if (!a.additionalNodes)
|
|
134206
134352
|
a.additionalNodes = [];
|
|
134207
134353
|
a.additionalNodes.push(setTextRange(factory.createClassDeclaration(
|
|
134208
|
-
/*
|
|
134354
|
+
/*modifiers*/
|
|
134209
134355
|
void 0,
|
|
134210
134356
|
a.name || factory.createIdentifier("__class__"),
|
|
134211
|
-
/*
|
|
134357
|
+
/*typeParameters*/
|
|
134212
134358
|
void 0,
|
|
134213
|
-
/*
|
|
134359
|
+
/*heritageClauses*/
|
|
134214
134360
|
void 0,
|
|
134215
134361
|
[]
|
|
134216
134362
|
), b.node));
|
|
@@ -135791,7 +135937,7 @@ function createLanguageService(host, documentRegistry = createDocumentRegistry(h
|
|
|
135791
135937
|
result,
|
|
135792
135938
|
parseConfigHost,
|
|
135793
135939
|
getNormalizedAbsolutePath(getDirectoryPath(configFileName), currentDirectory),
|
|
135794
|
-
/*
|
|
135940
|
+
/*existingOptions*/
|
|
135795
135941
|
void 0,
|
|
135796
135942
|
getNormalizedAbsolutePath(configFileName, currentDirectory)
|
|
135797
135943
|
);
|
|
@@ -136844,7 +136990,7 @@ function transform(source, transformers, compilerOptions) {
|
|
|
136844
136990
|
const result = transformNodes(
|
|
136845
136991
|
/*resolver*/
|
|
136846
136992
|
void 0,
|
|
136847
|
-
/*
|
|
136993
|
+
/*host*/
|
|
136848
136994
|
void 0,
|
|
136849
136995
|
factory,
|
|
136850
136996
|
compilerOptions,
|
|
@@ -137634,9 +137780,9 @@ var CoreServicesShimObject = class extends ShimBase {
|
|
|
137634
137780
|
() => {
|
|
137635
137781
|
const result = preProcessFile(
|
|
137636
137782
|
getSnapshotText(sourceTextSnapshot),
|
|
137637
|
-
/*
|
|
137783
|
+
/*readImportFiles*/
|
|
137638
137784
|
true,
|
|
137639
|
-
/*
|
|
137785
|
+
/*detectJavaScriptImports*/
|
|
137640
137786
|
true
|
|
137641
137787
|
);
|
|
137642
137788
|
return {
|
|
@@ -137705,7 +137851,7 @@ var CoreServicesShimObject = class extends ShimBase {
|
|
|
137705
137851
|
}
|
|
137706
137852
|
discoverTypings(discoverTypingsJson) {
|
|
137707
137853
|
const getCanonicalFileName = createGetCanonicalFileName(
|
|
137708
|
-
/*
|
|
137854
|
+
/*useCaseSensitiveFileNames*/
|
|
137709
137855
|
false
|
|
137710
137856
|
);
|
|
137711
137857
|
return this.forwardJSONCall("discoverTypings()", () => {
|
|
@@ -137747,7 +137893,7 @@ var TypeScriptServicesFactory = class {
|
|
|
137747
137893
|
const languageService = createLanguageService(
|
|
137748
137894
|
hostAdapter,
|
|
137749
137895
|
this.documentRegistry,
|
|
137750
|
-
/*
|
|
137896
|
+
/*syntaxOnlyOrLanguageServiceMode*/
|
|
137751
137897
|
false
|
|
137752
137898
|
);
|
|
137753
137899
|
return new LanguageServiceShimObject(this, host, languageService);
|
|
@@ -139717,7 +139863,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler
|
|
|
139717
139863
|
const prototypes = firstDeclaration.parent.right;
|
|
139718
139864
|
createClassElement(
|
|
139719
139865
|
prototypes.symbol,
|
|
139720
|
-
|
|
139866
|
+
/*modifiers*/
|
|
139721
139867
|
void 0,
|
|
139722
139868
|
memberElements
|
|
139723
139869
|
);
|
|
@@ -139789,7 +139935,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler
|
|
|
139789
139935
|
members.push(factory.createPropertyDeclaration(
|
|
139790
139936
|
modifiers,
|
|
139791
139937
|
symbol2.name,
|
|
139792
|
-
/*
|
|
139938
|
+
/*questionOrExclamationToken*/
|
|
139793
139939
|
void 0,
|
|
139794
139940
|
/*type*/
|
|
139795
139941
|
void 0,
|
|
@@ -139829,7 +139975,7 @@ function doChange2(changes, sourceFile, position, checker, preferences, compiler
|
|
|
139829
139975
|
const prop = factory.createPropertyDeclaration(
|
|
139830
139976
|
modifiers,
|
|
139831
139977
|
memberDeclaration.name,
|
|
139832
|
-
/*
|
|
139978
|
+
/*questionOrExclamationToken*/
|
|
139833
139979
|
void 0,
|
|
139834
139980
|
/*type*/
|
|
139835
139981
|
void 0,
|
|
@@ -140292,7 +140438,7 @@ function transformFinally(node, onFinally, transformer, hasContinuation, continu
|
|
|
140292
140438
|
hasContinuation,
|
|
140293
140439
|
/*continuationArgName*/
|
|
140294
140440
|
void 0,
|
|
140295
|
-
/*
|
|
140441
|
+
/*inputArgName*/
|
|
140296
140442
|
void 0,
|
|
140297
140443
|
node,
|
|
140298
140444
|
transformer
|
|
@@ -140699,7 +140845,7 @@ function fixImportOfModuleExports(importingFile, exportingFile, changes, quotePr
|
|
|
140699
140845
|
case 211 /* CallExpression */:
|
|
140700
140846
|
if (isRequireCall(
|
|
140701
140847
|
importNode,
|
|
140702
|
-
/*
|
|
140848
|
+
/*requireStringLiteralLikeArgument*/
|
|
140703
140849
|
false
|
|
140704
140850
|
)) {
|
|
140705
140851
|
changes.replaceNode(importingFile, importNode, factory.createPropertyAccessExpression(getSynthesizedDeepClone(importNode), "default"));
|
|
@@ -140774,11 +140920,11 @@ function convertStatement(sourceFile, statement, checker, changes, identifiers,
|
|
|
140774
140920
|
case 211 /* CallExpression */: {
|
|
140775
140921
|
if (isRequireCall(
|
|
140776
140922
|
expression,
|
|
140777
|
-
/*
|
|
140923
|
+
/*requireStringLiteralLikeArgument*/
|
|
140778
140924
|
true
|
|
140779
140925
|
)) {
|
|
140780
140926
|
changes.replaceNode(sourceFile, statement, makeImport(
|
|
140781
|
-
/*
|
|
140927
|
+
/*defaultImport*/
|
|
140782
140928
|
void 0,
|
|
140783
140929
|
/*namedImports*/
|
|
140784
140930
|
void 0,
|
|
@@ -140809,14 +140955,14 @@ function convertVariableStatement(sourceFile, statement, changes, checker, ident
|
|
|
140809
140955
|
return convertedImports([]);
|
|
140810
140956
|
} else if (isRequireCall(
|
|
140811
140957
|
initializer,
|
|
140812
|
-
/*
|
|
140958
|
+
/*requireStringLiteralLikeArgument*/
|
|
140813
140959
|
true
|
|
140814
140960
|
)) {
|
|
140815
140961
|
foundImport = true;
|
|
140816
140962
|
return convertSingleImport(name, initializer.arguments[0], checker, identifiers, target, quotePreference);
|
|
140817
140963
|
} else if (isPropertyAccessExpression(initializer) && isRequireCall(
|
|
140818
140964
|
initializer.expression,
|
|
140819
|
-
/*
|
|
140965
|
+
/*requireStringLiteralLikeArgument*/
|
|
140820
140966
|
true
|
|
140821
140967
|
)) {
|
|
140822
140968
|
foundImport = true;
|
|
@@ -140872,7 +141018,7 @@ function convertAssignment(sourceFile, checker, assignment, changes, exports, us
|
|
|
140872
141018
|
} else {
|
|
140873
141019
|
const replacement = isObjectLiteralExpression(right) ? tryChangeModuleExportsObject(right, useSitesToUnqualify) : isRequireCall(
|
|
140874
141020
|
right,
|
|
140875
|
-
/*
|
|
141021
|
+
/*requireStringLiteralLikeArgument*/
|
|
140876
141022
|
true
|
|
140877
141023
|
) ? convertReExportAll(right.arguments[0], checker) : void 0;
|
|
140878
141024
|
if (replacement) {
|
|
@@ -140940,7 +141086,7 @@ function convertReExportAll(reExported, checker) {
|
|
|
140940
141086
|
}
|
|
140941
141087
|
function reExportStar(moduleSpecifier) {
|
|
140942
141088
|
return makeExportDeclaration(
|
|
140943
|
-
/*
|
|
141089
|
+
/*exportSpecifiers*/
|
|
140944
141090
|
void 0,
|
|
140945
141091
|
moduleSpecifier
|
|
140946
141092
|
);
|
|
@@ -141022,7 +141168,7 @@ function convertSingleImport(name, moduleSpecifier, checker, identifiers, target
|
|
|
141022
141168
|
const importSpecifiers = mapAllOrFail(name.elements, (e) => e.dotDotDotToken || e.initializer || e.propertyName && !isIdentifier(e.propertyName) || !isIdentifier(e.name) ? void 0 : makeImportSpecifier(e.propertyName && e.propertyName.text, e.name.text));
|
|
141023
141169
|
if (importSpecifiers) {
|
|
141024
141170
|
return convertedImports([makeImport(
|
|
141025
|
-
/*
|
|
141171
|
+
/*defaultImport*/
|
|
141026
141172
|
void 0,
|
|
141027
141173
|
importSpecifiers,
|
|
141028
141174
|
moduleSpecifier,
|
|
@@ -141155,7 +141301,7 @@ function makeSingleImport(localName, propertyName, moduleSpecifier, quotePrefere
|
|
|
141155
141301
|
moduleSpecifier,
|
|
141156
141302
|
quotePreference
|
|
141157
141303
|
) : makeImport(
|
|
141158
|
-
/*
|
|
141304
|
+
/*defaultImport*/
|
|
141159
141305
|
void 0,
|
|
141160
141306
|
[makeImportSpecifier(propertyName, localName)],
|
|
141161
141307
|
moduleSpecifier,
|
|
@@ -141803,7 +141949,7 @@ function createImportAdderWorker(sourceFile, program, useAutoImportProvider, pre
|
|
|
141803
141949
|
symbol,
|
|
141804
141950
|
symbolName2,
|
|
141805
141951
|
moduleSymbol,
|
|
141806
|
-
/*
|
|
141952
|
+
/*preferCapitalized*/
|
|
141807
141953
|
false,
|
|
141808
141954
|
program,
|
|
141809
141955
|
host,
|
|
@@ -143676,7 +143822,7 @@ registerCodeFix({
|
|
|
143676
143822
|
info.declaration,
|
|
143677
143823
|
info.expression,
|
|
143678
143824
|
info.commentSource,
|
|
143679
|
-
/*
|
|
143825
|
+
/*withParen*/
|
|
143680
143826
|
false
|
|
143681
143827
|
);
|
|
143682
143828
|
break;
|
|
@@ -143797,7 +143943,7 @@ function getInfo6(checker, sourceFile, position, errorCode) {
|
|
|
143797
143943
|
checker,
|
|
143798
143944
|
declaration,
|
|
143799
143945
|
checker.getTypeFromTypeNode(declaration.type),
|
|
143800
|
-
/*
|
|
143946
|
+
/*isFunctionType*/
|
|
143801
143947
|
false
|
|
143802
143948
|
);
|
|
143803
143949
|
case Diagnostics.Argument_of_type_0_is_not_assignable_to_parameter_of_type_1.code:
|
|
@@ -143811,7 +143957,7 @@ function getInfo6(checker, sourceFile, position, errorCode) {
|
|
|
143811
143957
|
checker,
|
|
143812
143958
|
declaration,
|
|
143813
143959
|
type,
|
|
143814
|
-
/*
|
|
143960
|
+
/*isFunctionType*/
|
|
143815
143961
|
true
|
|
143816
143962
|
);
|
|
143817
143963
|
case Diagnostics.Type_0_is_not_assignable_to_type_1.code:
|
|
@@ -143824,7 +143970,7 @@ function getInfo6(checker, sourceFile, position, errorCode) {
|
|
|
143824
143970
|
checker,
|
|
143825
143971
|
initializer,
|
|
143826
143972
|
checker.getTypeAtLocation(node.parent),
|
|
143827
|
-
/*
|
|
143973
|
+
/*isFunctionType*/
|
|
143828
143974
|
true
|
|
143829
143975
|
);
|
|
143830
143976
|
}
|
|
@@ -143877,7 +144023,7 @@ function getActionForFixRemoveBracesFromArrowFunctionBody(context, declaration,
|
|
|
143877
144023
|
declaration,
|
|
143878
144024
|
expression,
|
|
143879
144025
|
commentSource,
|
|
143880
|
-
/*
|
|
144026
|
+
/*withParen*/
|
|
143881
144027
|
false
|
|
143882
144028
|
));
|
|
143883
144029
|
return createCodeFixAction(fixId23, changes, Diagnostics.Remove_braces_from_arrow_function_body, fixRemoveBracesFromArrowFunctionBody, Diagnostics.Remove_braces_from_all_arrow_function_bodies_with_relevant_issues);
|
|
@@ -144001,9 +144147,9 @@ function getInfo7(sourceFile, tokenPos, errorCode, checker, program) {
|
|
|
144001
144147
|
const properties = arrayFrom(checker.getUnmatchedProperties(
|
|
144002
144148
|
checker.getTypeAtLocation(parent2),
|
|
144003
144149
|
checker.getParameterType(signature, argIndex),
|
|
144004
|
-
/*
|
|
144150
|
+
/*requireOptionalProperties*/
|
|
144005
144151
|
false,
|
|
144006
|
-
/*
|
|
144152
|
+
/*matchDiscriminantProperties*/
|
|
144007
144153
|
false
|
|
144008
144154
|
));
|
|
144009
144155
|
if (!length(properties))
|
|
@@ -144017,9 +144163,9 @@ function getInfo7(sourceFile, tokenPos, errorCode, checker, program) {
|
|
|
144017
144163
|
const properties = arrayFrom(checker.getUnmatchedProperties(
|
|
144018
144164
|
checker.getTypeAtLocation(parent2.initializer),
|
|
144019
144165
|
targetType,
|
|
144020
|
-
/*
|
|
144166
|
+
/*requireOptionalProperties*/
|
|
144021
144167
|
false,
|
|
144022
|
-
/*
|
|
144168
|
+
/*matchDiscriminantProperties*/
|
|
144023
144169
|
false
|
|
144024
144170
|
));
|
|
144025
144171
|
if (!length(properties))
|
|
@@ -144112,7 +144258,7 @@ function addMissingMemberInJs(changeTracker, sourceFile, classDeclaration, token
|
|
|
144112
144258
|
/*modifiers*/
|
|
144113
144259
|
void 0,
|
|
144114
144260
|
tokenName,
|
|
144115
|
-
/*
|
|
144261
|
+
/*questionOrExclamationToken*/
|
|
144116
144262
|
void 0,
|
|
144117
144263
|
/*type*/
|
|
144118
144264
|
void 0,
|
|
@@ -144175,7 +144321,7 @@ function addPropertyDeclaration(changeTracker, sourceFile, node, tokenName, type
|
|
|
144175
144321
|
const property = isClassLike(node) ? factory.createPropertyDeclaration(
|
|
144176
144322
|
modifiers,
|
|
144177
144323
|
tokenName,
|
|
144178
|
-
/*
|
|
144324
|
+
/*questionOrExclamationToken*/
|
|
144179
144325
|
void 0,
|
|
144180
144326
|
typeNode,
|
|
144181
144327
|
/*initializer*/
|
|
@@ -144971,7 +145117,7 @@ registerCodeFix({
|
|
|
144971
145117
|
preferences,
|
|
144972
145118
|
sourceFile,
|
|
144973
145119
|
span.start,
|
|
144974
|
-
/*
|
|
145120
|
+
/*useHtmlEntity*/
|
|
144975
145121
|
false
|
|
144976
145122
|
));
|
|
144977
145123
|
const changeToHtmlEntity = ts_textChanges_exports.ChangeTracker.with(context, (t) => doChange18(
|
|
@@ -144979,7 +145125,7 @@ registerCodeFix({
|
|
|
144979
145125
|
preferences,
|
|
144980
145126
|
sourceFile,
|
|
144981
145127
|
span.start,
|
|
144982
|
-
/*
|
|
145128
|
+
/*useHtmlEntity*/
|
|
144983
145129
|
true
|
|
144984
145130
|
));
|
|
144985
145131
|
return [
|
|
@@ -146116,7 +146262,7 @@ function tryReplaceImportTypeNodeWithAutoImport(typeNode, declaration, sourceFil
|
|
|
146116
146262
|
if (importableReference && changes.tryInsertTypeAnnotation(sourceFile, declaration, importableReference.typeNode)) {
|
|
146117
146263
|
forEach(importableReference.symbols, (s) => importAdder.addImportFromExportedSymbol(
|
|
146118
146264
|
s,
|
|
146119
|
-
/*
|
|
146265
|
+
/*isValidTypeOnlyUseSite*/
|
|
146120
146266
|
true
|
|
146121
146267
|
));
|
|
146122
146268
|
return true;
|
|
@@ -146172,7 +146318,7 @@ function annotateJSDocParameters(changes, sourceFile, parameterInferences, progr
|
|
|
146172
146318
|
/*isBracketed*/
|
|
146173
146319
|
!!isOptional,
|
|
146174
146320
|
factory.createJSDocTypeExpression(typeNode),
|
|
146175
|
-
/*
|
|
146321
|
+
/*isNameFirst*/
|
|
146176
146322
|
false,
|
|
146177
146323
|
/*comment*/
|
|
146178
146324
|
void 0
|
|
@@ -146950,7 +147096,7 @@ function createMissingMemberNodes(classDeclaration, possiblyMissingSymbols, sour
|
|
|
146950
147096
|
preferences,
|
|
146951
147097
|
importAdder,
|
|
146952
147098
|
addClassElement,
|
|
146953
|
-
/*
|
|
147099
|
+
/*body*/
|
|
146954
147100
|
void 0
|
|
146955
147101
|
);
|
|
146956
147102
|
}
|
|
@@ -147424,7 +147570,7 @@ function createMethodImplementingSignatures(checker, context, enclosingDeclarati
|
|
|
147424
147570
|
const parameters = createDummyParameters(
|
|
147425
147571
|
maxNonRestArgs,
|
|
147426
147572
|
maxArgsParameterSymbolNames,
|
|
147427
|
-
/*
|
|
147573
|
+
/*types*/
|
|
147428
147574
|
void 0,
|
|
147429
147575
|
minArgumentCount,
|
|
147430
147576
|
/*inJs*/
|
|
@@ -147493,7 +147639,7 @@ function createStubbedBody(text, quotePreference) {
|
|
|
147493
147639
|
)]
|
|
147494
147640
|
)
|
|
147495
147641
|
)],
|
|
147496
|
-
/*
|
|
147642
|
+
/*multiLine*/
|
|
147497
147643
|
true
|
|
147498
147644
|
);
|
|
147499
147645
|
}
|
|
@@ -148095,7 +148241,7 @@ function getInfo14(sourceFile, program, pos) {
|
|
|
148095
148241
|
const { parent: parent2 } = getTokenAtPosition(sourceFile, pos);
|
|
148096
148242
|
if (!isRequireCall(
|
|
148097
148243
|
parent2,
|
|
148098
|
-
/*
|
|
148244
|
+
/*requireStringLiteralLikeArgument*/
|
|
148099
148245
|
true
|
|
148100
148246
|
)) {
|
|
148101
148247
|
Debug.failBadSyntaxKind(parent2);
|
|
@@ -148228,7 +148374,7 @@ function doChange29(changes, sourceFile, importType) {
|
|
|
148228
148374
|
importType.assertions,
|
|
148229
148375
|
importType.qualifier,
|
|
148230
148376
|
importType.typeArguments,
|
|
148231
|
-
/*
|
|
148377
|
+
/*isTypeOf*/
|
|
148232
148378
|
true
|
|
148233
148379
|
);
|
|
148234
148380
|
changes.replaceNode(sourceFile, importType, newTypeNode);
|
|
@@ -149419,14 +149565,14 @@ function getEntryForMemberCompletion(host, program, options, preferences, name,
|
|
|
149419
149565
|
const emptyStmt = factory.createEmptyStatement();
|
|
149420
149566
|
body = factory.createBlock(
|
|
149421
149567
|
[emptyStmt],
|
|
149422
|
-
/*
|
|
149568
|
+
/*multiLine*/
|
|
149423
149569
|
true
|
|
149424
149570
|
);
|
|
149425
149571
|
setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });
|
|
149426
149572
|
} else {
|
|
149427
149573
|
body = factory.createBlock(
|
|
149428
149574
|
[],
|
|
149429
|
-
/*
|
|
149575
|
+
/*multiLine*/
|
|
149430
149576
|
true
|
|
149431
149577
|
);
|
|
149432
149578
|
}
|
|
@@ -149604,14 +149750,14 @@ function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, pro
|
|
|
149604
149750
|
const emptyStmt = factory.createEmptyStatement();
|
|
149605
149751
|
body = factory.createBlock(
|
|
149606
149752
|
[emptyStmt],
|
|
149607
|
-
/*
|
|
149753
|
+
/*multiLine*/
|
|
149608
149754
|
true
|
|
149609
149755
|
);
|
|
149610
149756
|
setSnippetElement(emptyStmt, { kind: 0 /* TabStop */, order: 0 });
|
|
149611
149757
|
} else {
|
|
149612
149758
|
body = factory.createBlock(
|
|
149613
149759
|
[],
|
|
149614
|
-
/*
|
|
149760
|
+
/*multiLine*/
|
|
149615
149761
|
true
|
|
149616
149762
|
);
|
|
149617
149763
|
}
|
|
@@ -150595,7 +150741,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
150595
150741
|
if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) {
|
|
150596
150742
|
addPropertySymbol(
|
|
150597
150743
|
symbol,
|
|
150598
|
-
/*
|
|
150744
|
+
/*insertAwait*/
|
|
150599
150745
|
false,
|
|
150600
150746
|
insertQuestionDot
|
|
150601
150747
|
);
|
|
@@ -150611,7 +150757,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
150611
150757
|
if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, promiseType, symbol)) {
|
|
150612
150758
|
addPropertySymbol(
|
|
150613
150759
|
symbol,
|
|
150614
|
-
/*
|
|
150760
|
+
/*insertAwait*/
|
|
150615
150761
|
true,
|
|
150616
150762
|
insertQuestionDot
|
|
150617
150763
|
);
|
|
@@ -151110,7 +151256,7 @@ function getCompletionData(program, log, sourceFile, compilerOptions, position,
|
|
|
151110
151256
|
objectLikeContainer,
|
|
151111
151257
|
/*isSuper*/
|
|
151112
151258
|
false,
|
|
151113
|
-
/*
|
|
151259
|
+
/*isWrite*/
|
|
151114
151260
|
false,
|
|
151115
151261
|
typeForObject,
|
|
151116
151262
|
propertySymbol
|
|
@@ -152148,7 +152294,7 @@ function convertStringLiteralCompletions(completion, contextToken, sourceFile, h
|
|
|
152148
152294
|
options,
|
|
152149
152295
|
/*formatContext*/
|
|
152150
152296
|
void 0,
|
|
152151
|
-
/*isTypeOnlyLocation
|
|
152297
|
+
/*isTypeOnlyLocation*/
|
|
152152
152298
|
void 0,
|
|
152153
152299
|
/*propertyAccessToConvert*/
|
|
152154
152300
|
void 0,
|
|
@@ -152413,7 +152559,7 @@ function getStringLiteralCompletionsFromModuleNamesWorker(sourceFile, node, comp
|
|
|
152413
152559
|
const scriptPath = sourceFile.path;
|
|
152414
152560
|
const scriptDirectory = getDirectoryPath(scriptPath);
|
|
152415
152561
|
const extensionOptions = getExtensionOptions(compilerOptions, 1 /* ModuleSpecifier */, sourceFile, typeChecker, preferences, mode);
|
|
152416
|
-
return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, compilerOptions, host, extensionOptions, typeChecker);
|
|
152562
|
+
return isPathRelativeToScript(literalValue) || !compilerOptions.baseUrl && !compilerOptions.paths && (isRootedDiskPath(literalValue) || isUrl(literalValue)) ? getCompletionEntriesForRelativeModules(literalValue, scriptDirectory, compilerOptions, host, scriptPath, extensionOptions) : getCompletionEntriesForNonRelativeModules(literalValue, scriptDirectory, mode, compilerOptions, host, extensionOptions, typeChecker);
|
|
152417
152563
|
}
|
|
152418
152564
|
function getExtensionOptions(compilerOptions, referenceKind, importingSourceFile, typeChecker, preferences, resolutionMode) {
|
|
152419
152565
|
return {
|
|
@@ -152616,8 +152762,7 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c
|
|
|
152616
152762
|
const result = createNameAndKindSet();
|
|
152617
152763
|
const moduleResolution = getEmitModuleResolutionKind(compilerOptions);
|
|
152618
152764
|
if (baseUrl) {
|
|
152619
|
-
const
|
|
152620
|
-
const absolute = normalizePath(combinePaths(projectDir, baseUrl));
|
|
152765
|
+
const absolute = normalizePath(combinePaths(host.getCurrentDirectory(), baseUrl));
|
|
152621
152766
|
getCompletionEntriesForDirectoryFragment(
|
|
152622
152767
|
fragment,
|
|
152623
152768
|
absolute,
|
|
@@ -152629,9 +152774,10 @@ function getCompletionEntriesForNonRelativeModules(fragment, scriptPath, mode, c
|
|
|
152629
152774
|
void 0,
|
|
152630
152775
|
result
|
|
152631
152776
|
);
|
|
152632
|
-
|
|
152633
|
-
|
|
152634
|
-
|
|
152777
|
+
}
|
|
152778
|
+
if (paths) {
|
|
152779
|
+
const absolute = getPathsBasePath(compilerOptions, host);
|
|
152780
|
+
addCompletionEntriesFromPaths(result, fragment, absolute, extensionOptions, host, paths);
|
|
152635
152781
|
}
|
|
152636
152782
|
const fragmentDirectory = getFragmentDirectory(fragment);
|
|
152637
152783
|
for (const ambientName of getAmbientModuleCompletions(fragment, fragmentDirectory, typeChecker)) {
|
|
@@ -153058,7 +153204,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
|
|
|
153058
153204
|
} else if (direct.exportClause.kind === 278 /* NamespaceExport */) {
|
|
153059
153205
|
addIndirectUser(
|
|
153060
153206
|
getSourceFileLikeForImportDeclaration(direct),
|
|
153061
|
-
|
|
153207
|
+
/*addTransitiveDependencies*/
|
|
153062
153208
|
true
|
|
153063
153209
|
);
|
|
153064
153210
|
} else {
|
|
@@ -153069,7 +153215,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
|
|
|
153069
153215
|
if (!isAvailableThroughGlobal && direct.isTypeOf && !direct.qualifier && isExported2(direct)) {
|
|
153070
153216
|
addIndirectUser(
|
|
153071
153217
|
direct.getSourceFile(),
|
|
153072
|
-
|
|
153218
|
+
/*addTransitiveDependencies*/
|
|
153073
153219
|
true
|
|
153074
153220
|
);
|
|
153075
153221
|
}
|
|
@@ -153088,7 +153234,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
|
|
|
153088
153234
|
/** addTransitiveDependencies */
|
|
153089
153235
|
!!isExported2(
|
|
153090
153236
|
importCall,
|
|
153091
|
-
|
|
153237
|
+
/*stopAtAmbientModule*/
|
|
153092
153238
|
true
|
|
153093
153239
|
)
|
|
153094
153240
|
);
|
|
@@ -153110,7 +153256,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
|
|
|
153110
153256
|
if (isReExport || findNamespaceReExports(sourceFileLike, name, checker)) {
|
|
153111
153257
|
addIndirectUser(
|
|
153112
153258
|
sourceFileLike,
|
|
153113
|
-
|
|
153259
|
+
/*addTransitiveDependencies*/
|
|
153114
153260
|
true
|
|
153115
153261
|
);
|
|
153116
153262
|
} else {
|
|
@@ -153136,7 +153282,7 @@ function getImportersForExport(sourceFiles, sourceFilesSet, allDirectImports, {
|
|
|
153136
153282
|
if (!isImportTypeNode(directImport)) {
|
|
153137
153283
|
addIndirectUser(
|
|
153138
153284
|
getSourceFileLikeForImportDeclaration(directImport),
|
|
153139
|
-
|
|
153285
|
+
/*addTransitiveDependencies*/
|
|
153140
153286
|
true
|
|
153141
153287
|
);
|
|
153142
153288
|
}
|
|
@@ -153267,10 +153413,10 @@ function findModuleReferences(program, sourceFiles, searchModuleSymbol) {
|
|
|
153267
153413
|
}
|
|
153268
153414
|
}
|
|
153269
153415
|
}
|
|
153270
|
-
forEachImport(referencingFile, (
|
|
153416
|
+
forEachImport(referencingFile, (importDecl, moduleSpecifier) => {
|
|
153271
153417
|
const moduleSymbol = checker.getSymbolAtLocation(moduleSpecifier);
|
|
153272
153418
|
if (moduleSymbol === searchModuleSymbol) {
|
|
153273
|
-
refs.push({ kind: "import", literal: moduleSpecifier });
|
|
153419
|
+
refs.push(nodeIsSynthesized(importDecl) ? { kind: "implicit", literal: moduleSpecifier, referencingFile } : { kind: "import", literal: moduleSpecifier });
|
|
153274
153420
|
}
|
|
153275
153421
|
});
|
|
153276
153422
|
}
|
|
@@ -154170,6 +154316,12 @@ var Core;
|
|
|
154170
154316
|
}
|
|
154171
154317
|
}
|
|
154172
154318
|
return nodeEntry(reference.literal);
|
|
154319
|
+
} else if (reference.kind === "implicit") {
|
|
154320
|
+
const range = reference.literal.text !== externalHelpersModuleNameText && forEachChildRecursively(
|
|
154321
|
+
reference.referencingFile,
|
|
154322
|
+
(n) => !(n.transformFlags & 2 /* ContainsJsx */) ? "skip" : isJsxElement(n) || isJsxSelfClosingElement(n) || isJsxFragment(n) ? n : void 0
|
|
154323
|
+
) || reference.referencingFile.statements[0] || reference.referencingFile;
|
|
154324
|
+
return nodeEntry(range);
|
|
154173
154325
|
} else {
|
|
154174
154326
|
return {
|
|
154175
154327
|
kind: 0 /* Span */,
|
|
@@ -155063,7 +155215,7 @@ var Core;
|
|
|
155063
155215
|
function getReferencesForThisKeyword(thisOrSuperKeyword, sourceFiles, cancellationToken) {
|
|
155064
155216
|
let searchSpaceNode = getThisContainer(
|
|
155065
155217
|
thisOrSuperKeyword,
|
|
155066
|
-
/*
|
|
155218
|
+
/*includeArrowFunctions*/
|
|
155067
155219
|
false,
|
|
155068
155220
|
/*includeClassComputedPropertyName*/
|
|
155069
155221
|
false
|
|
@@ -155103,7 +155255,7 @@ var Core;
|
|
|
155103
155255
|
}
|
|
155104
155256
|
const container = getThisContainer(
|
|
155105
155257
|
node,
|
|
155106
|
-
/*
|
|
155258
|
+
/*includeArrowFunctions*/
|
|
155107
155259
|
false,
|
|
155108
155260
|
/*includeClassComputedPropertyName*/
|
|
155109
155261
|
false
|
|
@@ -157768,7 +157920,7 @@ function changeDefaultToNamedImport(importingSourceFile, ref, changes, exportNam
|
|
|
157768
157920
|
changes.deleteRange(importingSourceFile, { pos: ref.getStart(importingSourceFile), end: namedBindings.getStart(importingSourceFile) });
|
|
157769
157921
|
const quotePreference = isStringLiteral(clause.parent.moduleSpecifier) ? quotePreferenceFromString(clause.parent.moduleSpecifier, importingSourceFile) : 1 /* Double */;
|
|
157770
157922
|
const newImport = makeImport(
|
|
157771
|
-
/*
|
|
157923
|
+
/*defaultImport*/
|
|
157772
157924
|
void 0,
|
|
157773
157925
|
[makeImportSpecifier2(exportName, ref.text)],
|
|
157774
157926
|
clause.parent.moduleSpecifier,
|
|
@@ -158191,7 +158343,7 @@ function collectTypeParameters(checker, selection, enclosingNode, file) {
|
|
|
158191
158343
|
typeName.text,
|
|
158192
158344
|
typeName,
|
|
158193
158345
|
262144 /* TypeParameter */,
|
|
158194
|
-
/*
|
|
158346
|
+
/*excludeGlobals*/
|
|
158195
158347
|
true
|
|
158196
158348
|
);
|
|
158197
158349
|
for (const decl of (symbol == null ? void 0 : symbol.declarations) || emptyArray) {
|
|
@@ -158222,7 +158374,7 @@ function collectTypeParameters(checker, selection, enclosingNode, file) {
|
|
|
158222
158374
|
node.exprName.text,
|
|
158223
158375
|
node.exprName,
|
|
158224
158376
|
111551 /* Value */,
|
|
158225
|
-
/*
|
|
158377
|
+
/*excludeGlobals*/
|
|
158226
158378
|
false
|
|
158227
158379
|
);
|
|
158228
158380
|
if ((symbol == null ? void 0 : symbol.valueDeclaration) && rangeContainsSkipTrivia(enclosingNode, symbol.valueDeclaration, file) && !rangeContainsSkipTrivia(selection, symbol.valueDeclaration, file)) {
|
|
@@ -158243,7 +158395,7 @@ function collectTypeParameters(checker, selection, enclosingNode, file) {
|
|
|
158243
158395
|
function doTypeAliasChange(changes, file, name, info) {
|
|
158244
158396
|
const { enclosingNode, selection, typeParameters } = info;
|
|
158245
158397
|
const newTypeNode = factory.createTypeAliasDeclaration(
|
|
158246
|
-
/*
|
|
158398
|
+
/*modifiers*/
|
|
158247
158399
|
void 0,
|
|
158248
158400
|
name,
|
|
158249
158401
|
typeParameters.map((id) => factory.updateTypeParameterDeclaration(
|
|
@@ -158251,7 +158403,7 @@ function doTypeAliasChange(changes, file, name, info) {
|
|
|
158251
158403
|
id.modifiers,
|
|
158252
158404
|
id.name,
|
|
158253
158405
|
id.constraint,
|
|
158254
|
-
/*
|
|
158406
|
+
/*defaultType*/
|
|
158255
158407
|
void 0
|
|
158256
158408
|
)),
|
|
158257
158409
|
selection
|
|
@@ -158260,12 +158412,12 @@ function doTypeAliasChange(changes, file, name, info) {
|
|
|
158260
158412
|
file,
|
|
158261
158413
|
enclosingNode,
|
|
158262
158414
|
ignoreSourceNewlines(newTypeNode),
|
|
158263
|
-
/*
|
|
158415
|
+
/*blankLineBetween*/
|
|
158264
158416
|
true
|
|
158265
158417
|
);
|
|
158266
158418
|
changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(
|
|
158267
158419
|
id.name,
|
|
158268
|
-
/*
|
|
158420
|
+
/*typeArguments*/
|
|
158269
158421
|
void 0
|
|
158270
158422
|
))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });
|
|
158271
158423
|
}
|
|
@@ -158273,11 +158425,11 @@ function doInterfaceChange(changes, file, name, info) {
|
|
|
158273
158425
|
var _a2;
|
|
158274
158426
|
const { enclosingNode, selection, typeParameters, typeElements } = info;
|
|
158275
158427
|
const newTypeNode = factory.createInterfaceDeclaration(
|
|
158276
|
-
/*
|
|
158428
|
+
/*modifiers*/
|
|
158277
158429
|
void 0,
|
|
158278
158430
|
name,
|
|
158279
158431
|
typeParameters,
|
|
158280
|
-
/*
|
|
158432
|
+
/*heritageClauses*/
|
|
158281
158433
|
void 0,
|
|
158282
158434
|
typeElements
|
|
158283
158435
|
);
|
|
@@ -158286,12 +158438,12 @@ function doInterfaceChange(changes, file, name, info) {
|
|
|
158286
158438
|
file,
|
|
158287
158439
|
enclosingNode,
|
|
158288
158440
|
ignoreSourceNewlines(newTypeNode),
|
|
158289
|
-
/*
|
|
158441
|
+
/*blankLineBetween*/
|
|
158290
158442
|
true
|
|
158291
158443
|
);
|
|
158292
158444
|
changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(
|
|
158293
158445
|
id.name,
|
|
158294
|
-
/*
|
|
158446
|
+
/*typeArguments*/
|
|
158295
158447
|
void 0
|
|
158296
158448
|
))), { leadingTriviaOption: ts_textChanges_exports.LeadingTriviaOption.Exclude, trailingTriviaOption: ts_textChanges_exports.TrailingTriviaOption.ExcludeWhitespace });
|
|
158297
158449
|
}
|
|
@@ -158320,7 +158472,7 @@ function doTypedefChange(changes, context, file, name, info) {
|
|
|
158320
158472
|
templates.push(template);
|
|
158321
158473
|
});
|
|
158322
158474
|
const jsDoc = factory.createJSDocComment(
|
|
158323
|
-
/*
|
|
158475
|
+
/*comment*/
|
|
158324
158476
|
void 0,
|
|
158325
158477
|
factory.createNodeArray(concatenate(templates, [node]))
|
|
158326
158478
|
);
|
|
@@ -158335,13 +158487,13 @@ function doTypedefChange(changes, context, file, name, info) {
|
|
|
158335
158487
|
file,
|
|
158336
158488
|
enclosingNode,
|
|
158337
158489
|
jsDoc,
|
|
158338
|
-
/*
|
|
158490
|
+
/*blankLineBetween*/
|
|
158339
158491
|
true
|
|
158340
158492
|
);
|
|
158341
158493
|
}
|
|
158342
158494
|
changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map((id) => factory.createTypeReferenceNode(
|
|
158343
158495
|
id.name,
|
|
158344
|
-
/*
|
|
158496
|
+
/*typeArguments*/
|
|
158345
158497
|
void 0
|
|
158346
158498
|
))));
|
|
158347
158499
|
}
|
|
@@ -158457,7 +158609,7 @@ function isPureImport(node) {
|
|
|
158457
158609
|
case 241 /* VariableStatement */:
|
|
158458
158610
|
return node.declarationList.declarations.every((d) => !!d.initializer && isRequireCall(
|
|
158459
158611
|
d.initializer,
|
|
158460
|
-
/*
|
|
158612
|
+
/*requireStringLiteralLikeArgument*/
|
|
158461
158613
|
true
|
|
158462
158614
|
));
|
|
158463
158615
|
default:
|
|
@@ -158647,7 +158799,7 @@ function forEachImportInStatement(statement, cb) {
|
|
|
158647
158799
|
for (const decl of statement.declarationList.declarations) {
|
|
158648
158800
|
if (decl.initializer && isRequireCall(
|
|
158649
158801
|
decl.initializer,
|
|
158650
|
-
/*
|
|
158802
|
+
/*requireStringLiteralLikeArgument*/
|
|
158651
158803
|
true
|
|
158652
158804
|
)) {
|
|
158653
158805
|
cb(decl);
|
|
@@ -158939,7 +159091,7 @@ function isInImport(decl) {
|
|
|
158939
159091
|
function isVariableDeclarationInImport(decl) {
|
|
158940
159092
|
return isSourceFile(decl.parent.parent.parent) && !!decl.initializer && isRequireCall(
|
|
158941
159093
|
decl.initializer,
|
|
158942
|
-
/*
|
|
159094
|
+
/*requireStringLiteralLikeArgument*/
|
|
158943
159095
|
true
|
|
158944
159096
|
);
|
|
158945
159097
|
}
|
|
@@ -159446,7 +159598,7 @@ function getRefactorEditsToRemoveFunctionBraces(context, actionName2) {
|
|
|
159446
159598
|
const returnStatement2 = factory.createReturnStatement(expression);
|
|
159447
159599
|
body = factory.createBlock(
|
|
159448
159600
|
[returnStatement2],
|
|
159449
|
-
/*
|
|
159601
|
+
/*multiLine*/
|
|
159450
159602
|
true
|
|
159451
159603
|
);
|
|
159452
159604
|
copyLeadingComments(
|
|
@@ -159454,7 +159606,7 @@ function getRefactorEditsToRemoveFunctionBraces(context, actionName2) {
|
|
|
159454
159606
|
returnStatement2,
|
|
159455
159607
|
file,
|
|
159456
159608
|
3 /* MultiLineCommentTrivia */,
|
|
159457
|
-
/*
|
|
159609
|
+
/*hasTrailingNewLine*/
|
|
159458
159610
|
true
|
|
159459
159611
|
);
|
|
159460
159612
|
} else if (actionName2 === removeBracesAction.name && returnStatement) {
|
|
@@ -159465,7 +159617,7 @@ function getRefactorEditsToRemoveFunctionBraces(context, actionName2) {
|
|
|
159465
159617
|
body,
|
|
159466
159618
|
file,
|
|
159467
159619
|
3 /* MultiLineCommentTrivia */,
|
|
159468
|
-
/*
|
|
159620
|
+
/*hasTrailingNewLine*/
|
|
159469
159621
|
false
|
|
159470
159622
|
);
|
|
159471
159623
|
copyLeadingComments(
|
|
@@ -159473,7 +159625,7 @@ function getRefactorEditsToRemoveFunctionBraces(context, actionName2) {
|
|
|
159473
159625
|
body,
|
|
159474
159626
|
file,
|
|
159475
159627
|
3 /* MultiLineCommentTrivia */,
|
|
159476
|
-
/*
|
|
159628
|
+
/*hasTrailingNewLine*/
|
|
159477
159629
|
false
|
|
159478
159630
|
);
|
|
159479
159631
|
copyTrailingComments(
|
|
@@ -159481,7 +159633,7 @@ function getRefactorEditsToRemoveFunctionBraces(context, actionName2) {
|
|
|
159481
159633
|
body,
|
|
159482
159634
|
file,
|
|
159483
159635
|
3 /* MultiLineCommentTrivia */,
|
|
159484
|
-
/*
|
|
159636
|
+
/*hasTrailingNewLine*/
|
|
159485
159637
|
false
|
|
159486
159638
|
);
|
|
159487
159639
|
} else {
|
|
@@ -159666,14 +159818,14 @@ function convertToBlock(body) {
|
|
|
159666
159818
|
body,
|
|
159667
159819
|
returnStatement,
|
|
159668
159820
|
file,
|
|
159669
|
-
/*
|
|
159821
|
+
/*commentKind*/
|
|
159670
159822
|
void 0,
|
|
159671
|
-
/*
|
|
159823
|
+
/*hasTrailingNewLine*/
|
|
159672
159824
|
true
|
|
159673
159825
|
);
|
|
159674
159826
|
return factory.createBlock(
|
|
159675
159827
|
[returnStatement],
|
|
159676
|
-
/*
|
|
159828
|
+
/*multiLine*/
|
|
159677
159829
|
true
|
|
159678
159830
|
);
|
|
159679
159831
|
} else {
|
|
@@ -159696,7 +159848,7 @@ function getEditInfoForConvertToAnonymousFunction(context, func) {
|
|
|
159696
159848
|
const newNode = factory.createFunctionExpression(
|
|
159697
159849
|
func.modifiers,
|
|
159698
159850
|
func.asteriskToken,
|
|
159699
|
-
/*
|
|
159851
|
+
/*name*/
|
|
159700
159852
|
void 0,
|
|
159701
159853
|
func.typeParameters,
|
|
159702
159854
|
func.parameters,
|
|
@@ -160403,7 +160555,7 @@ var copyTrailingOperatorComments = (operators, file) => (index, targetNode) => {
|
|
|
160403
160555
|
targetNode,
|
|
160404
160556
|
file,
|
|
160405
160557
|
3 /* MultiLineCommentTrivia */,
|
|
160406
|
-
/*
|
|
160558
|
+
/*hasTrailingNewLine*/
|
|
160407
160559
|
false
|
|
160408
160560
|
);
|
|
160409
160561
|
}
|
|
@@ -160416,7 +160568,7 @@ var copyCommentFromMultiNode = (nodes, file, copyOperatorComments) => (indexes,
|
|
|
160416
160568
|
targetNode,
|
|
160417
160569
|
file,
|
|
160418
160570
|
3 /* MultiLineCommentTrivia */,
|
|
160419
|
-
/*
|
|
160571
|
+
/*hasTrailingNewLine*/
|
|
160420
160572
|
false
|
|
160421
160573
|
);
|
|
160422
160574
|
copyOperatorComments(index, targetNode);
|
|
@@ -160491,7 +160643,7 @@ function copyExpressionComments(node) {
|
|
|
160491
160643
|
node.expression,
|
|
160492
160644
|
file,
|
|
160493
160645
|
3 /* MultiLineCommentTrivia */,
|
|
160494
|
-
/*
|
|
160646
|
+
/*hasTrailingNewLine*/
|
|
160495
160647
|
false
|
|
160496
160648
|
);
|
|
160497
160649
|
copyTrailingAsLeadingComments(
|
|
@@ -160499,7 +160651,7 @@ function copyExpressionComments(node) {
|
|
|
160499
160651
|
node.expression,
|
|
160500
160652
|
file,
|
|
160501
160653
|
3 /* MultiLineCommentTrivia */,
|
|
160502
|
-
/*
|
|
160654
|
+
/*hasTrailingNewLine*/
|
|
160503
160655
|
false
|
|
160504
160656
|
);
|
|
160505
160657
|
}
|
|
@@ -161059,7 +161211,7 @@ function getRangeToExtract2(sourceFile, span, invoked = true) {
|
|
|
161059
161211
|
if (rangeFacts & 8 /* UsesThis */) {
|
|
161060
161212
|
const container = getThisContainer(
|
|
161061
161213
|
nodeToCheck,
|
|
161062
|
-
|
|
161214
|
+
/*includeArrowFunctions*/
|
|
161063
161215
|
false,
|
|
161064
161216
|
/*includeClassComputedPropertyName*/
|
|
161065
161217
|
false
|
|
@@ -161630,7 +161782,7 @@ function extractFunctionInScope(node, scope, { usages: usagesInScope, typeParame
|
|
|
161630
161782
|
edits,
|
|
161631
161783
|
renameFilename,
|
|
161632
161784
|
functionNameText,
|
|
161633
|
-
/*
|
|
161785
|
+
/*preferLastLocation*/
|
|
161634
161786
|
false
|
|
161635
161787
|
);
|
|
161636
161788
|
return { renameFilename, renameLocation, edits };
|
|
@@ -161673,7 +161825,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont
|
|
|
161673
161825
|
const newVariable = factory.createPropertyDeclaration(
|
|
161674
161826
|
modifiers,
|
|
161675
161827
|
localNameText,
|
|
161676
|
-
/*
|
|
161828
|
+
/*questionOrExclamationToken*/
|
|
161677
161829
|
void 0,
|
|
161678
161830
|
variableType,
|
|
161679
161831
|
initializer
|
|
@@ -161763,7 +161915,7 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont
|
|
|
161763
161915
|
edits,
|
|
161764
161916
|
renameFilename,
|
|
161765
161917
|
localNameText,
|
|
161766
|
-
/*
|
|
161918
|
+
/*preferLastLocation*/
|
|
161767
161919
|
true
|
|
161768
161920
|
);
|
|
161769
161921
|
return { renameFilename, renameLocation, edits };
|
|
@@ -161817,12 +161969,12 @@ function extractConstantInScope(node, scope, { substitutions }, rangeFacts, cont
|
|
|
161817
161969
|
if (!firstParameter || isIdentifier(firstParameter.name) && firstParameter.name.escapedText !== "this") {
|
|
161818
161970
|
const thisType = checker.getTypeOfSymbolAtLocation(functionSignature.thisParameter, node);
|
|
161819
161971
|
parameters.splice(0, 0, factory.createParameterDeclaration(
|
|
161820
|
-
/*
|
|
161972
|
+
/*modifiers*/
|
|
161821
161973
|
void 0,
|
|
161822
|
-
/*
|
|
161974
|
+
/*dotDotDotToken*/
|
|
161823
161975
|
void 0,
|
|
161824
161976
|
"this",
|
|
161825
|
-
/*
|
|
161977
|
+
/*questionToken*/
|
|
161826
161978
|
void 0,
|
|
161827
161979
|
checker.typeToTypeNode(thisType, scope, 1 /* NoTruncation */)
|
|
161828
161980
|
));
|
|
@@ -161884,7 +162036,7 @@ function transformFunctionBody(body, exposedVariableDeclarations, writes, substi
|
|
|
161884
162036
|
if (isBlock(body) && !hasWritesOrVariableDeclarations && substitutions.size === 0) {
|
|
161885
162037
|
return { body: factory.createBlock(
|
|
161886
162038
|
body.statements,
|
|
161887
|
-
/*
|
|
162039
|
+
/*multiLine*/
|
|
161888
162040
|
true
|
|
161889
162041
|
), returnValueProperty: void 0 };
|
|
161890
162042
|
}
|
|
@@ -165291,7 +165443,7 @@ var deleteDeclaration;
|
|
|
165291
165443
|
const end = skipTrivia(
|
|
165292
165444
|
sourceFile.text,
|
|
165293
165445
|
nextToken.end,
|
|
165294
|
-
/*
|
|
165446
|
+
/*stopAfterLineBreak*/
|
|
165295
165447
|
false,
|
|
165296
165448
|
/*stopAtComments*/
|
|
165297
165449
|
true
|
|
@@ -165636,7 +165788,7 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) {
|
|
|
165636
165788
|
if (token === 19 /* CloseBraceToken */) {
|
|
165637
165789
|
lastScanAction = 3 /* RescanTemplateToken */;
|
|
165638
165790
|
return scanner2.reScanTemplateToken(
|
|
165639
|
-
/*
|
|
165791
|
+
/*isTaggedTemplate*/
|
|
165640
165792
|
false
|
|
165641
165793
|
);
|
|
165642
165794
|
}
|
|
@@ -165647,7 +165799,7 @@ function getFormattingScanner(text, languageVariant, startPos, endPos, cb) {
|
|
|
165647
165799
|
case 5 /* RescanJsxText */:
|
|
165648
165800
|
lastScanAction = 5 /* RescanJsxText */;
|
|
165649
165801
|
return scanner2.reScanJsxToken(
|
|
165650
|
-
/*
|
|
165802
|
+
/*allowMultilineJsxText*/
|
|
165651
165803
|
false
|
|
165652
165804
|
);
|
|
165653
165805
|
case 6 /* RescanJsxAttributeValue */:
|
|
@@ -171302,7 +171454,7 @@ var ScriptInfo = class {
|
|
|
171302
171454
|
this,
|
|
171303
171455
|
/*fileExists*/
|
|
171304
171456
|
false,
|
|
171305
|
-
/*
|
|
171457
|
+
/*detachFromProject*/
|
|
171306
171458
|
false
|
|
171307
171459
|
);
|
|
171308
171460
|
p.onFileAddedOrRemoved(this.isSymlink());
|
|
@@ -173368,7 +173520,7 @@ var _AutoImportProviderProject = class extends Project3 {
|
|
|
173368
173520
|
packageJson,
|
|
173369
173521
|
program,
|
|
173370
173522
|
symlinkCache,
|
|
173371
|
-
/*
|
|
173523
|
+
/*resolveJs*/
|
|
173372
173524
|
true
|
|
173373
173525
|
);
|
|
173374
173526
|
rootNames = concatenate(rootNames, entrypoints);
|
|
@@ -179445,7 +179597,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
179445
179597
|
tags: this.mapJSDocTagInfo(
|
|
179446
179598
|
quickInfo.tags,
|
|
179447
179599
|
project,
|
|
179448
|
-
/*
|
|
179600
|
+
/*richResponse*/
|
|
179449
179601
|
false
|
|
179450
179602
|
)
|
|
179451
179603
|
};
|
|
@@ -179842,7 +179994,7 @@ Project '${project.projectName}' (${ProjectKind[project.projectKind]}) ${counter
|
|
|
179842
179994
|
const projectItems = project.getLanguageService().getNavigateToItems(
|
|
179843
179995
|
searchValue,
|
|
179844
179996
|
maxResultCount,
|
|
179845
|
-
/*
|
|
179997
|
+
/*fileName*/
|
|
179846
179998
|
void 0,
|
|
179847
179999
|
/*excludeDts*/
|
|
179848
180000
|
project.isNonTsProject()
|