@typescript-deploys/pr-build 5.1.0-pr-49863-41 → 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/lib.es2015.core.d.ts +2 -2
- package/lib/lib.es2020.bigint.d.ts +4 -4
- package/lib/lib.es5.d.ts +18 -18
- package/lib/tsc.js +420 -307
- package/lib/tsserver.js +557 -438
- package/lib/tsserverlibrary.d.ts +0 -1
- package/lib/tsserverlibrary.js +557 -438
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +553 -434
- package/lib/typingsInstaller.js +19 -29
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.1";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20230324`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -7313,7 +7313,6 @@ var Diagnostics = {
|
|
|
7313
7313
|
Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types: diag(6718, 3 /* Message */, "Specify_emit_Slashchecking_behavior_for_imports_that_are_only_used_for_types_6718", "Specify emit/checking behavior for imports that are only used for types."),
|
|
7314
7314
|
Default_catch_clause_variables_as_unknown_instead_of_any: diag(6803, 3 /* Message */, "Default_catch_clause_variables_as_unknown_instead_of_any_6803", "Default catch clause variables as 'unknown' instead of 'any'."),
|
|
7315
7315
|
Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_in_the_output_file_s_format_based_on_the_module_setting: diag(6804, 3 /* Message */, "Do_not_transform_or_elide_any_imports_or_exports_not_marked_as_type_only_ensuring_they_are_written_i_6804", "Do not transform or elide any imports or exports not marked as type-only, ensuring they are written in the output file's format based on the 'module' setting."),
|
|
7316
|
-
Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any_for_instance_checks: diag(6805, 3 /* Message */, "Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any_for_instance_checks_6805", "Default type arguments to parameter constraint or 'unknown' instead of 'any' for instance checks."),
|
|
7317
7316
|
one_of_Colon: diag(6900, 3 /* Message */, "one_of_Colon_6900", "one of:"),
|
|
7318
7317
|
one_or_more_Colon: diag(6901, 3 /* Message */, "one_or_more_Colon_6901", "one or more:"),
|
|
7319
7318
|
type_Colon: diag(6902, 3 /* Message */, "type_Colon_6902", "type:"),
|
|
@@ -9049,7 +9048,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9049
9048
|
return token = 10 /* StringLiteral */;
|
|
9050
9049
|
case 96 /* backtick */:
|
|
9051
9050
|
return token = scanTemplateAndSetTokenValue(
|
|
9052
|
-
/*
|
|
9051
|
+
/*isTaggedTemplate*/
|
|
9053
9052
|
false
|
|
9054
9053
|
);
|
|
9055
9054
|
case 37 /* percent */:
|
|
@@ -9552,7 +9551,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9552
9551
|
function reScanTemplateHeadOrNoSubstitutionTemplate() {
|
|
9553
9552
|
pos = tokenStart;
|
|
9554
9553
|
return token = scanTemplateAndSetTokenValue(
|
|
9555
|
-
/*
|
|
9554
|
+
/*isTaggedTemplate*/
|
|
9556
9555
|
true
|
|
9557
9556
|
);
|
|
9558
9557
|
}
|
|
@@ -12325,7 +12324,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
|
12325
12324
|
true,
|
|
12326
12325
|
sourceFile.languageVariant,
|
|
12327
12326
|
sourceFile.text,
|
|
12328
|
-
/*onError
|
|
12327
|
+
/*onError*/
|
|
12329
12328
|
void 0,
|
|
12330
12329
|
pos
|
|
12331
12330
|
);
|
|
@@ -12340,7 +12339,7 @@ function scanTokenAtPosition(sourceFile, pos) {
|
|
|
12340
12339
|
true,
|
|
12341
12340
|
sourceFile.languageVariant,
|
|
12342
12341
|
sourceFile.text,
|
|
12343
|
-
/*onError
|
|
12342
|
+
/*onError*/
|
|
12344
12343
|
void 0,
|
|
12345
12344
|
pos
|
|
12346
12345
|
);
|
|
@@ -12552,9 +12551,8 @@ function isPartOfTypeNode(node) {
|
|
|
12552
12551
|
return node === parent.type;
|
|
12553
12552
|
case 211 /* CallExpression */:
|
|
12554
12553
|
case 212 /* NewExpression */:
|
|
12555
|
-
return contains(parent.typeArguments, node);
|
|
12556
12554
|
case 213 /* TaggedTemplateExpression */:
|
|
12557
|
-
return
|
|
12555
|
+
return contains(parent.typeArguments, node);
|
|
12558
12556
|
}
|
|
12559
12557
|
}
|
|
12560
12558
|
}
|
|
@@ -13311,7 +13309,7 @@ function isSameEntityName(name, initializer) {
|
|
|
13311
13309
|
function getRightMostAssignedExpression(node) {
|
|
13312
13310
|
while (isAssignmentExpression(
|
|
13313
13311
|
node,
|
|
13314
|
-
/*
|
|
13312
|
+
/*excludeCompoundAssignment*/
|
|
13315
13313
|
true
|
|
13316
13314
|
)) {
|
|
13317
13315
|
node = node.right;
|
|
@@ -17431,7 +17429,7 @@ function createParenthesizerRules(factory2) {
|
|
|
17431
17429
|
if (!needsParens) {
|
|
17432
17430
|
switch (getLeftmostExpression(
|
|
17433
17431
|
check,
|
|
17434
|
-
/*
|
|
17432
|
+
/*stopAtCallExpressions*/
|
|
17435
17433
|
false
|
|
17436
17434
|
).kind) {
|
|
17437
17435
|
case 229 /* ClassExpression */:
|
|
@@ -23163,7 +23161,7 @@ function createEmitHelperFactory(context) {
|
|
|
23163
23161
|
context.requestEmitHelper(classPrivateFieldInHelper);
|
|
23164
23162
|
return factory2.createCallExpression(
|
|
23165
23163
|
getUnscopedHelperName("__classPrivateFieldIn"),
|
|
23166
|
-
/*
|
|
23164
|
+
/*typeArguments*/
|
|
23167
23165
|
void 0,
|
|
23168
23166
|
[state, receiver]
|
|
23169
23167
|
);
|
|
@@ -25228,7 +25226,7 @@ function createAccessorPropertySetRedirector(factory2, node, modifiers, name) {
|
|
|
25228
25226
|
[factory2.createParameterDeclaration(
|
|
25229
25227
|
/*modifiers*/
|
|
25230
25228
|
void 0,
|
|
25231
|
-
/*
|
|
25229
|
+
/*dotDotDotToken*/
|
|
25232
25230
|
void 0,
|
|
25233
25231
|
"value"
|
|
25234
25232
|
)],
|
|
@@ -26174,7 +26172,7 @@ var Parser;
|
|
|
26174
26172
|
fileName2,
|
|
26175
26173
|
2 /* ES2015 */,
|
|
26176
26174
|
6 /* JSON */,
|
|
26177
|
-
/*
|
|
26175
|
+
/*isDeclarationFile*/
|
|
26178
26176
|
false,
|
|
26179
26177
|
statements,
|
|
26180
26178
|
endOfFileToken,
|
|
@@ -27529,7 +27527,7 @@ var Parser;
|
|
|
27529
27527
|
entity,
|
|
27530
27528
|
parseRightSideOfDot(
|
|
27531
27529
|
allowReservedWords,
|
|
27532
|
-
/*
|
|
27530
|
+
/*allowPrivateIdentifiers*/
|
|
27533
27531
|
false
|
|
27534
27532
|
)
|
|
27535
27533
|
),
|
|
@@ -29466,7 +29464,7 @@ var Parser;
|
|
|
29466
29464
|
parseExpected(43 /* SlashToken */);
|
|
29467
29465
|
if (parseExpected(
|
|
29468
29466
|
31 /* GreaterThanToken */,
|
|
29469
|
-
/*
|
|
29467
|
+
/*diagnosticMessage*/
|
|
29470
29468
|
void 0,
|
|
29471
29469
|
/*shouldAdvance*/
|
|
29472
29470
|
false
|
|
@@ -29511,7 +29509,7 @@ var Parser;
|
|
|
29511
29509
|
} else {
|
|
29512
29510
|
if (parseExpected(
|
|
29513
29511
|
19 /* CloseBraceToken */,
|
|
29514
|
-
/*
|
|
29512
|
+
/*diagnosticMessage*/
|
|
29515
29513
|
void 0,
|
|
29516
29514
|
/*shouldAdvance*/
|
|
29517
29515
|
false
|
|
@@ -29564,7 +29562,7 @@ var Parser;
|
|
|
29564
29562
|
const tagName = parseJsxElementName();
|
|
29565
29563
|
if (parseExpected(
|
|
29566
29564
|
31 /* GreaterThanToken */,
|
|
29567
|
-
/*
|
|
29565
|
+
/*diagnosticMessage*/
|
|
29568
29566
|
void 0,
|
|
29569
29567
|
/*shouldAdvance*/
|
|
29570
29568
|
false
|
|
@@ -29844,7 +29842,7 @@ var Parser;
|
|
|
29844
29842
|
break;
|
|
29845
29843
|
case 15 /* TemplateHead */:
|
|
29846
29844
|
return parseTemplateExpression(
|
|
29847
|
-
/*
|
|
29845
|
+
/*isTaggedTemplate*/
|
|
29848
29846
|
false
|
|
29849
29847
|
);
|
|
29850
29848
|
case 80 /* PrivateIdentifier */:
|
|
@@ -31551,7 +31549,7 @@ var Parser;
|
|
|
31551
31549
|
"file.js",
|
|
31552
31550
|
content,
|
|
31553
31551
|
99 /* Latest */,
|
|
31554
|
-
/*
|
|
31552
|
+
/*syntaxCursor*/
|
|
31555
31553
|
void 0,
|
|
31556
31554
|
1 /* JS */
|
|
31557
31555
|
);
|
|
@@ -31594,7 +31592,7 @@ var Parser;
|
|
|
31594
31592
|
const hasBrace = parseOptional(18 /* OpenBraceToken */);
|
|
31595
31593
|
const p2 = getNodePos();
|
|
31596
31594
|
let entityName = parseEntityName(
|
|
31597
|
-
/*
|
|
31595
|
+
/*allowReservedWords*/
|
|
31598
31596
|
false
|
|
31599
31597
|
);
|
|
31600
31598
|
while (token() === 80 /* PrivateIdentifier */) {
|
|
@@ -31615,7 +31613,7 @@ var Parser;
|
|
|
31615
31613
|
"",
|
|
31616
31614
|
content,
|
|
31617
31615
|
99 /* Latest */,
|
|
31618
|
-
/*
|
|
31616
|
+
/*syntaxCursor*/
|
|
31619
31617
|
void 0,
|
|
31620
31618
|
1 /* JS */
|
|
31621
31619
|
);
|
|
@@ -33851,16 +33849,6 @@ var commandOptionsWithoutBuild = [
|
|
|
33851
33849
|
description: Diagnostics.Default_catch_clause_variables_as_unknown_instead_of_any,
|
|
33852
33850
|
defaultValueDescription: false
|
|
33853
33851
|
},
|
|
33854
|
-
{
|
|
33855
|
-
name: "strictInstanceOfTypeParameters",
|
|
33856
|
-
type: "boolean",
|
|
33857
|
-
affectsSemanticDiagnostics: true,
|
|
33858
|
-
affectsBuildInfo: true,
|
|
33859
|
-
strictFlag: true,
|
|
33860
|
-
category: Diagnostics.Type_Checking,
|
|
33861
|
-
description: Diagnostics.Default_type_arguments_to_parameter_constraint_or_unknown_instead_of_any_for_instance_checks,
|
|
33862
|
-
defaultValueDescription: false
|
|
33863
|
-
},
|
|
33864
33852
|
{
|
|
33865
33853
|
name: "alwaysStrict",
|
|
33866
33854
|
type: "boolean",
|
|
@@ -34079,6 +34067,7 @@ var commandOptionsWithoutBuild = [
|
|
|
34079
34067
|
name: "allowImportingTsExtensions",
|
|
34080
34068
|
type: "boolean",
|
|
34081
34069
|
affectsSemanticDiagnostics: true,
|
|
34070
|
+
affectsBuildInfo: true,
|
|
34082
34071
|
category: Diagnostics.Modules,
|
|
34083
34072
|
description: Diagnostics.Allow_imports_to_include_TypeScript_file_extensions_Requires_moduleResolution_bundler_and_either_noEmit_or_emitDeclarationOnly_to_be_set,
|
|
34084
34073
|
defaultValueDescription: false
|
|
@@ -37290,7 +37279,7 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
37290
37279
|
2 /* JavaScript */,
|
|
37291
37280
|
/*isConfigLookup*/
|
|
37292
37281
|
false,
|
|
37293
|
-
/*
|
|
37282
|
+
/*redirectedReference*/
|
|
37294
37283
|
void 0
|
|
37295
37284
|
);
|
|
37296
37285
|
}
|
|
@@ -37328,7 +37317,7 @@ function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, hos
|
|
|
37328
37317
|
}
|
|
37329
37318
|
function nodeNextJsonConfigResolver(moduleName, containingFile, host) {
|
|
37330
37319
|
return nodeModuleNameResolverWorker(
|
|
37331
|
-
|
|
37320
|
+
30 /* NodeNextDefault */,
|
|
37332
37321
|
moduleName,
|
|
37333
37322
|
getDirectoryPath(containingFile),
|
|
37334
37323
|
{ moduleResolution: 99 /* NodeNext */ },
|
|
@@ -41080,7 +41069,7 @@ function createBinder() {
|
|
|
41080
41069
|
parentSymbol,
|
|
41081
41070
|
node.left.expression,
|
|
41082
41071
|
isTopLevelNamespaceAssignment(node.left),
|
|
41083
|
-
/*
|
|
41072
|
+
/*isPrototypeProperty*/
|
|
41084
41073
|
false,
|
|
41085
41074
|
/*containerIsClass*/
|
|
41086
41075
|
false
|
|
@@ -41212,7 +41201,7 @@ function createBinder() {
|
|
|
41212
41201
|
function bindCallExpression(node) {
|
|
41213
41202
|
if (!file.commonJsModuleIndicator && isRequireCall(
|
|
41214
41203
|
node,
|
|
41215
|
-
/*
|
|
41204
|
+
/*requireStringLiteralLikeArgument*/
|
|
41216
41205
|
false
|
|
41217
41206
|
)) {
|
|
41218
41207
|
setCommonJsModuleIndicator(node);
|
|
@@ -42549,7 +42538,6 @@ function createTypeChecker(host) {
|
|
|
42549
42538
|
var noImplicitAny = getStrictOptionValue(compilerOptions, "noImplicitAny");
|
|
42550
42539
|
var noImplicitThis = getStrictOptionValue(compilerOptions, "noImplicitThis");
|
|
42551
42540
|
var useUnknownInCatchVariables = getStrictOptionValue(compilerOptions, "useUnknownInCatchVariables");
|
|
42552
|
-
var strictInstanceOfTypeParameters = true;
|
|
42553
42541
|
var keyofStringsOnly = !!compilerOptions.keyofStringsOnly;
|
|
42554
42542
|
var defaultIndexFlags = keyofStringsOnly ? 1 /* StringsOnly */ : 0 /* None */;
|
|
42555
42543
|
var freshObjectLiteralFlag = compilerOptions.suppressExcessPropertyErrors ? 0 : 8192 /* FreshLiteral */;
|
|
@@ -43080,21 +43068,77 @@ function createTypeChecker(host) {
|
|
|
43080
43068
|
}
|
|
43081
43069
|
return t;
|
|
43082
43070
|
}, () => "(unreliable reporter)");
|
|
43083
|
-
var emptyObjectType = createAnonymousType(
|
|
43084
|
-
|
|
43071
|
+
var emptyObjectType = createAnonymousType(
|
|
43072
|
+
/*symbol*/
|
|
43073
|
+
void 0,
|
|
43074
|
+
emptySymbols,
|
|
43075
|
+
emptyArray,
|
|
43076
|
+
emptyArray,
|
|
43077
|
+
emptyArray
|
|
43078
|
+
);
|
|
43079
|
+
var emptyJsxObjectType = createAnonymousType(
|
|
43080
|
+
/*symbol*/
|
|
43081
|
+
void 0,
|
|
43082
|
+
emptySymbols,
|
|
43083
|
+
emptyArray,
|
|
43084
|
+
emptyArray,
|
|
43085
|
+
emptyArray
|
|
43086
|
+
);
|
|
43085
43087
|
emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
|
|
43086
43088
|
var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
|
|
43087
43089
|
emptyTypeLiteralSymbol.members = createSymbolTable();
|
|
43088
43090
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray);
|
|
43089
|
-
var unknownEmptyObjectType = createAnonymousType(
|
|
43091
|
+
var unknownEmptyObjectType = createAnonymousType(
|
|
43092
|
+
/*symbol*/
|
|
43093
|
+
void 0,
|
|
43094
|
+
emptySymbols,
|
|
43095
|
+
emptyArray,
|
|
43096
|
+
emptyArray,
|
|
43097
|
+
emptyArray
|
|
43098
|
+
);
|
|
43090
43099
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
43091
|
-
var emptyGenericType = createAnonymousType(
|
|
43100
|
+
var emptyGenericType = createAnonymousType(
|
|
43101
|
+
/*symbol*/
|
|
43102
|
+
void 0,
|
|
43103
|
+
emptySymbols,
|
|
43104
|
+
emptyArray,
|
|
43105
|
+
emptyArray,
|
|
43106
|
+
emptyArray
|
|
43107
|
+
);
|
|
43092
43108
|
emptyGenericType.instantiations = /* @__PURE__ */ new Map();
|
|
43093
|
-
var anyFunctionType = createAnonymousType(
|
|
43109
|
+
var anyFunctionType = createAnonymousType(
|
|
43110
|
+
/*symbol*/
|
|
43111
|
+
void 0,
|
|
43112
|
+
emptySymbols,
|
|
43113
|
+
emptyArray,
|
|
43114
|
+
emptyArray,
|
|
43115
|
+
emptyArray
|
|
43116
|
+
);
|
|
43094
43117
|
anyFunctionType.objectFlags |= 262144 /* NonInferrableType */;
|
|
43095
|
-
var noConstraintType = createAnonymousType(
|
|
43096
|
-
|
|
43097
|
-
|
|
43118
|
+
var noConstraintType = createAnonymousType(
|
|
43119
|
+
/*symbol*/
|
|
43120
|
+
void 0,
|
|
43121
|
+
emptySymbols,
|
|
43122
|
+
emptyArray,
|
|
43123
|
+
emptyArray,
|
|
43124
|
+
emptyArray
|
|
43125
|
+
);
|
|
43126
|
+
var circularConstraintType = createAnonymousType(
|
|
43127
|
+
/*symbol*/
|
|
43128
|
+
void 0,
|
|
43129
|
+
emptySymbols,
|
|
43130
|
+
emptyArray,
|
|
43131
|
+
emptyArray,
|
|
43132
|
+
emptyArray
|
|
43133
|
+
);
|
|
43134
|
+
var resolvingDefaultType = createAnonymousType(
|
|
43135
|
+
/*symbol*/
|
|
43136
|
+
void 0,
|
|
43137
|
+
emptySymbols,
|
|
43138
|
+
emptyArray,
|
|
43139
|
+
emptyArray,
|
|
43140
|
+
emptyArray
|
|
43141
|
+
);
|
|
43098
43142
|
var markerSuperType = createTypeParameter();
|
|
43099
43143
|
var markerSubType = createTypeParameter();
|
|
43100
43144
|
markerSubType.constraint = markerSuperType;
|
|
@@ -43104,8 +43148,11 @@ function createTypeChecker(host) {
|
|
|
43104
43148
|
markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
|
|
43105
43149
|
var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
|
|
43106
43150
|
var anySignature = createSignature(
|
|
43151
|
+
/*declaration*/
|
|
43107
43152
|
void 0,
|
|
43153
|
+
/*typeParameters*/
|
|
43108
43154
|
void 0,
|
|
43155
|
+
/*thisParameter*/
|
|
43109
43156
|
void 0,
|
|
43110
43157
|
emptyArray,
|
|
43111
43158
|
anyType,
|
|
@@ -43115,8 +43162,11 @@ function createTypeChecker(host) {
|
|
|
43115
43162
|
0 /* None */
|
|
43116
43163
|
);
|
|
43117
43164
|
var unknownSignature = createSignature(
|
|
43165
|
+
/*declaration*/
|
|
43118
43166
|
void 0,
|
|
43167
|
+
/*typeParameters*/
|
|
43119
43168
|
void 0,
|
|
43169
|
+
/*thisParameter*/
|
|
43120
43170
|
void 0,
|
|
43121
43171
|
emptyArray,
|
|
43122
43172
|
errorType,
|
|
@@ -43126,8 +43176,11 @@ function createTypeChecker(host) {
|
|
|
43126
43176
|
0 /* None */
|
|
43127
43177
|
);
|
|
43128
43178
|
var resolvingSignature = createSignature(
|
|
43179
|
+
/*declaration*/
|
|
43129
43180
|
void 0,
|
|
43181
|
+
/*typeParameters*/
|
|
43130
43182
|
void 0,
|
|
43183
|
+
/*thisParameter*/
|
|
43131
43184
|
void 0,
|
|
43132
43185
|
emptyArray,
|
|
43133
43186
|
anyType,
|
|
@@ -43137,8 +43190,11 @@ function createTypeChecker(host) {
|
|
|
43137
43190
|
0 /* None */
|
|
43138
43191
|
);
|
|
43139
43192
|
var silentNeverSignature = createSignature(
|
|
43193
|
+
/*declaration*/
|
|
43140
43194
|
void 0,
|
|
43195
|
+
/*typeParameters*/
|
|
43141
43196
|
void 0,
|
|
43197
|
+
/*thisParameter*/
|
|
43142
43198
|
void 0,
|
|
43143
43199
|
emptyArray,
|
|
43144
43200
|
silentNeverType,
|
|
@@ -44195,7 +44251,7 @@ function createTypeChecker(host) {
|
|
|
44195
44251
|
if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) {
|
|
44196
44252
|
if (isRequireCall(
|
|
44197
44253
|
originalLocation.parent,
|
|
44198
|
-
/*
|
|
44254
|
+
/*requireStringLiteralLikeArgument*/
|
|
44199
44255
|
false
|
|
44200
44256
|
)) {
|
|
44201
44257
|
return requireSymbol;
|
|
@@ -44816,7 +44872,7 @@ function createTypeChecker(host) {
|
|
|
44816
44872
|
node,
|
|
44817
44873
|
moduleSymbol,
|
|
44818
44874
|
resolved,
|
|
44819
|
-
/*
|
|
44875
|
+
/*overwriteEmpty*/
|
|
44820
44876
|
false
|
|
44821
44877
|
);
|
|
44822
44878
|
return resolved;
|
|
@@ -44826,7 +44882,7 @@ function createTypeChecker(host) {
|
|
|
44826
44882
|
exportDefaultSymbol,
|
|
44827
44883
|
/*finalTarget*/
|
|
44828
44884
|
void 0,
|
|
44829
|
-
/*
|
|
44885
|
+
/*overwriteEmpty*/
|
|
44830
44886
|
false
|
|
44831
44887
|
);
|
|
44832
44888
|
return exportDefaultSymbol;
|
|
@@ -44877,7 +44933,7 @@ function createTypeChecker(host) {
|
|
|
44877
44933
|
immediate,
|
|
44878
44934
|
moduleSpecifier,
|
|
44879
44935
|
dontResolveAlias,
|
|
44880
|
-
/*
|
|
44936
|
+
/*suppressInteropError*/
|
|
44881
44937
|
false
|
|
44882
44938
|
);
|
|
44883
44939
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -44896,7 +44952,7 @@ function createTypeChecker(host) {
|
|
|
44896
44952
|
immediate,
|
|
44897
44953
|
moduleSpecifier,
|
|
44898
44954
|
dontResolveAlias,
|
|
44899
|
-
/*
|
|
44955
|
+
/*suppressInteropError*/
|
|
44900
44956
|
false
|
|
44901
44957
|
);
|
|
44902
44958
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -45388,6 +45444,7 @@ function createTypeChecker(host) {
|
|
|
45388
45444
|
left,
|
|
45389
45445
|
left.escapedText,
|
|
45390
45446
|
111551 /* Value */,
|
|
45447
|
+
/*nameNotFoundMessage*/
|
|
45391
45448
|
void 0,
|
|
45392
45449
|
left,
|
|
45393
45450
|
/*isUse*/
|
|
@@ -45423,6 +45480,7 @@ function createTypeChecker(host) {
|
|
|
45423
45480
|
name,
|
|
45424
45481
|
/*isUse*/
|
|
45425
45482
|
true,
|
|
45483
|
+
/*excludeGlobals*/
|
|
45426
45484
|
false
|
|
45427
45485
|
));
|
|
45428
45486
|
if (!symbol) {
|
|
@@ -45494,7 +45552,7 @@ function createTypeChecker(host) {
|
|
|
45494
45552
|
return void 0;
|
|
45495
45553
|
}
|
|
45496
45554
|
} else {
|
|
45497
|
-
|
|
45555
|
+
Debug.assertNever(name, "Unknown entity name kind.");
|
|
45498
45556
|
}
|
|
45499
45557
|
Debug.assert((getCheckFlags(symbol) & 1 /* Instantiated */) === 0, "Should never get an instantiated symbol here.");
|
|
45500
45558
|
if (!nodeIsSynthesized(name) && isEntityName(name) && (symbol.flags & 2097152 /* Alias */ || name.parent.kind === 275 /* ExportAssignment */)) {
|
|
@@ -46127,7 +46185,7 @@ function createTypeChecker(host) {
|
|
|
46127
46185
|
container,
|
|
46128
46186
|
enclosingDeclaration,
|
|
46129
46187
|
1920 /* Namespace */,
|
|
46130
|
-
/*
|
|
46188
|
+
/*useOnlyExternalAliasing*/
|
|
46131
46189
|
false
|
|
46132
46190
|
)) {
|
|
46133
46191
|
return append(concatenate(concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer);
|
|
@@ -46440,7 +46498,7 @@ function createTypeChecker(host) {
|
|
|
46440
46498
|
if (symbolFromSymbolTable.escapedName === symbol.escapedName && symbolFromSymbolTable.exportSymbol) {
|
|
46441
46499
|
if (isAccessible(
|
|
46442
46500
|
getMergedSymbol(symbolFromSymbolTable.exportSymbol),
|
|
46443
|
-
/*
|
|
46501
|
+
/*resolvedAliasSymbol*/
|
|
46444
46502
|
void 0,
|
|
46445
46503
|
ignoreQualification
|
|
46446
46504
|
)) {
|
|
@@ -46692,7 +46750,7 @@ function createTypeChecker(host) {
|
|
|
46692
46750
|
enclosingDeclaration,
|
|
46693
46751
|
firstIdentifier.escapedText,
|
|
46694
46752
|
meaning,
|
|
46695
|
-
/*
|
|
46753
|
+
/*nameNotFoundMessage*/
|
|
46696
46754
|
void 0,
|
|
46697
46755
|
/*nameArg*/
|
|
46698
46756
|
void 0,
|
|
@@ -46712,7 +46770,7 @@ function createTypeChecker(host) {
|
|
|
46712
46770
|
)),
|
|
46713
46771
|
firstIdentifier,
|
|
46714
46772
|
meaning,
|
|
46715
|
-
/*
|
|
46773
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
46716
46774
|
false
|
|
46717
46775
|
).accessibility === 0 /* Accessible */) {
|
|
46718
46776
|
return { accessibility: 0 /* Accessible */ };
|
|
@@ -47271,7 +47329,7 @@ function createTypeChecker(host) {
|
|
|
47271
47329
|
symbol,
|
|
47272
47330
|
context.enclosingDeclaration,
|
|
47273
47331
|
isInstanceType,
|
|
47274
|
-
/*
|
|
47332
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
47275
47333
|
false
|
|
47276
47334
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
47277
47335
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -47367,7 +47425,7 @@ function createTypeChecker(host) {
|
|
|
47367
47425
|
function deepCloneOrReuseNodes(nodes, visitor, test, start, count) {
|
|
47368
47426
|
if (nodes && nodes.length === 0) {
|
|
47369
47427
|
return setTextRange(factory.createNodeArray(
|
|
47370
|
-
/*
|
|
47428
|
+
/*elements*/
|
|
47371
47429
|
void 0,
|
|
47372
47430
|
nodes.hasTrailingComma
|
|
47373
47431
|
), nodes);
|
|
@@ -47955,12 +48013,12 @@ function createTypeChecker(host) {
|
|
|
47955
48013
|
const thisTag = getJSDocThisTag(signature.declaration);
|
|
47956
48014
|
if (thisTag && thisTag.typeExpression) {
|
|
47957
48015
|
return factory.createParameterDeclaration(
|
|
47958
|
-
/*
|
|
48016
|
+
/*modifiers*/
|
|
47959
48017
|
void 0,
|
|
47960
|
-
/*
|
|
48018
|
+
/*dotDotDotToken*/
|
|
47961
48019
|
void 0,
|
|
47962
48020
|
"this",
|
|
47963
|
-
/*
|
|
48021
|
+
/*questionToken*/
|
|
47964
48022
|
void 0,
|
|
47965
48023
|
typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context)
|
|
47966
48024
|
);
|
|
@@ -48047,7 +48105,7 @@ function createTypeChecker(host) {
|
|
|
48047
48105
|
firstIdentifier,
|
|
48048
48106
|
firstIdentifier.escapedText,
|
|
48049
48107
|
111551 /* Value */ | 1048576 /* ExportValue */,
|
|
48050
|
-
/*
|
|
48108
|
+
/*nameNotFoundMessage*/
|
|
48051
48109
|
void 0,
|
|
48052
48110
|
/*nameArg*/
|
|
48053
48111
|
void 0,
|
|
@@ -48380,7 +48438,7 @@ function createTypeChecker(host) {
|
|
|
48380
48438
|
context.enclosingDeclaration,
|
|
48381
48439
|
escapedName,
|
|
48382
48440
|
788968 /* Type */,
|
|
48383
|
-
/*
|
|
48441
|
+
/*nameNotFoundMessage*/
|
|
48384
48442
|
void 0,
|
|
48385
48443
|
escapedName,
|
|
48386
48444
|
/*isUse*/
|
|
@@ -48622,7 +48680,7 @@ function createTypeChecker(host) {
|
|
|
48622
48680
|
67108863 /* All */,
|
|
48623
48681
|
/*ignoreErrors*/
|
|
48624
48682
|
true,
|
|
48625
|
-
/*
|
|
48683
|
+
/*dontResolveAlias*/
|
|
48626
48684
|
true
|
|
48627
48685
|
);
|
|
48628
48686
|
if (sym) {
|
|
@@ -48701,7 +48759,7 @@ function createTypeChecker(host) {
|
|
|
48701
48759
|
[factory.createParameterDeclaration(
|
|
48702
48760
|
/*modifiers*/
|
|
48703
48761
|
void 0,
|
|
48704
|
-
/*
|
|
48762
|
+
/*dotDotDotToken*/
|
|
48705
48763
|
void 0,
|
|
48706
48764
|
"x",
|
|
48707
48765
|
/*questionToken*/
|
|
@@ -48824,13 +48882,13 @@ function createTypeChecker(host) {
|
|
|
48824
48882
|
const serializePropertySymbolForClass = makeSerializePropertySymbol(
|
|
48825
48883
|
factory.createPropertyDeclaration,
|
|
48826
48884
|
172 /* MethodDeclaration */,
|
|
48827
|
-
/*
|
|
48885
|
+
/*useAccessors*/
|
|
48828
48886
|
true
|
|
48829
48887
|
);
|
|
48830
48888
|
const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(
|
|
48831
48889
|
(mods, name, question, type) => factory.createPropertySignature(mods, name, question, type),
|
|
48832
48890
|
171 /* MethodSignature */,
|
|
48833
|
-
/*
|
|
48891
|
+
/*useAccessors*/
|
|
48834
48892
|
false
|
|
48835
48893
|
);
|
|
48836
48894
|
const enclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -48852,7 +48910,7 @@ function createTypeChecker(host) {
|
|
|
48852
48910
|
sym,
|
|
48853
48911
|
decl,
|
|
48854
48912
|
meaning,
|
|
48855
|
-
/*
|
|
48913
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
48856
48914
|
false
|
|
48857
48915
|
);
|
|
48858
48916
|
if (accessibleResult.accessibility === 0 /* Accessible */) {
|
|
@@ -48911,7 +48969,7 @@ function createTypeChecker(host) {
|
|
|
48911
48969
|
factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(
|
|
48912
48970
|
/*isTypeOnly*/
|
|
48913
48971
|
false,
|
|
48914
|
-
/*
|
|
48972
|
+
/*propertyName*/
|
|
48915
48973
|
void 0,
|
|
48916
48974
|
id
|
|
48917
48975
|
))),
|
|
@@ -49204,7 +49262,7 @@ function createTypeChecker(host) {
|
|
|
49204
49262
|
addResult(factory.createExportAssignment(
|
|
49205
49263
|
/*modifiers*/
|
|
49206
49264
|
void 0,
|
|
49207
|
-
/*
|
|
49265
|
+
/*isExportEquals*/
|
|
49208
49266
|
false,
|
|
49209
49267
|
factory.createIdentifier(getInternalSymbolName(symbol, symbolName2))
|
|
49210
49268
|
), 0 /* None */);
|
|
@@ -49627,7 +49685,7 @@ function createTypeChecker(host) {
|
|
|
49627
49685
|
)])
|
|
49628
49686
|
),
|
|
49629
49687
|
factory.createStringLiteral(specifier2),
|
|
49630
|
-
/*
|
|
49688
|
+
/*assertClause*/
|
|
49631
49689
|
void 0
|
|
49632
49690
|
), 0 /* None */);
|
|
49633
49691
|
break;
|
|
@@ -49716,7 +49774,7 @@ function createTypeChecker(host) {
|
|
|
49716
49774
|
factory.createImportClause(
|
|
49717
49775
|
/*isTypeOnly*/
|
|
49718
49776
|
false,
|
|
49719
|
-
/*
|
|
49777
|
+
/*name*/
|
|
49720
49778
|
void 0,
|
|
49721
49779
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
49722
49780
|
),
|
|
@@ -49744,7 +49802,7 @@ function createTypeChecker(host) {
|
|
|
49744
49802
|
factory.createImportClause(
|
|
49745
49803
|
/*isTypeOnly*/
|
|
49746
49804
|
false,
|
|
49747
|
-
/*
|
|
49805
|
+
/*name*/
|
|
49748
49806
|
void 0,
|
|
49749
49807
|
factory.createNamedImports([
|
|
49750
49808
|
factory.createImportSpecifier(
|
|
@@ -50105,7 +50163,7 @@ function createTypeChecker(host) {
|
|
|
50105
50163
|
addResult(statement, 0 /* None */);
|
|
50106
50164
|
return factory.createExpressionWithTypeArguments(
|
|
50107
50165
|
factory.createIdentifier(tempName),
|
|
50108
|
-
/*
|
|
50166
|
+
/*typeArguments*/
|
|
50109
50167
|
void 0
|
|
50110
50168
|
);
|
|
50111
50169
|
}
|
|
@@ -50130,7 +50188,7 @@ function createTypeChecker(host) {
|
|
|
50130
50188
|
if (t.symbol) {
|
|
50131
50189
|
return factory.createExpressionWithTypeArguments(
|
|
50132
50190
|
symbolToExpression(t.symbol, context, 788968 /* Type */),
|
|
50133
|
-
/*
|
|
50191
|
+
/*typeArguments*/
|
|
50134
50192
|
void 0
|
|
50135
50193
|
);
|
|
50136
50194
|
}
|
|
@@ -50436,7 +50494,9 @@ function createTypeChecker(host) {
|
|
|
50436
50494
|
declaration,
|
|
50437
50495
|
firstIdentifier.escapedText,
|
|
50438
50496
|
111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,
|
|
50497
|
+
/*nameNotFoundMessage*/
|
|
50439
50498
|
void 0,
|
|
50499
|
+
/*nameArg*/
|
|
50440
50500
|
void 0,
|
|
50441
50501
|
/*isUse*/
|
|
50442
50502
|
false
|
|
@@ -50523,30 +50583,9 @@ function createTypeChecker(host) {
|
|
|
50523
50583
|
}
|
|
50524
50584
|
}).parent;
|
|
50525
50585
|
}
|
|
50526
|
-
function getInstanceTypeOfClassSymbol(classSymbol) {
|
|
50527
|
-
const classType = getDeclaredTypeOfSymbol(classSymbol);
|
|
50528
|
-
const objectFlags = getObjectFlags(classType);
|
|
50529
|
-
if (!(objectFlags & 3 /* ClassOrInterface */) || !classType.typeParameters) {
|
|
50530
|
-
return classType;
|
|
50531
|
-
}
|
|
50532
|
-
const variances = getVariances(classType);
|
|
50533
|
-
const typeArguments = map(classType.typeParameters, (typeParameter, i) => {
|
|
50534
|
-
if (!strictInstanceOfTypeParameters) {
|
|
50535
|
-
return anyType;
|
|
50536
|
-
}
|
|
50537
|
-
const variance = variances[i];
|
|
50538
|
-
switch (variance & 7 /* VarianceMask */) {
|
|
50539
|
-
case 2 /* Contravariant */:
|
|
50540
|
-
case 3 /* Bivariant */:
|
|
50541
|
-
return neverType;
|
|
50542
|
-
}
|
|
50543
|
-
return getBaseConstraintOfType(typeParameter) || unknownType;
|
|
50544
|
-
});
|
|
50545
|
-
return createTypeReference(classType, typeArguments);
|
|
50546
|
-
}
|
|
50547
50586
|
function getTypeOfPrototypeProperty(prototype) {
|
|
50548
|
-
const
|
|
50549
|
-
return
|
|
50587
|
+
const classType = getDeclaredTypeOfSymbol(getParentOfSymbol(prototype));
|
|
50588
|
+
return classType.typeParameters ? createTypeReference(classType, map(classType.typeParameters, (_) => anyType)) : classType;
|
|
50550
50589
|
}
|
|
50551
50590
|
function getTypeOfPropertyOfType(type, name) {
|
|
50552
50591
|
const prop = getPropertyOfType(type, name);
|
|
@@ -51242,7 +51281,14 @@ function createTypeChecker(host) {
|
|
|
51242
51281
|
symbol.links.bindingElement = e;
|
|
51243
51282
|
members.set(symbol.escapedName, symbol);
|
|
51244
51283
|
});
|
|
51245
|
-
const result = createAnonymousType(
|
|
51284
|
+
const result = createAnonymousType(
|
|
51285
|
+
/*symbol*/
|
|
51286
|
+
void 0,
|
|
51287
|
+
members,
|
|
51288
|
+
emptyArray,
|
|
51289
|
+
emptyArray,
|
|
51290
|
+
stringIndexInfo ? [stringIndexInfo] : emptyArray
|
|
51291
|
+
);
|
|
51246
51292
|
result.objectFlags |= objectFlags;
|
|
51247
51293
|
if (includePatternInType) {
|
|
51248
51294
|
result.pattern = pattern;
|
|
@@ -51404,7 +51450,7 @@ function createTypeChecker(host) {
|
|
|
51404
51450
|
} else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) {
|
|
51405
51451
|
type = getWidenedTypeForVariableLikeDeclaration(
|
|
51406
51452
|
declaration,
|
|
51407
|
-
/*
|
|
51453
|
+
/*reportErrors*/
|
|
51408
51454
|
true
|
|
51409
51455
|
);
|
|
51410
51456
|
} else if (isEnumDeclaration(declaration)) {
|
|
@@ -51461,7 +51507,7 @@ function createTypeChecker(host) {
|
|
|
51461
51507
|
const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);
|
|
51462
51508
|
let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration(
|
|
51463
51509
|
accessor,
|
|
51464
|
-
/*
|
|
51510
|
+
/*reportErrors*/
|
|
51465
51511
|
true
|
|
51466
51512
|
);
|
|
51467
51513
|
if (!type) {
|
|
@@ -51575,7 +51621,7 @@ function createTypeChecker(host) {
|
|
|
51575
51621
|
const targetSymbol = resolveAlias(symbol);
|
|
51576
51622
|
const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(
|
|
51577
51623
|
getDeclarationOfAliasSymbol(symbol),
|
|
51578
|
-
/*
|
|
51624
|
+
/*dontRecursivelyResolve*/
|
|
51579
51625
|
true
|
|
51580
51626
|
);
|
|
51581
51627
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
@@ -52606,8 +52652,10 @@ function createTypeChecker(host) {
|
|
|
52606
52652
|
const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */);
|
|
52607
52653
|
if (baseSignatures.length === 0) {
|
|
52608
52654
|
return [createSignature(
|
|
52655
|
+
/*declaration*/
|
|
52609
52656
|
void 0,
|
|
52610
52657
|
classType.localTypeParameters,
|
|
52658
|
+
/*thisParameter*/
|
|
52611
52659
|
void 0,
|
|
52612
52660
|
emptyArray,
|
|
52613
52661
|
classType,
|
|
@@ -53597,7 +53645,7 @@ function createTypeChecker(host) {
|
|
|
53597
53645
|
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
53598
53646
|
type,
|
|
53599
53647
|
type,
|
|
53600
|
-
/*
|
|
53648
|
+
/*needApparentType*/
|
|
53601
53649
|
true
|
|
53602
53650
|
));
|
|
53603
53651
|
}
|
|
@@ -54094,7 +54142,9 @@ function createTypeChecker(host) {
|
|
|
54094
54142
|
param,
|
|
54095
54143
|
paramSymbol.escapedName,
|
|
54096
54144
|
111551 /* Value */,
|
|
54145
|
+
/*nameNotFoundMessage*/
|
|
54097
54146
|
void 0,
|
|
54147
|
+
/*nameArg*/
|
|
54098
54148
|
void 0,
|
|
54099
54149
|
/*isUse*/
|
|
54100
54150
|
false
|
|
@@ -54991,7 +55041,14 @@ function createTypeChecker(host) {
|
|
|
54991
55041
|
/*isReadonly*/
|
|
54992
55042
|
false
|
|
54993
55043
|
)] : emptyArray;
|
|
54994
|
-
return createAnonymousType(
|
|
55044
|
+
return createAnonymousType(
|
|
55045
|
+
/*symbol*/
|
|
55046
|
+
void 0,
|
|
55047
|
+
emptySymbols,
|
|
55048
|
+
emptyArray,
|
|
55049
|
+
emptyArray,
|
|
55050
|
+
indexInfo
|
|
55051
|
+
);
|
|
54995
55052
|
}
|
|
54996
55053
|
return anyType;
|
|
54997
55054
|
}
|
|
@@ -55099,6 +55156,7 @@ function createTypeChecker(host) {
|
|
|
55099
55156
|
}
|
|
55100
55157
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
55101
55158
|
return resolveName(
|
|
55159
|
+
/*location*/
|
|
55102
55160
|
void 0,
|
|
55103
55161
|
name,
|
|
55104
55162
|
meaning,
|
|
@@ -56361,7 +56419,7 @@ function createTypeChecker(host) {
|
|
|
56361
56419
|
links.resolvedType = getTypeFromTypeNode(node.type);
|
|
56362
56420
|
break;
|
|
56363
56421
|
default:
|
|
56364
|
-
|
|
56422
|
+
Debug.assertNever(node.operator);
|
|
56365
56423
|
}
|
|
56366
56424
|
}
|
|
56367
56425
|
return links.resolvedType;
|
|
@@ -56658,7 +56716,7 @@ function createTypeChecker(host) {
|
|
|
56658
56716
|
let errorInfo;
|
|
56659
56717
|
if (indexType.flags & 1024 /* EnumLiteral */) {
|
|
56660
56718
|
errorInfo = chainDiagnosticMessages(
|
|
56661
|
-
/*
|
|
56719
|
+
/*details*/
|
|
56662
56720
|
void 0,
|
|
56663
56721
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56664
56722
|
"[" + typeToString(indexType) + "]",
|
|
@@ -56667,7 +56725,7 @@ function createTypeChecker(host) {
|
|
|
56667
56725
|
} else if (indexType.flags & 8192 /* UniqueESSymbol */) {
|
|
56668
56726
|
const symbolName2 = getFullyQualifiedName(indexType.symbol, accessExpression);
|
|
56669
56727
|
errorInfo = chainDiagnosticMessages(
|
|
56670
|
-
/*
|
|
56728
|
+
/*details*/
|
|
56671
56729
|
void 0,
|
|
56672
56730
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56673
56731
|
"[" + symbolName2 + "]",
|
|
@@ -56675,7 +56733,7 @@ function createTypeChecker(host) {
|
|
|
56675
56733
|
);
|
|
56676
56734
|
} else if (indexType.flags & 128 /* StringLiteral */) {
|
|
56677
56735
|
errorInfo = chainDiagnosticMessages(
|
|
56678
|
-
/*
|
|
56736
|
+
/*details*/
|
|
56679
56737
|
void 0,
|
|
56680
56738
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56681
56739
|
indexType.value,
|
|
@@ -56683,7 +56741,7 @@ function createTypeChecker(host) {
|
|
|
56683
56741
|
);
|
|
56684
56742
|
} else if (indexType.flags & 256 /* NumberLiteral */) {
|
|
56685
56743
|
errorInfo = chainDiagnosticMessages(
|
|
56686
|
-
/*
|
|
56744
|
+
/*details*/
|
|
56687
56745
|
void 0,
|
|
56688
56746
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56689
56747
|
indexType.value,
|
|
@@ -56691,7 +56749,7 @@ function createTypeChecker(host) {
|
|
|
56691
56749
|
);
|
|
56692
56750
|
} else if (indexType.flags & (8 /* Number */ | 4 /* String */)) {
|
|
56693
56751
|
errorInfo = chainDiagnosticMessages(
|
|
56694
|
-
/*
|
|
56752
|
+
/*details*/
|
|
56695
56753
|
void 0,
|
|
56696
56754
|
Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,
|
|
56697
56755
|
typeToString(indexType),
|
|
@@ -58311,7 +58369,7 @@ function createTypeChecker(host) {
|
|
|
58311
58369
|
targetReturn,
|
|
58312
58370
|
relation,
|
|
58313
58371
|
returnExpression,
|
|
58314
|
-
/*
|
|
58372
|
+
/*headMessage*/
|
|
58315
58373
|
void 0,
|
|
58316
58374
|
containingMessageChain,
|
|
58317
58375
|
resultObj
|
|
@@ -58635,7 +58693,7 @@ function createTypeChecker(host) {
|
|
|
58635
58693
|
const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
|
|
58636
58694
|
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;
|
|
58637
58695
|
invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
|
|
58638
|
-
/*
|
|
58696
|
+
/*dummy*/
|
|
58639
58697
|
void 0,
|
|
58640
58698
|
diagnostic,
|
|
58641
58699
|
tagNameText,
|
|
@@ -58726,7 +58784,7 @@ function createTypeChecker(host) {
|
|
|
58726
58784
|
false,
|
|
58727
58785
|
/*errorReporter*/
|
|
58728
58786
|
void 0,
|
|
58729
|
-
/*
|
|
58787
|
+
/*incompatibleErrorReporter*/
|
|
58730
58788
|
void 0,
|
|
58731
58789
|
compareTypesAssignable,
|
|
58732
58790
|
/*reportUnreliableMarkers*/
|
|
@@ -58800,12 +58858,7 @@ function createTypeChecker(host) {
|
|
|
58800
58858
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
58801
58859
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
58802
58860
|
for (let i = 0; i < paramCount; i++) {
|
|
58803
|
-
const sourceType = i === restIndex ? getRestTypeAtPosition(
|
|
58804
|
-
source,
|
|
58805
|
-
i,
|
|
58806
|
-
/*readonly*/
|
|
58807
|
-
true
|
|
58808
|
-
) : tryGetTypeAtPosition(source, i);
|
|
58861
|
+
const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
|
|
58809
58862
|
const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
|
|
58810
58863
|
if (sourceType && targetType) {
|
|
58811
58864
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
@@ -59198,7 +59251,7 @@ function createTypeChecker(host) {
|
|
|
59198
59251
|
reportError(...stack[0]);
|
|
59199
59252
|
if (info) {
|
|
59200
59253
|
reportRelationError(
|
|
59201
|
-
/*
|
|
59254
|
+
/*message*/
|
|
59202
59255
|
void 0,
|
|
59203
59256
|
...info
|
|
59204
59257
|
);
|
|
@@ -59273,7 +59326,7 @@ function createTypeChecker(host) {
|
|
|
59273
59326
|
}
|
|
59274
59327
|
if (info) {
|
|
59275
59328
|
reportRelationError(
|
|
59276
|
-
/*
|
|
59329
|
+
/*message*/
|
|
59277
59330
|
void 0,
|
|
59278
59331
|
...info
|
|
59279
59332
|
);
|
|
@@ -59715,7 +59768,7 @@ function createTypeChecker(host) {
|
|
|
59715
59768
|
if (containsType(targetTypes, source2)) {
|
|
59716
59769
|
return -1 /* True */;
|
|
59717
59770
|
}
|
|
59718
|
-
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 */)) {
|
|
59771
|
+
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 */)) {
|
|
59719
59772
|
const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType;
|
|
59720
59773
|
const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0;
|
|
59721
59774
|
return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */;
|
|
@@ -59946,7 +59999,7 @@ function createTypeChecker(host) {
|
|
|
59946
59999
|
target2,
|
|
59947
60000
|
intersectionState,
|
|
59948
60001
|
relation,
|
|
59949
|
-
/*
|
|
60002
|
+
/*ignoreConstraints*/
|
|
59950
60003
|
false
|
|
59951
60004
|
);
|
|
59952
60005
|
const entry = relation.get(id);
|
|
@@ -60342,7 +60395,7 @@ function createTypeChecker(host) {
|
|
|
60342
60395
|
constraint,
|
|
60343
60396
|
2 /* Target */,
|
|
60344
60397
|
reportErrors2,
|
|
60345
|
-
/*
|
|
60398
|
+
/*headMessage*/
|
|
60346
60399
|
void 0,
|
|
60347
60400
|
intersectionState
|
|
60348
60401
|
)) {
|
|
@@ -60754,7 +60807,7 @@ function createTypeChecker(host) {
|
|
|
60754
60807
|
source2,
|
|
60755
60808
|
type,
|
|
60756
60809
|
0 /* Call */,
|
|
60757
|
-
/*
|
|
60810
|
+
/*reportErrors*/
|
|
60758
60811
|
false,
|
|
60759
60812
|
0 /* None */
|
|
60760
60813
|
);
|
|
@@ -60763,7 +60816,7 @@ function createTypeChecker(host) {
|
|
|
60763
60816
|
source2,
|
|
60764
60817
|
type,
|
|
60765
60818
|
1 /* Construct */,
|
|
60766
|
-
/*
|
|
60819
|
+
/*reportErrors*/
|
|
60767
60820
|
false,
|
|
60768
60821
|
0 /* None */
|
|
60769
60822
|
);
|
|
@@ -60773,7 +60826,7 @@ function createTypeChecker(host) {
|
|
|
60773
60826
|
type,
|
|
60774
60827
|
/*sourceIsPrimitive*/
|
|
60775
60828
|
false,
|
|
60776
|
-
/*
|
|
60829
|
+
/*reportErrors*/
|
|
60777
60830
|
false,
|
|
60778
60831
|
0 /* None */
|
|
60779
60832
|
);
|
|
@@ -61359,7 +61412,7 @@ function createTypeChecker(host) {
|
|
|
61359
61412
|
const targetHasStringIndex = some(indexInfos, (info) => info.keyType === stringType);
|
|
61360
61413
|
let result2 = -1 /* True */;
|
|
61361
61414
|
for (const targetInfo of indexInfos) {
|
|
61362
|
-
const related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
|
|
61415
|
+
const related = relation !== strictSubtypeRelation && !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
|
|
61363
61416
|
if (!related) {
|
|
61364
61417
|
return 0 /* False */;
|
|
61365
61418
|
}
|
|
@@ -62263,6 +62316,7 @@ function createTypeChecker(host) {
|
|
|
62263
62316
|
param,
|
|
62264
62317
|
param.name.escapedText,
|
|
62265
62318
|
788968 /* Type */,
|
|
62319
|
+
/*nameNotFoundMessage*/
|
|
62266
62320
|
void 0,
|
|
62267
62321
|
param.name.escapedText,
|
|
62268
62322
|
/*isUse*/
|
|
@@ -62490,7 +62544,14 @@ function createTypeChecker(host) {
|
|
|
62490
62544
|
/*isReadonly*/
|
|
62491
62545
|
false
|
|
62492
62546
|
)] : emptyArray;
|
|
62493
|
-
return createAnonymousType(
|
|
62547
|
+
return createAnonymousType(
|
|
62548
|
+
/*symbol*/
|
|
62549
|
+
void 0,
|
|
62550
|
+
members,
|
|
62551
|
+
emptyArray,
|
|
62552
|
+
emptyArray,
|
|
62553
|
+
indexInfos
|
|
62554
|
+
);
|
|
62494
62555
|
}
|
|
62495
62556
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
62496
62557
|
if (inInferTypeForHomomorphicMappedType) {
|
|
@@ -63986,7 +64047,7 @@ function createTypeChecker(host) {
|
|
|
63986
64047
|
return source.flags & 1048576 /* Union */ ? !forEach(source.types, (t) => !contains(types, t)) : contains(types, source);
|
|
63987
64048
|
}
|
|
63988
64049
|
function isTypeSubsetOf(source, target) {
|
|
63989
|
-
return source === target || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target);
|
|
64050
|
+
return !!(source === target || source.flags & 131072 /* Never */ || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target));
|
|
63990
64051
|
}
|
|
63991
64052
|
function isTypeSubsetOfUnion(source, target) {
|
|
63992
64053
|
if (source.flags & 1048576 /* Union */) {
|
|
@@ -64686,7 +64747,7 @@ function createTypeChecker(host) {
|
|
|
64686
64747
|
return type;
|
|
64687
64748
|
}
|
|
64688
64749
|
pushIfUnique(antecedentTypes, type);
|
|
64689
|
-
if (!isTypeSubsetOf(type,
|
|
64750
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64690
64751
|
subtypeReduction = true;
|
|
64691
64752
|
}
|
|
64692
64753
|
if (isIncomplete(flowType)) {
|
|
@@ -64701,7 +64762,7 @@ function createTypeChecker(host) {
|
|
|
64701
64762
|
return type;
|
|
64702
64763
|
}
|
|
64703
64764
|
antecedentTypes.push(type);
|
|
64704
|
-
if (!isTypeSubsetOf(type,
|
|
64765
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64705
64766
|
subtypeReduction = true;
|
|
64706
64767
|
}
|
|
64707
64768
|
if (isIncomplete(flowType)) {
|
|
@@ -64755,7 +64816,7 @@ function createTypeChecker(host) {
|
|
|
64755
64816
|
}
|
|
64756
64817
|
const type = getTypeFromFlowType(flowType);
|
|
64757
64818
|
pushIfUnique(antecedentTypes, type);
|
|
64758
|
-
if (!isTypeSubsetOf(type,
|
|
64819
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64759
64820
|
subtypeReduction = true;
|
|
64760
64821
|
}
|
|
64761
64822
|
if (type === declaredType) {
|
|
@@ -65026,8 +65087,8 @@ function createTypeChecker(host) {
|
|
|
65026
65087
|
if (symbol === void 0) {
|
|
65027
65088
|
return type;
|
|
65028
65089
|
}
|
|
65029
|
-
const classSymbol =
|
|
65030
|
-
const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration")) ? getTypeOfSymbol(classSymbol) :
|
|
65090
|
+
const classSymbol = symbol.parent;
|
|
65091
|
+
const targetType = hasStaticModifier(Debug.checkDefined(symbol.valueDeclaration, "should always have a declaration")) ? getTypeOfSymbol(classSymbol) : getDeclaredTypeOfSymbol(classSymbol);
|
|
65031
65092
|
return getNarrowedType(
|
|
65032
65093
|
type,
|
|
65033
65094
|
targetType,
|
|
@@ -65835,7 +65896,7 @@ function createTypeChecker(host) {
|
|
|
65835
65896
|
const isNodeInTypeQuery = isInTypeQuery(node);
|
|
65836
65897
|
let container = getThisContainer(
|
|
65837
65898
|
node,
|
|
65838
|
-
/*
|
|
65899
|
+
/*includeArrowFunctions*/
|
|
65839
65900
|
true,
|
|
65840
65901
|
/*includeClassComputedPropertyName*/
|
|
65841
65902
|
true
|
|
@@ -65849,7 +65910,7 @@ function createTypeChecker(host) {
|
|
|
65849
65910
|
if (container.kind === 217 /* ArrowFunction */) {
|
|
65850
65911
|
container = getThisContainer(
|
|
65851
65912
|
container,
|
|
65852
|
-
/*
|
|
65913
|
+
/*includeArrowFunctions*/
|
|
65853
65914
|
false,
|
|
65854
65915
|
!thisInComputedPropertyName
|
|
65855
65916
|
);
|
|
@@ -66462,6 +66523,7 @@ function createTypeChecker(host) {
|
|
|
66462
66523
|
id,
|
|
66463
66524
|
id.escapedText,
|
|
66464
66525
|
111551 /* Value */,
|
|
66526
|
+
/*nameNotFoundMessage*/
|
|
66465
66527
|
void 0,
|
|
66466
66528
|
id.escapedText,
|
|
66467
66529
|
/*isUse*/
|
|
@@ -66511,7 +66573,9 @@ function createTypeChecker(host) {
|
|
|
66511
66573
|
declaration.left,
|
|
66512
66574
|
name,
|
|
66513
66575
|
111551 /* Value */,
|
|
66576
|
+
/*nameNotFoundMessage*/
|
|
66514
66577
|
void 0,
|
|
66578
|
+
/*nameArg*/
|
|
66515
66579
|
void 0,
|
|
66516
66580
|
/*isUse*/
|
|
66517
66581
|
true,
|
|
@@ -67864,7 +67928,7 @@ function createTypeChecker(host) {
|
|
|
67864
67928
|
location,
|
|
67865
67929
|
namespaceName,
|
|
67866
67930
|
1920 /* Namespace */,
|
|
67867
|
-
/*
|
|
67931
|
+
/*nameNotFoundMessage*/
|
|
67868
67932
|
void 0,
|
|
67869
67933
|
namespaceName,
|
|
67870
67934
|
/*isUse*/
|
|
@@ -67887,7 +67951,7 @@ function createTypeChecker(host) {
|
|
|
67887
67951
|
const s = resolveSymbol(getGlobalSymbol(
|
|
67888
67952
|
JsxNames.JSX,
|
|
67889
67953
|
1920 /* Namespace */,
|
|
67890
|
-
/*
|
|
67954
|
+
/*diagnostic*/
|
|
67891
67955
|
void 0
|
|
67892
67956
|
));
|
|
67893
67957
|
if (s === unknownSymbol) {
|
|
@@ -67981,7 +68045,7 @@ function createTypeChecker(host) {
|
|
|
67981
68045
|
function generateInitialErrorChain() {
|
|
67982
68046
|
const componentName = getTextOfNode(openingLikeElement.tagName);
|
|
67983
68047
|
return chainDiagnosticMessages(
|
|
67984
|
-
/*
|
|
68048
|
+
/*details*/
|
|
67985
68049
|
void 0,
|
|
67986
68050
|
Diagnostics._0_cannot_be_used_as_a_JSX_component,
|
|
67987
68051
|
componentName
|
|
@@ -68239,7 +68303,7 @@ function createTypeChecker(host) {
|
|
|
68239
68303
|
function getThisParameterFromNodeContext(node) {
|
|
68240
68304
|
const thisContainer = getThisContainer(
|
|
68241
68305
|
node,
|
|
68242
|
-
/*
|
|
68306
|
+
/*includeArrowFunctions*/
|
|
68243
68307
|
false,
|
|
68244
68308
|
/*includeClassComputedPropertyName*/
|
|
68245
68309
|
false
|
|
@@ -68377,9 +68441,9 @@ function createTypeChecker(host) {
|
|
|
68377
68441
|
if (symbol) {
|
|
68378
68442
|
markPropertyAsReferenced(
|
|
68379
68443
|
symbol,
|
|
68380
|
-
/*
|
|
68444
|
+
/*nodeForCheckWriteOnly*/
|
|
68381
68445
|
void 0,
|
|
68382
|
-
/*
|
|
68446
|
+
/*isSelfTypeAccess*/
|
|
68383
68447
|
false
|
|
68384
68448
|
);
|
|
68385
68449
|
}
|
|
@@ -68920,7 +68984,7 @@ function createTypeChecker(host) {
|
|
|
68920
68984
|
return isPropertyAccessible(
|
|
68921
68985
|
node,
|
|
68922
68986
|
node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */,
|
|
68923
|
-
/*
|
|
68987
|
+
/*isWrite*/
|
|
68924
68988
|
false,
|
|
68925
68989
|
type,
|
|
68926
68990
|
property
|
|
@@ -68934,7 +68998,7 @@ function createTypeChecker(host) {
|
|
|
68934
68998
|
return !!prop && isPropertyAccessible(
|
|
68935
68999
|
node,
|
|
68936
69000
|
isSuper,
|
|
68937
|
-
/*
|
|
69001
|
+
/*isWrite*/
|
|
68938
69002
|
false,
|
|
68939
69003
|
type,
|
|
68940
69004
|
prop
|
|
@@ -69647,7 +69711,17 @@ function createTypeChecker(host) {
|
|
|
69647
69711
|
function isPromiseResolveArityError(node) {
|
|
69648
69712
|
if (!isCallExpression(node) || !isIdentifier(node.expression))
|
|
69649
69713
|
return false;
|
|
69650
|
-
const symbol = resolveName(
|
|
69714
|
+
const symbol = resolveName(
|
|
69715
|
+
node.expression,
|
|
69716
|
+
node.expression.escapedText,
|
|
69717
|
+
111551 /* Value */,
|
|
69718
|
+
/*nameNotFoundMessage*/
|
|
69719
|
+
void 0,
|
|
69720
|
+
/*nameArg*/
|
|
69721
|
+
void 0,
|
|
69722
|
+
/*isUse*/
|
|
69723
|
+
false
|
|
69724
|
+
);
|
|
69651
69725
|
const decl = symbol == null ? void 0 : symbol.valueDeclaration;
|
|
69652
69726
|
if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) {
|
|
69653
69727
|
return false;
|
|
@@ -70126,7 +70200,7 @@ function createTypeChecker(host) {
|
|
|
70126
70200
|
parameters,
|
|
70127
70201
|
/*resolvedReturnType*/
|
|
70128
70202
|
getIntersectionType(candidates.map(getReturnTypeOfSignature)),
|
|
70129
|
-
/*
|
|
70203
|
+
/*resolvedTypePredicate*/
|
|
70130
70204
|
void 0,
|
|
70131
70205
|
minArgumentCount,
|
|
70132
70206
|
flags
|
|
@@ -70247,7 +70321,7 @@ function createTypeChecker(host) {
|
|
|
70247
70321
|
if (isLineBreak(text.charCodeAt(skipTrivia(
|
|
70248
70322
|
text,
|
|
70249
70323
|
node.expression.end,
|
|
70250
|
-
/*
|
|
70324
|
+
/*stopAfterLineBreak*/
|
|
70251
70325
|
true
|
|
70252
70326
|
) - 1))) {
|
|
70253
70327
|
relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon);
|
|
@@ -70426,7 +70500,7 @@ function createTypeChecker(host) {
|
|
|
70426
70500
|
}
|
|
70427
70501
|
if (!hasSignatures) {
|
|
70428
70502
|
errorInfo = chainDiagnosticMessages(
|
|
70429
|
-
/*
|
|
70503
|
+
/*details*/
|
|
70430
70504
|
void 0,
|
|
70431
70505
|
isCall ? Diagnostics.No_constituent_of_type_0_is_callable : Diagnostics.No_constituent_of_type_0_is_constructable,
|
|
70432
70506
|
typeToString(apparentType)
|
|
@@ -70467,7 +70541,7 @@ function createTypeChecker(host) {
|
|
|
70467
70541
|
if (isCallExpression(errorTarget.parent)) {
|
|
70468
70542
|
const { start, length: length2 } = getDiagnosticSpanForCallNode(
|
|
70469
70543
|
errorTarget.parent,
|
|
70470
|
-
/*
|
|
70544
|
+
/*doNotIncludeArguments*/
|
|
70471
70545
|
true
|
|
70472
70546
|
);
|
|
70473
70547
|
diagnostic.start = start;
|
|
@@ -70575,10 +70649,10 @@ function createTypeChecker(host) {
|
|
|
70575
70649
|
[factory.createParameterDeclaration(
|
|
70576
70650
|
/*modifiers*/
|
|
70577
70651
|
void 0,
|
|
70578
|
-
/*
|
|
70652
|
+
/*dotDotDotToken*/
|
|
70579
70653
|
void 0,
|
|
70580
70654
|
"props",
|
|
70581
|
-
/*
|
|
70655
|
+
/*questionToken*/
|
|
70582
70656
|
void 0,
|
|
70583
70657
|
nodeBuilder.typeToTypeNode(result, node)
|
|
70584
70658
|
)],
|
|
@@ -70598,7 +70672,7 @@ function createTypeChecker(host) {
|
|
|
70598
70672
|
void 0,
|
|
70599
70673
|
[parameterSymbol],
|
|
70600
70674
|
typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,
|
|
70601
|
-
/*
|
|
70675
|
+
/*resolvedTypePredicate*/
|
|
70602
70676
|
void 0,
|
|
70603
70677
|
1,
|
|
70604
70678
|
0 /* None */
|
|
@@ -70659,7 +70733,7 @@ function createTypeChecker(host) {
|
|
|
70659
70733
|
case 283 /* JsxSelfClosingElement */:
|
|
70660
70734
|
return resolveJsxOpeningLikeElement(node, candidatesOutArray, checkMode);
|
|
70661
70735
|
}
|
|
70662
|
-
|
|
70736
|
+
Debug.assertNever(node, "Branch in 'resolveSignature' should be unreachable.");
|
|
70663
70737
|
}
|
|
70664
70738
|
function getResolvedSignature(node, candidatesOutArray, checkMode) {
|
|
70665
70739
|
const links = getNodeLinks(node);
|
|
@@ -70668,8 +70742,11 @@ function createTypeChecker(host) {
|
|
|
70668
70742
|
return cached;
|
|
70669
70743
|
}
|
|
70670
70744
|
links.resolvedSignature = resolvingSignature;
|
|
70671
|
-
|
|
70745
|
+
let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);
|
|
70672
70746
|
if (result !== resolvingSignature) {
|
|
70747
|
+
if (links.resolvedSignature !== resolvingSignature) {
|
|
70748
|
+
result = links.resolvedSignature;
|
|
70749
|
+
}
|
|
70673
70750
|
links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached;
|
|
70674
70751
|
}
|
|
70675
70752
|
return result;
|
|
@@ -70915,9 +70992,9 @@ function createTypeChecker(host) {
|
|
|
70915
70992
|
const esModuleSymbol = resolveESModuleSymbol(
|
|
70916
70993
|
moduleSymbol,
|
|
70917
70994
|
specifier,
|
|
70918
|
-
/*
|
|
70995
|
+
/*dontResolveAlias*/
|
|
70919
70996
|
true,
|
|
70920
|
-
/*
|
|
70997
|
+
/*suppressInteropError*/
|
|
70921
70998
|
false
|
|
70922
70999
|
);
|
|
70923
71000
|
if (esModuleSymbol) {
|
|
@@ -70987,7 +71064,7 @@ function createTypeChecker(host) {
|
|
|
70987
71064
|
function isCommonJsRequire(node) {
|
|
70988
71065
|
if (!isRequireCall(
|
|
70989
71066
|
node,
|
|
70990
|
-
/*
|
|
71067
|
+
/*requireStringLiteralLikeArgument*/
|
|
70991
71068
|
true
|
|
70992
71069
|
)) {
|
|
70993
71070
|
return false;
|
|
@@ -71028,14 +71105,14 @@ function createTypeChecker(host) {
|
|
|
71028
71105
|
checkDeprecatedSignature(signature, node);
|
|
71029
71106
|
return getReturnTypeOfSignature(signature);
|
|
71030
71107
|
}
|
|
71031
|
-
function checkAssertion(node) {
|
|
71108
|
+
function checkAssertion(node, checkMode) {
|
|
71032
71109
|
if (node.kind === 214 /* TypeAssertionExpression */) {
|
|
71033
71110
|
const file = getSourceFileOfNode(node);
|
|
71034
71111
|
if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) {
|
|
71035
71112
|
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
|
71036
71113
|
}
|
|
71037
71114
|
}
|
|
71038
|
-
return checkAssertionWorker(node,
|
|
71115
|
+
return checkAssertionWorker(node, checkMode);
|
|
71039
71116
|
}
|
|
71040
71117
|
function isValidConstAssertionArgument(node) {
|
|
71041
71118
|
switch (node.kind) {
|
|
@@ -71068,8 +71145,9 @@ function createTypeChecker(host) {
|
|
|
71068
71145
|
}
|
|
71069
71146
|
return false;
|
|
71070
71147
|
}
|
|
71071
|
-
function checkAssertionWorker(
|
|
71072
|
-
|
|
71148
|
+
function checkAssertionWorker(node, checkMode) {
|
|
71149
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
71150
|
+
const exprType = checkExpression(expression, checkMode);
|
|
71073
71151
|
if (isConstTypeReference(type)) {
|
|
71074
71152
|
if (!isValidConstAssertionArgument(expression)) {
|
|
71075
71153
|
error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
|
|
@@ -71077,7 +71155,29 @@ function createTypeChecker(host) {
|
|
|
71077
71155
|
return getRegularTypeOfLiteralType(exprType);
|
|
71078
71156
|
}
|
|
71079
71157
|
checkSourceElement(type);
|
|
71080
|
-
|
|
71158
|
+
checkNodeDeferred(node);
|
|
71159
|
+
return getTypeFromTypeNode(type);
|
|
71160
|
+
}
|
|
71161
|
+
function getAssertionTypeAndExpression(node) {
|
|
71162
|
+
let type;
|
|
71163
|
+
let expression;
|
|
71164
|
+
switch (node.kind) {
|
|
71165
|
+
case 232 /* AsExpression */:
|
|
71166
|
+
case 214 /* TypeAssertionExpression */:
|
|
71167
|
+
type = node.type;
|
|
71168
|
+
expression = node.expression;
|
|
71169
|
+
break;
|
|
71170
|
+
case 215 /* ParenthesizedExpression */:
|
|
71171
|
+
type = getJSDocTypeAssertionType(node);
|
|
71172
|
+
expression = node.expression;
|
|
71173
|
+
break;
|
|
71174
|
+
}
|
|
71175
|
+
return { type, expression };
|
|
71176
|
+
}
|
|
71177
|
+
function checkAssertionDeferred(node) {
|
|
71178
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
71179
|
+
const errNode = isParenthesizedExpression(node) ? type : node;
|
|
71180
|
+
const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(checkExpression(expression)));
|
|
71081
71181
|
const targetType = getTypeFromTypeNode(type);
|
|
71082
71182
|
if (!isErrorType(targetType)) {
|
|
71083
71183
|
addLazyDiagnostic(() => {
|
|
@@ -71092,7 +71192,6 @@ function createTypeChecker(host) {
|
|
|
71092
71192
|
}
|
|
71093
71193
|
});
|
|
71094
71194
|
}
|
|
71095
|
-
return targetType;
|
|
71096
71195
|
}
|
|
71097
71196
|
function checkNonNullChain(node) {
|
|
71098
71197
|
const leftType = checkExpression(node.expression);
|
|
@@ -71144,7 +71243,14 @@ function createTypeChecker(host) {
|
|
|
71144
71243
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
71145
71244
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
71146
71245
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
71147
|
-
const result3 = createAnonymousType(
|
|
71246
|
+
const result3 = createAnonymousType(
|
|
71247
|
+
/*symbol*/
|
|
71248
|
+
void 0,
|
|
71249
|
+
resolved.members,
|
|
71250
|
+
callSignatures,
|
|
71251
|
+
constructSignatures,
|
|
71252
|
+
resolved.indexInfos
|
|
71253
|
+
);
|
|
71148
71254
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
71149
71255
|
result3.node = node;
|
|
71150
71256
|
return result3;
|
|
@@ -71333,12 +71439,12 @@ function createTypeChecker(host) {
|
|
|
71333
71439
|
}
|
|
71334
71440
|
return void 0;
|
|
71335
71441
|
}
|
|
71336
|
-
function getRestTypeAtPosition(source, pos
|
|
71442
|
+
function getRestTypeAtPosition(source, pos) {
|
|
71337
71443
|
const parameterCount = getParameterCount(source);
|
|
71338
71444
|
const minArgumentCount = getMinArgumentCount(source);
|
|
71339
71445
|
const restType = getEffectiveRestType(source);
|
|
71340
71446
|
if (restType && pos >= parameterCount - 1) {
|
|
71341
|
-
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType)
|
|
71447
|
+
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType));
|
|
71342
71448
|
}
|
|
71343
71449
|
const types = [];
|
|
71344
71450
|
const flags = [];
|
|
@@ -71356,7 +71462,13 @@ function createTypeChecker(host) {
|
|
|
71356
71462
|
names.push(name);
|
|
71357
71463
|
}
|
|
71358
71464
|
}
|
|
71359
|
-
return createTupleType(
|
|
71465
|
+
return createTupleType(
|
|
71466
|
+
types,
|
|
71467
|
+
flags,
|
|
71468
|
+
/*readonly*/
|
|
71469
|
+
false,
|
|
71470
|
+
length(names) === length(types) ? names : void 0
|
|
71471
|
+
);
|
|
71360
71472
|
}
|
|
71361
71473
|
function getParameterCount(signature) {
|
|
71362
71474
|
const length2 = signature.parameters.length;
|
|
@@ -71586,13 +71698,13 @@ function createTypeChecker(host) {
|
|
|
71586
71698
|
}
|
|
71587
71699
|
function createClassAccessorDecoratorTargetType(thisType, valueType) {
|
|
71588
71700
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorTargetType(
|
|
71589
|
-
/*
|
|
71701
|
+
/*reportErrors*/
|
|
71590
71702
|
true
|
|
71591
71703
|
), [thisType, valueType]);
|
|
71592
71704
|
}
|
|
71593
71705
|
function createClassAccessorDecoratorResultType(thisType, valueType) {
|
|
71594
71706
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorResultType(
|
|
71595
|
-
/*
|
|
71707
|
+
/*reportErrors*/
|
|
71596
71708
|
true
|
|
71597
71709
|
), [thisType, valueType]);
|
|
71598
71710
|
}
|
|
@@ -72110,8 +72222,11 @@ function createTypeChecker(host) {
|
|
|
72110
72222
|
}
|
|
72111
72223
|
const returnType = getReturnTypeFromBody(node, checkMode);
|
|
72112
72224
|
const returnOnlySignature = createSignature(
|
|
72225
|
+
/*declaration*/
|
|
72113
72226
|
void 0,
|
|
72227
|
+
/*typeParameters*/
|
|
72114
72228
|
void 0,
|
|
72229
|
+
/*thisParameter*/
|
|
72115
72230
|
void 0,
|
|
72116
72231
|
emptyArray,
|
|
72117
72232
|
returnType,
|
|
@@ -73159,6 +73274,7 @@ function createTypeChecker(host) {
|
|
|
73159
73274
|
prop.valueDeclaration,
|
|
73160
73275
|
name,
|
|
73161
73276
|
788968 /* Type */,
|
|
73277
|
+
/*nameNotFoundMessage*/
|
|
73162
73278
|
void 0,
|
|
73163
73279
|
name,
|
|
73164
73280
|
/*isUse*/
|
|
@@ -73765,7 +73881,7 @@ function createTypeChecker(host) {
|
|
|
73765
73881
|
}
|
|
73766
73882
|
if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall(
|
|
73767
73883
|
expr,
|
|
73768
|
-
/*
|
|
73884
|
+
/*requireStringLiteralLikeArgument*/
|
|
73769
73885
|
true
|
|
73770
73886
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
73771
73887
|
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
@@ -73825,8 +73941,7 @@ function createTypeChecker(host) {
|
|
|
73825
73941
|
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
73826
73942
|
}
|
|
73827
73943
|
if (isJSDocTypeAssertion(node)) {
|
|
73828
|
-
|
|
73829
|
-
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
73944
|
+
return checkAssertionWorker(node, checkMode);
|
|
73830
73945
|
}
|
|
73831
73946
|
}
|
|
73832
73947
|
return checkExpression(node.expression, checkMode);
|
|
@@ -73901,7 +74016,7 @@ function createTypeChecker(host) {
|
|
|
73901
74016
|
return checkTypeOfExpression(node);
|
|
73902
74017
|
case 214 /* TypeAssertionExpression */:
|
|
73903
74018
|
case 232 /* AsExpression */:
|
|
73904
|
-
return checkAssertion(node);
|
|
74019
|
+
return checkAssertion(node, checkMode);
|
|
73905
74020
|
case 233 /* NonNullExpression */:
|
|
73906
74021
|
return checkNonNullAssertion(node);
|
|
73907
74022
|
case 231 /* ExpressionWithTypeArguments */:
|
|
@@ -75418,7 +75533,7 @@ function createTypeChecker(host) {
|
|
|
75418
75533
|
void 0,
|
|
75419
75534
|
/*nameArg*/
|
|
75420
75535
|
void 0,
|
|
75421
|
-
/*
|
|
75536
|
+
/*isUse*/
|
|
75422
75537
|
true
|
|
75423
75538
|
);
|
|
75424
75539
|
if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */) {
|
|
@@ -76162,7 +76277,7 @@ function createTypeChecker(host) {
|
|
|
76162
76277
|
node,
|
|
76163
76278
|
node.name.escapedText,
|
|
76164
76279
|
3 /* Variable */,
|
|
76165
|
-
/*
|
|
76280
|
+
/*nameNotFoundMessage*/
|
|
76166
76281
|
void 0,
|
|
76167
76282
|
/*nameArg*/
|
|
76168
76283
|
void 0,
|
|
@@ -76980,12 +77095,12 @@ function createTypeChecker(host) {
|
|
|
76980
77095
|
const suggestAwait = (
|
|
76981
77096
|
// for (const x of Promise<...>) or [...Promise<...>]
|
|
76982
77097
|
!!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType(
|
|
76983
|
-
|
|
77098
|
+
/*reportErrors*/
|
|
76984
77099
|
false
|
|
76985
77100
|
) !== emptyGenericType && isTypeAssignableTo(
|
|
76986
77101
|
type,
|
|
76987
77102
|
getGlobalAsyncIterableType(
|
|
76988
|
-
|
|
77103
|
+
/*reportErrors*/
|
|
76989
77104
|
false
|
|
76990
77105
|
)
|
|
76991
77106
|
)
|
|
@@ -77853,7 +77968,7 @@ function createTypeChecker(host) {
|
|
|
77853
77968
|
type,
|
|
77854
77969
|
typeWithThis,
|
|
77855
77970
|
param,
|
|
77856
|
-
/*
|
|
77971
|
+
/*memberIsParameterProperty*/
|
|
77857
77972
|
true
|
|
77858
77973
|
);
|
|
77859
77974
|
}
|
|
@@ -77867,7 +77982,7 @@ function createTypeChecker(host) {
|
|
|
77867
77982
|
type,
|
|
77868
77983
|
typeWithThis,
|
|
77869
77984
|
member,
|
|
77870
|
-
/*
|
|
77985
|
+
/*memberIsParameterProperty*/
|
|
77871
77986
|
false
|
|
77872
77987
|
);
|
|
77873
77988
|
}
|
|
@@ -77971,7 +78086,7 @@ function createTypeChecker(host) {
|
|
|
77971
78086
|
getTypeOfSymbol(prop),
|
|
77972
78087
|
getTypeOfSymbol(baseProp),
|
|
77973
78088
|
member.name || member,
|
|
77974
|
-
/*
|
|
78089
|
+
/*headMessage*/
|
|
77975
78090
|
void 0,
|
|
77976
78091
|
rootChain
|
|
77977
78092
|
)) {
|
|
@@ -78019,7 +78134,7 @@ function createTypeChecker(host) {
|
|
|
78019
78134
|
memberHasOverrideModifier,
|
|
78020
78135
|
hasAbstractModifier(member),
|
|
78021
78136
|
isStatic(member),
|
|
78022
|
-
/*
|
|
78137
|
+
/*memberIsParameterProperty*/
|
|
78023
78138
|
false,
|
|
78024
78139
|
symbolName(memberSymbol)
|
|
78025
78140
|
);
|
|
@@ -79487,6 +79602,10 @@ function createTypeChecker(host) {
|
|
|
79487
79602
|
case 282 /* JsxElement */:
|
|
79488
79603
|
checkJsxElementDeferred(node);
|
|
79489
79604
|
break;
|
|
79605
|
+
case 214 /* TypeAssertionExpression */:
|
|
79606
|
+
case 232 /* AsExpression */:
|
|
79607
|
+
case 215 /* ParenthesizedExpression */:
|
|
79608
|
+
checkAssertionDeferred(node);
|
|
79490
79609
|
}
|
|
79491
79610
|
currentNode = saveCurrentNode;
|
|
79492
79611
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -79849,7 +79968,12 @@ function createTypeChecker(host) {
|
|
|
79849
79968
|
meaning = 1920 /* Namespace */;
|
|
79850
79969
|
}
|
|
79851
79970
|
meaning |= 2097152 /* Alias */;
|
|
79852
|
-
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
79971
|
+
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
79972
|
+
name,
|
|
79973
|
+
meaning,
|
|
79974
|
+
/*ignoreErrors*/
|
|
79975
|
+
true
|
|
79976
|
+
) : void 0;
|
|
79853
79977
|
if (entityNameSymbol) {
|
|
79854
79978
|
return entityNameSymbol;
|
|
79855
79979
|
}
|
|
@@ -79878,7 +80002,7 @@ function createTypeChecker(host) {
|
|
|
79878
80002
|
meaning,
|
|
79879
80003
|
/*ignoreErrors*/
|
|
79880
80004
|
false,
|
|
79881
|
-
/*
|
|
80005
|
+
/*dontResolveAlias*/
|
|
79882
80006
|
true,
|
|
79883
80007
|
getHostSignatureFromJSDoc(name)
|
|
79884
80008
|
);
|
|
@@ -79901,7 +80025,7 @@ function createTypeChecker(host) {
|
|
|
79901
80025
|
meaning,
|
|
79902
80026
|
/*ignoreErrors*/
|
|
79903
80027
|
true,
|
|
79904
|
-
/*
|
|
80028
|
+
/*dontResolveAlias*/
|
|
79905
80029
|
true,
|
|
79906
80030
|
getSourceFileOfNode(container)
|
|
79907
80031
|
) || result;
|
|
@@ -80074,7 +80198,7 @@ function createTypeChecker(host) {
|
|
|
80074
80198
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
80075
80199
|
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(
|
|
80076
80200
|
node.parent,
|
|
80077
|
-
/*
|
|
80201
|
+
/*requireStringLiteralLikeArgument*/
|
|
80078
80202
|
false
|
|
80079
80203
|
) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) {
|
|
80080
80204
|
return resolveExternalModuleName(node, node, ignoreErrors);
|
|
@@ -80688,7 +80812,7 @@ function createTypeChecker(host) {
|
|
|
80688
80812
|
location,
|
|
80689
80813
|
reference.escapedText,
|
|
80690
80814
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
80691
|
-
/*
|
|
80815
|
+
/*nameNotFoundMessage*/
|
|
80692
80816
|
void 0,
|
|
80693
80817
|
/*nameArg*/
|
|
80694
80818
|
void 0,
|
|
@@ -80705,7 +80829,7 @@ function createTypeChecker(host) {
|
|
|
80705
80829
|
reference,
|
|
80706
80830
|
reference.escapedText,
|
|
80707
80831
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
80708
|
-
/*
|
|
80832
|
+
/*nameNotFoundMessage*/
|
|
80709
80833
|
void 0,
|
|
80710
80834
|
/*nameArg*/
|
|
80711
80835
|
void 0,
|
|
@@ -81122,7 +81246,14 @@ function createTypeChecker(host) {
|
|
|
81122
81246
|
anyArrayType = createArrayType(anyType);
|
|
81123
81247
|
autoArrayType = createArrayType(autoType);
|
|
81124
81248
|
if (autoArrayType === emptyObjectType) {
|
|
81125
|
-
autoArrayType = createAnonymousType(
|
|
81249
|
+
autoArrayType = createAnonymousType(
|
|
81250
|
+
/*symbol*/
|
|
81251
|
+
void 0,
|
|
81252
|
+
emptySymbols,
|
|
81253
|
+
emptyArray,
|
|
81254
|
+
emptyArray,
|
|
81255
|
+
emptyArray
|
|
81256
|
+
);
|
|
81126
81257
|
}
|
|
81127
81258
|
globalReadonlyArrayType = getGlobalTypeOrUndefined(
|
|
81128
81259
|
"ReadonlyArray",
|
|
@@ -81934,7 +82065,7 @@ function createTypeChecker(host) {
|
|
|
81934
82065
|
currentKind = 2 /* SetAccessor */;
|
|
81935
82066
|
break;
|
|
81936
82067
|
default:
|
|
81937
|
-
|
|
82068
|
+
Debug.assertNever(prop, "Unexpected syntax kind:" + prop.kind);
|
|
81938
82069
|
}
|
|
81939
82070
|
if (!inDestructuring) {
|
|
81940
82071
|
const effectiveName = getEffectivePropertyNameForPropertyNameNode(name);
|
|
@@ -82240,7 +82371,7 @@ function createTypeChecker(host) {
|
|
|
82240
82371
|
if (node.label && current.label.escapedText === node.label.escapedText) {
|
|
82241
82372
|
const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement(
|
|
82242
82373
|
current.statement,
|
|
82243
|
-
/*
|
|
82374
|
+
/*lookInLabeledStatements*/
|
|
82244
82375
|
true
|
|
82245
82376
|
);
|
|
82246
82377
|
if (isMisplacedContinueLabel) {
|
|
@@ -82257,7 +82388,7 @@ function createTypeChecker(host) {
|
|
|
82257
82388
|
default:
|
|
82258
82389
|
if (isIterationStatement(
|
|
82259
82390
|
current,
|
|
82260
|
-
/*
|
|
82391
|
+
/*lookInLabeledStatements*/
|
|
82261
82392
|
false
|
|
82262
82393
|
) && !node.label) {
|
|
82263
82394
|
return false;
|
|
@@ -85865,7 +85996,7 @@ function transformTypeScript(context) {
|
|
|
85865
85996
|
let facts = 0 /* None */;
|
|
85866
85997
|
if (some(getProperties(
|
|
85867
85998
|
node,
|
|
85868
|
-
/*
|
|
85999
|
+
/*requireInitializer*/
|
|
85869
86000
|
true,
|
|
85870
86001
|
/*isStatic*/
|
|
85871
86002
|
true
|
|
@@ -87735,10 +87866,10 @@ function transformClassFields(context) {
|
|
|
87735
87866
|
filter(node.modifiers, (m) => isModifier(m) && !isStaticModifier(m) && !isAccessorModifier(m)),
|
|
87736
87867
|
node.asteriskToken,
|
|
87737
87868
|
functionName,
|
|
87738
|
-
/*
|
|
87869
|
+
/*typeParameters*/
|
|
87739
87870
|
void 0,
|
|
87740
87871
|
visitParameterList(node.parameters, visitor, context),
|
|
87741
|
-
/*
|
|
87872
|
+
/*type*/
|
|
87742
87873
|
void 0,
|
|
87743
87874
|
visitFunctionBody(node.body, visitor, context)
|
|
87744
87875
|
)
|
|
@@ -88343,7 +88474,7 @@ function transformClassFields(context) {
|
|
|
88343
88474
|
info.brandCheckIdentifier,
|
|
88344
88475
|
right,
|
|
88345
88476
|
info.kind,
|
|
88346
|
-
/*
|
|
88477
|
+
/*f*/
|
|
88347
88478
|
void 0
|
|
88348
88479
|
);
|
|
88349
88480
|
case "f" /* Field */:
|
|
@@ -88415,7 +88546,7 @@ function transformClassFields(context) {
|
|
|
88415
88546
|
if (facts & 4 /* NeedsClassSuperReference */) {
|
|
88416
88547
|
const temp = factory2.createTempVariable(
|
|
88417
88548
|
hoistVariableDeclaration,
|
|
88418
|
-
/*
|
|
88549
|
+
/*reservedInNestedScopes*/
|
|
88419
88550
|
true
|
|
88420
88551
|
);
|
|
88421
88552
|
getClassLexicalEnvironment().superClassReference = temp;
|
|
@@ -89248,7 +89379,7 @@ function transformClassFields(context) {
|
|
|
89248
89379
|
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(
|
|
89249
89380
|
/*recordTempVariable*/
|
|
89250
89381
|
void 0,
|
|
89251
|
-
/*
|
|
89382
|
+
/*reservedInNestedScopes*/
|
|
89252
89383
|
true,
|
|
89253
89384
|
prefix,
|
|
89254
89385
|
suffix
|
|
@@ -89954,11 +90085,11 @@ function transformLegacyDecorators(context) {
|
|
|
89954
90085
|
}
|
|
89955
90086
|
function visitClassDeclaration(node) {
|
|
89956
90087
|
if (!(classOrConstructorParameterIsDecorated(
|
|
89957
|
-
/*
|
|
90088
|
+
/*useLegacyDecorators*/
|
|
89958
90089
|
true,
|
|
89959
90090
|
node
|
|
89960
90091
|
) || childIsDecorated(
|
|
89961
|
-
/*
|
|
90092
|
+
/*useLegacyDecorators*/
|
|
89962
90093
|
true,
|
|
89963
90094
|
node
|
|
89964
90095
|
))) {
|
|
@@ -90213,7 +90344,7 @@ function transformLegacyDecorators(context) {
|
|
|
90213
90344
|
}
|
|
90214
90345
|
function isDecoratedClassElement(member, isStaticElement, parent) {
|
|
90215
90346
|
return nodeOrChildIsDecorated(
|
|
90216
|
-
/*
|
|
90347
|
+
/*useLegacyDecorators*/
|
|
90217
90348
|
true,
|
|
90218
90349
|
member,
|
|
90219
90350
|
parent
|
|
@@ -90565,7 +90696,7 @@ function transformESDecorators(context) {
|
|
|
90565
90696
|
case 223 /* PostfixUnaryExpression */:
|
|
90566
90697
|
return visitPreOrPostfixUnaryExpression(
|
|
90567
90698
|
node,
|
|
90568
|
-
/*
|
|
90699
|
+
/*discarded*/
|
|
90569
90700
|
false
|
|
90570
90701
|
);
|
|
90571
90702
|
case 209 /* PropertyAccessExpression */:
|
|
@@ -90716,7 +90847,7 @@ function transformESDecorators(context) {
|
|
|
90716
90847
|
let hasStaticPrivateClassElements = false;
|
|
90717
90848
|
for (const member of node.members) {
|
|
90718
90849
|
if (isNamedClassElement(member) && nodeOrChildIsDecorated(
|
|
90719
|
-
/*
|
|
90850
|
+
/*useLegacyDecorators*/
|
|
90720
90851
|
false,
|
|
90721
90852
|
member,
|
|
90722
90853
|
node
|
|
@@ -90955,7 +91086,7 @@ function transformESDecorators(context) {
|
|
|
90955
91086
|
if (leadingBlockStatements) {
|
|
90956
91087
|
const leadingStaticBlockBody = factory2.createBlock(
|
|
90957
91088
|
leadingBlockStatements,
|
|
90958
|
-
/*
|
|
91089
|
+
/*multiLine*/
|
|
90959
91090
|
true
|
|
90960
91091
|
);
|
|
90961
91092
|
const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody);
|
|
@@ -90970,7 +91101,7 @@ function transformESDecorators(context) {
|
|
|
90970
91101
|
if (trailingBlockStatements) {
|
|
90971
91102
|
const trailingStaticBlockBody = factory2.createBlock(
|
|
90972
91103
|
trailingBlockStatements,
|
|
90973
|
-
/*
|
|
91104
|
+
/*multiLine*/
|
|
90974
91105
|
true
|
|
90975
91106
|
);
|
|
90976
91107
|
const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody);
|
|
@@ -91036,11 +91167,11 @@ function transformESDecorators(context) {
|
|
|
91036
91167
|
}
|
|
91037
91168
|
function isDecoratedClassLike(node) {
|
|
91038
91169
|
return classOrConstructorParameterIsDecorated(
|
|
91039
|
-
/*
|
|
91170
|
+
/*useLegacyDecorators*/
|
|
91040
91171
|
false,
|
|
91041
91172
|
node
|
|
91042
91173
|
) || childIsDecorated(
|
|
91043
|
-
/*
|
|
91174
|
+
/*useLegacyDecorators*/
|
|
91044
91175
|
false,
|
|
91045
91176
|
node
|
|
91046
91177
|
);
|
|
@@ -92720,15 +92851,15 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92720
92851
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
92721
92852
|
"get",
|
|
92722
92853
|
factory2.createArrowFunction(
|
|
92723
|
-
/*
|
|
92854
|
+
/*modifiers*/
|
|
92724
92855
|
void 0,
|
|
92725
|
-
/*
|
|
92856
|
+
/*typeParameters*/
|
|
92726
92857
|
void 0,
|
|
92727
92858
|
/* parameters */
|
|
92728
92859
|
[],
|
|
92729
|
-
/*
|
|
92860
|
+
/*type*/
|
|
92730
92861
|
void 0,
|
|
92731
|
-
/*
|
|
92862
|
+
/*equalsGreaterThanToken*/
|
|
92732
92863
|
void 0,
|
|
92733
92864
|
setEmitFlags(
|
|
92734
92865
|
factory2.createPropertyAccessExpression(
|
|
@@ -92747,29 +92878,29 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92747
92878
|
factory2.createPropertyAssignment(
|
|
92748
92879
|
"set",
|
|
92749
92880
|
factory2.createArrowFunction(
|
|
92750
|
-
/*
|
|
92881
|
+
/*modifiers*/
|
|
92751
92882
|
void 0,
|
|
92752
|
-
/*
|
|
92883
|
+
/*typeParameters*/
|
|
92753
92884
|
void 0,
|
|
92754
92885
|
/* parameters */
|
|
92755
92886
|
[
|
|
92756
92887
|
factory2.createParameterDeclaration(
|
|
92757
|
-
/*
|
|
92888
|
+
/*modifiers*/
|
|
92758
92889
|
void 0,
|
|
92759
|
-
/*
|
|
92890
|
+
/*dotDotDotToken*/
|
|
92760
92891
|
void 0,
|
|
92761
92892
|
"v",
|
|
92762
|
-
/*
|
|
92893
|
+
/*questionToken*/
|
|
92763
92894
|
void 0,
|
|
92764
|
-
/*
|
|
92895
|
+
/*type*/
|
|
92765
92896
|
void 0,
|
|
92766
|
-
/*
|
|
92897
|
+
/*initializer*/
|
|
92767
92898
|
void 0
|
|
92768
92899
|
)
|
|
92769
92900
|
],
|
|
92770
|
-
/*
|
|
92901
|
+
/*type*/
|
|
92771
92902
|
void 0,
|
|
92772
|
-
/*
|
|
92903
|
+
/*equalsGreaterThanToken*/
|
|
92773
92904
|
void 0,
|
|
92774
92905
|
factory2.createAssignment(
|
|
92775
92906
|
setEmitFlags(
|
|
@@ -92796,7 +92927,7 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92796
92927
|
);
|
|
92797
92928
|
});
|
|
92798
92929
|
return factory2.createVariableStatement(
|
|
92799
|
-
/*
|
|
92930
|
+
/*modifiers*/
|
|
92800
92931
|
void 0,
|
|
92801
92932
|
factory2.createVariableDeclarationList(
|
|
92802
92933
|
[
|
|
@@ -92804,20 +92935,20 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92804
92935
|
factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
92805
92936
|
/*exclamationToken*/
|
|
92806
92937
|
void 0,
|
|
92807
|
-
/*
|
|
92938
|
+
/*type*/
|
|
92808
92939
|
void 0,
|
|
92809
92940
|
factory2.createCallExpression(
|
|
92810
92941
|
factory2.createPropertyAccessExpression(
|
|
92811
92942
|
factory2.createIdentifier("Object"),
|
|
92812
92943
|
"create"
|
|
92813
92944
|
),
|
|
92814
|
-
/*
|
|
92945
|
+
/*typeArguments*/
|
|
92815
92946
|
void 0,
|
|
92816
92947
|
[
|
|
92817
92948
|
factory2.createNull(),
|
|
92818
92949
|
factory2.createObjectLiteralExpression(
|
|
92819
92950
|
accessors,
|
|
92820
|
-
/*
|
|
92951
|
+
/*multiLine*/
|
|
92821
92952
|
true
|
|
92822
92953
|
)
|
|
92823
92954
|
]
|
|
@@ -93689,7 +93820,7 @@ function transformES2018(context) {
|
|
|
93689
93820
|
enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,
|
|
93690
93821
|
visitNode(node.name, visitor, isPropertyName),
|
|
93691
93822
|
visitNode(
|
|
93692
|
-
/*
|
|
93823
|
+
/*node*/
|
|
93693
93824
|
void 0,
|
|
93694
93825
|
visitor,
|
|
93695
93826
|
isQuestionToken
|
|
@@ -93915,7 +94046,7 @@ function transformES2018(context) {
|
|
|
93915
94046
|
context,
|
|
93916
94047
|
1 /* ObjectRest */,
|
|
93917
94048
|
factory2.getGeneratedNameForNode(parameter),
|
|
93918
|
-
/*
|
|
94049
|
+
/*hoistTempVariables*/
|
|
93919
94050
|
false,
|
|
93920
94051
|
/*skipInitializer*/
|
|
93921
94052
|
true
|
|
@@ -94458,7 +94589,7 @@ function transformJsx(context) {
|
|
|
94458
94589
|
}
|
|
94459
94590
|
const declaration = factory2.createVariableDeclaration(
|
|
94460
94591
|
factory2.createUniqueName("_jsxFileName", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
94461
|
-
/*
|
|
94592
|
+
/*exclamationToken*/
|
|
94462
94593
|
void 0,
|
|
94463
94594
|
/*type*/
|
|
94464
94595
|
void 0,
|
|
@@ -94527,7 +94658,7 @@ function transformJsx(context) {
|
|
|
94527
94658
|
/*modifiers*/
|
|
94528
94659
|
void 0,
|
|
94529
94660
|
factory2.createImportClause(
|
|
94530
|
-
/*
|
|
94661
|
+
/*isTypeOnly*/
|
|
94531
94662
|
false,
|
|
94532
94663
|
/*name*/
|
|
94533
94664
|
void 0,
|
|
@@ -94550,12 +94681,12 @@ function transformJsx(context) {
|
|
|
94550
94681
|
factory2.createVariableDeclarationList([
|
|
94551
94682
|
factory2.createVariableDeclaration(
|
|
94552
94683
|
factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement(
|
|
94553
|
-
/*
|
|
94684
|
+
/*dotDotDotToken*/
|
|
94554
94685
|
void 0,
|
|
94555
94686
|
s.propertyName,
|
|
94556
94687
|
s.name
|
|
94557
94688
|
))),
|
|
94558
|
-
/*
|
|
94689
|
+
/*exclamationToken*/
|
|
94559
94690
|
void 0,
|
|
94560
94691
|
/*type*/
|
|
94561
94692
|
void 0,
|
|
@@ -96872,7 +97003,7 @@ function transformES2015(context) {
|
|
|
96872
97003
|
visitor,
|
|
96873
97004
|
context,
|
|
96874
97005
|
0 /* All */,
|
|
96875
|
-
/*
|
|
97006
|
+
/*rval*/
|
|
96876
97007
|
void 0,
|
|
96877
97008
|
(ancestorFacts & 32 /* ExportedVariableStatement */) !== 0
|
|
96878
97009
|
);
|
|
@@ -101235,7 +101366,7 @@ function transformModule(context) {
|
|
|
101235
101366
|
/*whenTrue*/
|
|
101236
101367
|
createImportCallExpressionCommonJS(
|
|
101237
101368
|
temp,
|
|
101238
|
-
/*
|
|
101369
|
+
/*isInlineable*/
|
|
101239
101370
|
true
|
|
101240
101371
|
),
|
|
101241
101372
|
/*colonToken*/
|
|
@@ -101671,9 +101802,9 @@ function transformModule(context) {
|
|
|
101671
101802
|
createExportExpression(
|
|
101672
101803
|
factory2.getExportName(specifier),
|
|
101673
101804
|
exportedValue,
|
|
101674
|
-
/*
|
|
101805
|
+
/*location*/
|
|
101675
101806
|
void 0,
|
|
101676
|
-
/*
|
|
101807
|
+
/*liveBinding*/
|
|
101677
101808
|
true
|
|
101678
101809
|
)
|
|
101679
101810
|
),
|
|
@@ -101983,7 +102114,7 @@ function transformModule(context) {
|
|
|
101983
102114
|
statements = appendExportsOfDeclaration(
|
|
101984
102115
|
statements,
|
|
101985
102116
|
importBinding,
|
|
101986
|
-
/*
|
|
102117
|
+
/*liveBinding*/
|
|
101987
102118
|
true
|
|
101988
102119
|
);
|
|
101989
102120
|
}
|
|
@@ -102052,7 +102183,7 @@ function transformModule(context) {
|
|
|
102052
102183
|
name,
|
|
102053
102184
|
/*location*/
|
|
102054
102185
|
exportSpecifier.name,
|
|
102055
|
-
/*
|
|
102186
|
+
/*allowComments*/
|
|
102056
102187
|
void 0,
|
|
102057
102188
|
liveBinding
|
|
102058
102189
|
);
|
|
@@ -102096,7 +102227,7 @@ function transformModule(context) {
|
|
|
102096
102227
|
const statement = setTextRange(factory2.createExpressionStatement(createExportExpression(
|
|
102097
102228
|
name,
|
|
102098
102229
|
value,
|
|
102099
|
-
/*
|
|
102230
|
+
/*location*/
|
|
102100
102231
|
void 0,
|
|
102101
102232
|
liveBinding
|
|
102102
102233
|
)), location);
|
|
@@ -102571,7 +102702,7 @@ function transformSystemModule(context) {
|
|
|
102571
102702
|
void 0,
|
|
102572
102703
|
factory2.createObjectLiteralExpression(
|
|
102573
102704
|
exportedNames,
|
|
102574
|
-
/*
|
|
102705
|
+
/*multiLine*/
|
|
102575
102706
|
true
|
|
102576
102707
|
)
|
|
102577
102708
|
)
|
|
@@ -102663,7 +102794,7 @@ function transformSystemModule(context) {
|
|
|
102663
102794
|
)
|
|
102664
102795
|
)
|
|
102665
102796
|
],
|
|
102666
|
-
/*
|
|
102797
|
+
/*multiLine*/
|
|
102667
102798
|
true
|
|
102668
102799
|
)
|
|
102669
102800
|
);
|
|
@@ -102728,7 +102859,7 @@ function transformSystemModule(context) {
|
|
|
102728
102859
|
void 0,
|
|
102729
102860
|
[factory2.createObjectLiteralExpression(
|
|
102730
102861
|
properties,
|
|
102731
|
-
/*
|
|
102862
|
+
/*multiLine*/
|
|
102732
102863
|
true
|
|
102733
102864
|
)]
|
|
102734
102865
|
)
|
|
@@ -104261,18 +104392,18 @@ function isInternalDeclaration(node, currentSourceFile) {
|
|
|
104261
104392
|
getTrailingCommentRanges(text, skipTrivia(
|
|
104262
104393
|
text,
|
|
104263
104394
|
previousSibling.end + 1,
|
|
104264
|
-
/*
|
|
104395
|
+
/*stopAfterLineBreak*/
|
|
104265
104396
|
false,
|
|
104266
|
-
/*
|
|
104397
|
+
/*stopAtComments*/
|
|
104267
104398
|
true
|
|
104268
104399
|
)),
|
|
104269
104400
|
getLeadingCommentRanges(text, node.pos)
|
|
104270
104401
|
) : getTrailingCommentRanges(text, skipTrivia(
|
|
104271
104402
|
text,
|
|
104272
104403
|
node.pos,
|
|
104273
|
-
/*
|
|
104404
|
+
/*stopAfterLineBreak*/
|
|
104274
104405
|
false,
|
|
104275
|
-
/*
|
|
104406
|
+
/*stopAtComments*/
|
|
104276
104407
|
true
|
|
104277
104408
|
));
|
|
104278
104409
|
return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile);
|
|
@@ -104388,7 +104519,7 @@ function transformDeclarations(context) {
|
|
|
104388
104519
|
symbol,
|
|
104389
104520
|
enclosingDeclaration2,
|
|
104390
104521
|
meaning,
|
|
104391
|
-
/*
|
|
104522
|
+
/*shouldComputeAliasToMarkVisible*/
|
|
104392
104523
|
true
|
|
104393
104524
|
));
|
|
104394
104525
|
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
|
|
@@ -104734,7 +104865,7 @@ function transformDeclarations(context) {
|
|
|
104734
104865
|
return factory2.updateBindingElement(
|
|
104735
104866
|
elem,
|
|
104736
104867
|
elem.dotDotDotToken,
|
|
104737
|
-
/*
|
|
104868
|
+
/*propertyName*/
|
|
104738
104869
|
void 0,
|
|
104739
104870
|
elem.propertyName,
|
|
104740
104871
|
shouldPrintWithInitializer(elem) ? elem.initializer : void 0
|
|
@@ -105096,7 +105227,7 @@ function transformDeclarations(context) {
|
|
|
105096
105227
|
return cleanup(factory2.createPropertyDeclaration(
|
|
105097
105228
|
ensureModifiers(input),
|
|
105098
105229
|
input.name,
|
|
105099
|
-
/*
|
|
105230
|
+
/*questionOrExclamationToken*/
|
|
105100
105231
|
void 0,
|
|
105101
105232
|
/*type*/
|
|
105102
105233
|
void 0,
|
|
@@ -105660,7 +105791,7 @@ function transformDeclarations(context) {
|
|
|
105660
105791
|
elems.push(factory2.createPropertyDeclaration(
|
|
105661
105792
|
ensureModifiers(param),
|
|
105662
105793
|
elem.name,
|
|
105663
|
-
/*
|
|
105794
|
+
/*questionOrExclamationToken*/
|
|
105664
105795
|
void 0,
|
|
105665
105796
|
ensureType(
|
|
105666
105797
|
elem,
|
|
@@ -105682,7 +105813,7 @@ function transformDeclarations(context) {
|
|
|
105682
105813
|
/*modifiers*/
|
|
105683
105814
|
void 0,
|
|
105684
105815
|
factory2.createPrivateIdentifier("#private"),
|
|
105685
|
-
/*
|
|
105816
|
+
/*questionOrExclamationToken*/
|
|
105686
105817
|
void 0,
|
|
105687
105818
|
/*type*/
|
|
105688
105819
|
void 0,
|
|
@@ -107084,7 +107215,7 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
107084
107215
|
declarationMapText,
|
|
107085
107216
|
buildInfoPath,
|
|
107086
107217
|
buildInfo,
|
|
107087
|
-
/*
|
|
107218
|
+
/*oldFileOfCurrentEmit*/
|
|
107088
107219
|
true
|
|
107089
107220
|
);
|
|
107090
107221
|
const outputFiles = [];
|
|
@@ -107277,7 +107408,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107277
107408
|
writeBundle(
|
|
107278
107409
|
bundle,
|
|
107279
107410
|
beginPrint(),
|
|
107280
|
-
/*
|
|
107411
|
+
/*sourceMapGenerator*/
|
|
107281
107412
|
void 0
|
|
107282
107413
|
);
|
|
107283
107414
|
return endPrint();
|
|
@@ -107286,7 +107417,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107286
107417
|
writeFile2(
|
|
107287
107418
|
sourceFile,
|
|
107288
107419
|
beginPrint(),
|
|
107289
|
-
/*
|
|
107420
|
+
/*sourceMapGenerator*/
|
|
107290
107421
|
void 0
|
|
107291
107422
|
);
|
|
107292
107423
|
return endPrint();
|
|
@@ -108767,7 +108898,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108767
108898
|
const indented = writeLineSeparatorsAndIndentBefore(node.expression, node);
|
|
108768
108899
|
emitExpression(
|
|
108769
108900
|
node.expression,
|
|
108770
|
-
/*
|
|
108901
|
+
/*parenthesizerRule*/
|
|
108771
108902
|
void 0
|
|
108772
108903
|
);
|
|
108773
108904
|
writeLineSeparatorsAfter(node.expression, node);
|
|
@@ -108981,7 +109112,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108981
109112
|
function emitAsExpression(node) {
|
|
108982
109113
|
emitExpression(
|
|
108983
109114
|
node.expression,
|
|
108984
|
-
/*
|
|
109115
|
+
/*parenthesizerRule*/
|
|
108985
109116
|
void 0
|
|
108986
109117
|
);
|
|
108987
109118
|
if (node.type) {
|
|
@@ -108998,7 +109129,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108998
109129
|
function emitSatisfiesExpression(node) {
|
|
108999
109130
|
emitExpression(
|
|
109000
109131
|
node.expression,
|
|
109001
|
-
/*
|
|
109132
|
+
/*parenthesizerRule*/
|
|
109002
109133
|
void 0
|
|
109003
109134
|
);
|
|
109004
109135
|
if (node.type) {
|
|
@@ -111318,7 +111449,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
111318
111449
|
case 165 /* ComputedPropertyName */:
|
|
111319
111450
|
return makeTempVariableName(
|
|
111320
111451
|
0 /* Auto */,
|
|
111321
|
-
/*
|
|
111452
|
+
/*reservedInNestedScopes*/
|
|
111322
111453
|
true,
|
|
111323
111454
|
privateName,
|
|
111324
111455
|
prefix,
|
|
@@ -111327,7 +111458,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
111327
111458
|
default:
|
|
111328
111459
|
return makeTempVariableName(
|
|
111329
111460
|
0 /* Auto */,
|
|
111330
|
-
/*
|
|
111461
|
+
/*reservedInNestedScopes*/
|
|
111331
111462
|
false,
|
|
111332
111463
|
privateName,
|
|
111333
111464
|
prefix,
|
|
@@ -113619,7 +113750,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
113619
113750
|
return resolveTypeReferenceDirectiveNamesWorker(
|
|
113620
113751
|
typeDirectiveNames,
|
|
113621
113752
|
containingFile,
|
|
113622
|
-
/*
|
|
113753
|
+
/*reusedNames*/
|
|
113623
113754
|
void 0
|
|
113624
113755
|
);
|
|
113625
113756
|
}
|
|
@@ -113947,7 +114078,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
113947
114078
|
void 0,
|
|
113948
114079
|
/*transformers*/
|
|
113949
114080
|
noTransformers,
|
|
113950
|
-
/*
|
|
114081
|
+
/*emitOnly*/
|
|
113951
114082
|
false,
|
|
113952
114083
|
/*onlyBuildInfo*/
|
|
113953
114084
|
true
|
|
@@ -114543,7 +114674,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
114543
114674
|
const node = getNodeAtPosition(file2, r.lastIndex);
|
|
114544
114675
|
if (shouldProcessRequires && isRequireCall(
|
|
114545
114676
|
node,
|
|
114546
|
-
/*
|
|
114677
|
+
/*requireStringLiteralLikeArgument*/
|
|
114547
114678
|
true
|
|
114548
114679
|
)) {
|
|
114549
114680
|
setParentRecursive(
|
|
@@ -115140,7 +115271,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
115140
115271
|
commandLine = host.getParsedCommandLine(refPath);
|
|
115141
115272
|
if (!commandLine) {
|
|
115142
115273
|
addFileToFilesByName(
|
|
115143
|
-
/*
|
|
115274
|
+
/*file*/
|
|
115144
115275
|
void 0,
|
|
115145
115276
|
sourceFilePath,
|
|
115146
115277
|
/*redirectedPath*/
|
|
@@ -116455,7 +116586,7 @@ var BuilderState;
|
|
|
116455
116586
|
), sourceFiles);
|
|
116456
116587
|
},
|
|
116457
116588
|
cancellationToken,
|
|
116458
|
-
/*
|
|
116589
|
+
/*emitOnly*/
|
|
116459
116590
|
true,
|
|
116460
116591
|
/*customTransformers*/
|
|
116461
116592
|
void 0,
|
|
@@ -117654,7 +117785,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
117654
117785
|
continue;
|
|
117655
117786
|
} else {
|
|
117656
117787
|
result = state.program.getSemanticDiagnostics(
|
|
117657
|
-
/*
|
|
117788
|
+
/*sourceFile*/
|
|
117658
117789
|
void 0,
|
|
117659
117790
|
cancellationToken
|
|
117660
117791
|
);
|
|
@@ -117934,8 +118065,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
117934
118065
|
resolutionHost.getCompilationSettings(),
|
|
117935
118066
|
moduleResolutionCache.getPackageJsonInfoCache()
|
|
117936
118067
|
);
|
|
117937
|
-
const failedLookupDefaultExtensions = [".ts" /* Ts */, ".tsx" /* Tsx */, ".js" /* Js */, ".jsx" /* Jsx */, ".json" /* Json */];
|
|
117938
|
-
const customFailedLookupPaths = /* @__PURE__ */ new Map();
|
|
117939
118068
|
const directoryWatchesOfFailedLookups = /* @__PURE__ */ new Map();
|
|
117940
118069
|
const fileWatchesOfAffectingLocations = /* @__PURE__ */ new Map();
|
|
117941
118070
|
const rootDir = rootDirForResolution && removeTrailingDirectorySeparator(getNormalizedAbsolutePath(rootDirForResolution, getCurrentDirectory()));
|
|
@@ -117980,7 +118109,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
117980
118109
|
function clear2() {
|
|
117981
118110
|
clearMap(directoryWatchesOfFailedLookups, closeFileWatcherOf);
|
|
117982
118111
|
clearMap(fileWatchesOfAffectingLocations, closeFileWatcherOf);
|
|
117983
|
-
customFailedLookupPaths.clear();
|
|
117984
118112
|
nonRelativeExternalModuleResolutions.clear();
|
|
117985
118113
|
closeTypeRootsWatch();
|
|
117986
118114
|
resolvedModuleNames.clear();
|
|
@@ -118290,7 +118418,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118290
118418
|
dirPath = getDirectoryPath(dirPath);
|
|
118291
118419
|
}
|
|
118292
118420
|
if (isNodeModulesDirectory(dirPath)) {
|
|
118293
|
-
return canWatchDirectoryOrFile(
|
|
118421
|
+
return canWatchDirectoryOrFile(dirPath) ? { dir, dirPath } : void 0;
|
|
118294
118422
|
}
|
|
118295
118423
|
let nonRecursive = true;
|
|
118296
118424
|
let subDirectoryPath, subDirectory;
|
|
@@ -118309,9 +118437,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118309
118437
|
}
|
|
118310
118438
|
return canWatchDirectoryOrFile(dirPath) ? { dir: subDirectory || dir, dirPath: subDirectoryPath || dirPath, nonRecursive } : void 0;
|
|
118311
118439
|
}
|
|
118312
|
-
function isPathWithDefaultFailedLookupExtension(path) {
|
|
118313
|
-
return fileExtensionIsOneOf(path, failedLookupDefaultExtensions);
|
|
118314
|
-
}
|
|
118315
118440
|
function watchFailedLookupLocationsOfExternalModuleResolutions(name, resolution, filePath, getResolutionWithResolvedFileName) {
|
|
118316
118441
|
var _a2, _b;
|
|
118317
118442
|
if (resolution.refCount) {
|
|
@@ -118350,10 +118475,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118350
118475
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
118351
118476
|
if (toWatch) {
|
|
118352
118477
|
const { dir, dirPath, nonRecursive } = toWatch;
|
|
118353
|
-
if (!isPathWithDefaultFailedLookupExtension(failedLookupLocationPath)) {
|
|
118354
|
-
const refCount = customFailedLookupPaths.get(failedLookupLocationPath) || 0;
|
|
118355
|
-
customFailedLookupPaths.set(failedLookupLocationPath, refCount + 1);
|
|
118356
|
-
}
|
|
118357
118478
|
if (dirPath === rootPath) {
|
|
118358
118479
|
Debug.assert(!nonRecursive);
|
|
118359
118480
|
setAtRoot = true;
|
|
@@ -118388,6 +118509,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118388
118509
|
);
|
|
118389
118510
|
}
|
|
118390
118511
|
}
|
|
118512
|
+
function isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) {
|
|
118513
|
+
const path = resolutionHost.toPath(locationToWatch);
|
|
118514
|
+
return isInDirectoryPath(rootPath, path) || canWatchDirectoryOrFile(path);
|
|
118515
|
+
}
|
|
118391
118516
|
function createFileWatcherOfAffectingLocation(affectingLocation, forResolution) {
|
|
118392
118517
|
const fileWatcher = fileWatchesOfAffectingLocations.get(affectingLocation);
|
|
118393
118518
|
if (fileWatcher) {
|
|
@@ -118415,7 +118540,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118415
118540
|
}
|
|
118416
118541
|
const paths = /* @__PURE__ */ new Set();
|
|
118417
118542
|
paths.add(locationToWatch);
|
|
118418
|
-
let actualWatcher =
|
|
118543
|
+
let actualWatcher = isInRootPathOrCanWatchDirectoryOrFile(locationToWatch) ? resolutionHost.watchAffectingFileLocation(locationToWatch, (fileName, eventKind) => {
|
|
118419
118544
|
cachedDirectoryStructureHost == null ? void 0 : cachedDirectoryStructureHost.addOrDeleteFile(fileName, resolutionHost.toPath(locationToWatch), eventKind);
|
|
118420
118545
|
const packageJsonMap = moduleResolutionCache.getPackageJsonInfoCache().getInternalMap();
|
|
118421
118546
|
paths.forEach((path) => {
|
|
@@ -118451,7 +118576,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118451
118576
|
} else {
|
|
118452
118577
|
resolutions.forEach((resolution) => watchAffectingLocationsOfResolution(
|
|
118453
118578
|
resolution,
|
|
118454
|
-
/*
|
|
118579
|
+
/*addToResolutionsWithOnlyAffectingLocations*/
|
|
118455
118580
|
true
|
|
118456
118581
|
));
|
|
118457
118582
|
}
|
|
@@ -118486,15 +118611,6 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118486
118611
|
const toWatch = getDirectoryToWatchFailedLookupLocation(failedLookupLocation, failedLookupLocationPath);
|
|
118487
118612
|
if (toWatch) {
|
|
118488
118613
|
const { dirPath } = toWatch;
|
|
118489
|
-
const refCount = customFailedLookupPaths.get(failedLookupLocationPath);
|
|
118490
|
-
if (refCount) {
|
|
118491
|
-
if (refCount === 1) {
|
|
118492
|
-
customFailedLookupPaths.delete(failedLookupLocationPath);
|
|
118493
|
-
} else {
|
|
118494
|
-
Debug.assert(refCount > 1);
|
|
118495
|
-
customFailedLookupPaths.set(failedLookupLocationPath, refCount - 1);
|
|
118496
|
-
}
|
|
118497
|
-
}
|
|
118498
118614
|
if (dirPath === rootPath) {
|
|
118499
118615
|
removeAtRoot = true;
|
|
118500
118616
|
} else {
|
|
@@ -118592,10 +118708,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118592
118708
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118593
118709
|
(startsWithPathChecks || (startsWithPathChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
118594
118710
|
} else {
|
|
118595
|
-
if (
|
|
118711
|
+
if (isEmittedFileOfProgram(resolutionHost.getCurrentProgram(), fileOrDirectoryPath)) {
|
|
118596
118712
|
return false;
|
|
118597
118713
|
}
|
|
118598
|
-
if (
|
|
118714
|
+
if (fileExtensionIs(fileOrDirectoryPath, ".map")) {
|
|
118599
118715
|
return false;
|
|
118600
118716
|
}
|
|
118601
118717
|
(failedLookupChecks || (failedLookupChecks = /* @__PURE__ */ new Set())).add(fileOrDirectoryPath);
|
|
@@ -118692,12 +118808,10 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118692
118808
|
closeTypeRootsWatch();
|
|
118693
118809
|
}
|
|
118694
118810
|
}
|
|
118695
|
-
function canWatchTypeRootPath(
|
|
118696
|
-
|
|
118697
|
-
|
|
118698
|
-
|
|
118699
|
-
const dirPath = resolutionHost.toPath(dir);
|
|
118700
|
-
return dirPath === rootPath || canWatchDirectoryOrFile(dirPath);
|
|
118811
|
+
function canWatchTypeRootPath(typeRoot) {
|
|
118812
|
+
return !!resolutionHost.getCompilationSettings().typeRoots || // Otherwise we'll only watch this path if it falls within `rootDir` or
|
|
118813
|
+
// the path is not disqualified by other criteria ("not `C:\Users\Name\Dir`").
|
|
118814
|
+
isInRootPathOrCanWatchDirectoryOrFile(getDirectoryPath(typeRoot));
|
|
118701
118815
|
}
|
|
118702
118816
|
}
|
|
118703
118817
|
function resolutionIsSymlink(resolution) {
|
|
@@ -118811,7 +118925,7 @@ function prettyPathForFileError(error, cwd) {
|
|
|
118811
118925
|
return getRelativePathFromDirectory(
|
|
118812
118926
|
cwd,
|
|
118813
118927
|
error.fileName,
|
|
118814
|
-
/*
|
|
118928
|
+
/*ignoreCase*/
|
|
118815
118929
|
false
|
|
118816
118930
|
) + line;
|
|
118817
118931
|
}
|
|
@@ -119956,7 +120070,6 @@ function createWatchProgram(host) {
|
|
|
119956
120070
|
);
|
|
119957
120071
|
}
|
|
119958
120072
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
119959
|
-
Debug.assert(configFileName);
|
|
119960
120073
|
updateSharedExtendedConfigFileWatcher(
|
|
119961
120074
|
forProjectPath,
|
|
119962
120075
|
options,
|
|
@@ -119972,7 +120085,7 @@ function createWatchProgram(host) {
|
|
|
119972
120085
|
if (!(projects == null ? void 0 : projects.size))
|
|
119973
120086
|
return;
|
|
119974
120087
|
projects.forEach((projectPath) => {
|
|
119975
|
-
if (toPath3(configFileName) === projectPath) {
|
|
120088
|
+
if (configFileName && toPath3(configFileName) === projectPath) {
|
|
119976
120089
|
reloadLevel = 2 /* Full */;
|
|
119977
120090
|
} else {
|
|
119978
120091
|
const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);
|
|
@@ -120698,7 +120811,7 @@ function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath,
|
|
|
120698
120811
|
void 0,
|
|
120699
120812
|
(name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }),
|
|
120700
120813
|
cancellationToken,
|
|
120701
|
-
/*
|
|
120814
|
+
/*emitOnlyDtsFiles*/
|
|
120702
120815
|
false,
|
|
120703
120816
|
customTransformers || ((_b = (_a2 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a2, project))
|
|
120704
120817
|
);
|
|
@@ -122374,9 +122487,9 @@ function printEasyHelp(sys2, simpleOptions) {
|
|
|
122374
122487
|
cliCommands,
|
|
122375
122488
|
/*subCategory*/
|
|
122376
122489
|
false,
|
|
122377
|
-
/*
|
|
122490
|
+
/*beforeOptionsDescription*/
|
|
122378
122491
|
void 0,
|
|
122379
|
-
/*
|
|
122492
|
+
/*afterOptionsDescription*/
|
|
122380
122493
|
void 0
|
|
122381
122494
|
),
|
|
122382
122495
|
...generateSectionOptionsOutput(
|
|
@@ -122385,10 +122498,10 @@ function printEasyHelp(sys2, simpleOptions) {
|
|
|
122385
122498
|
configOpts,
|
|
122386
122499
|
/*subCategory*/
|
|
122387
122500
|
false,
|
|
122388
|
-
/*
|
|
122501
|
+
/*beforeOptionsDescription*/
|
|
122389
122502
|
void 0,
|
|
122390
122503
|
formatMessage(
|
|
122391
|
-
/*
|
|
122504
|
+
/*dummy*/
|
|
122392
122505
|
void 0,
|
|
122393
122506
|
Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
|
|
122394
122507
|
"https://aka.ms/tsc"
|
|
@@ -122414,10 +122527,10 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
|
122414
122527
|
compilerOptions,
|
|
122415
122528
|
/*subCategory*/
|
|
122416
122529
|
true,
|
|
122417
|
-
/*
|
|
122530
|
+
/*beforeOptionsDescription*/
|
|
122418
122531
|
void 0,
|
|
122419
122532
|
formatMessage(
|
|
122420
|
-
/*
|
|
122533
|
+
/*dummy*/
|
|
122421
122534
|
void 0,
|
|
122422
122535
|
Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
|
|
122423
122536
|
"https://aka.ms/tsc"
|
|
@@ -122438,7 +122551,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
|
122438
122551
|
/*subCategory*/
|
|
122439
122552
|
false,
|
|
122440
122553
|
formatMessage(
|
|
122441
|
-
/*
|
|
122554
|
+
/*dummy*/
|
|
122442
122555
|
void 0,
|
|
122443
122556
|
Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
|
|
122444
122557
|
"https://aka.ms/tsc-composite-builds"
|
|
@@ -122457,7 +122570,7 @@ function printBuildHelp(sys2, buildOptions) {
|
|
|
122457
122570
|
/*subCategory*/
|
|
122458
122571
|
false,
|
|
122459
122572
|
formatMessage(
|
|
122460
|
-
/*
|
|
122573
|
+
/*dummy*/
|
|
122461
122574
|
void 0,
|
|
122462
122575
|
Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
|
|
122463
122576
|
"https://aka.ms/tsc-composite-builds"
|
|
@@ -122772,7 +122885,7 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
122772
122885
|
const { fileNames, options, projectReferences } = config;
|
|
122773
122886
|
const host = createCompilerHostWorker(
|
|
122774
122887
|
options,
|
|
122775
|
-
/*
|
|
122888
|
+
/*setParentNodes*/
|
|
122776
122889
|
void 0,
|
|
122777
122890
|
sys2
|
|
122778
122891
|
);
|
|
@@ -122802,7 +122915,7 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
122802
122915
|
reportStatistics(
|
|
122803
122916
|
sys2,
|
|
122804
122917
|
program,
|
|
122805
|
-
/*
|
|
122918
|
+
/*solutionPerformance*/
|
|
122806
122919
|
void 0
|
|
122807
122920
|
);
|
|
122808
122921
|
cb(program);
|
|
@@ -122830,7 +122943,7 @@ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {
|
|
|
122830
122943
|
reportStatistics(
|
|
122831
122944
|
sys2,
|
|
122832
122945
|
builderProgram.getProgram(),
|
|
122833
|
-
/*
|
|
122946
|
+
/*solutionPerformance*/
|
|
122834
122947
|
void 0
|
|
122835
122948
|
);
|
|
122836
122949
|
cb(builderProgram);
|
|
@@ -122883,7 +122996,7 @@ function updateWatchCompilationHost(sys2, cb, watchCompilerHost) {
|
|
|
122883
122996
|
reportStatistics(
|
|
122884
122997
|
sys2,
|
|
122885
122998
|
builderProgram.getProgram(),
|
|
122886
|
-
/*
|
|
122999
|
+
/*solutionPerformance*/
|
|
122887
123000
|
void 0
|
|
122888
123001
|
);
|
|
122889
123002
|
cb(builderProgram);
|