@typescript-deploys/pr-build 4.7.0-pr-48581-7 → 4.7.0-pr-48792-4
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/cs/diagnosticMessages.generated.json +2 -0
- package/lib/de/diagnosticMessages.generated.json +2 -0
- package/lib/es/diagnosticMessages.generated.json +2 -0
- package/lib/fr/diagnosticMessages.generated.json +2 -0
- package/lib/it/diagnosticMessages.generated.json +2 -0
- package/lib/ja/diagnosticMessages.generated.json +2 -0
- package/lib/ko/diagnosticMessages.generated.json +2 -0
- package/lib/pl/diagnosticMessages.generated.json +2 -0
- package/lib/protocol.d.ts +4 -0
- package/lib/pt-br/diagnosticMessages.generated.json +2 -0
- package/lib/ru/diagnosticMessages.generated.json +2 -0
- package/lib/tr/diagnosticMessages.generated.json +2 -0
- package/lib/tsc.js +304 -246
- package/lib/tsserver.js +772 -380
- package/lib/tsserverlibrary.d.ts +7 -2
- package/lib/tsserverlibrary.js +772 -380
- package/lib/typescript.d.ts +0 -1
- package/lib/typescript.js +531 -360
- package/lib/typescriptServices.d.ts +0 -1
- package/lib/typescriptServices.js +531 -360
- package/lib/typingsInstaller.js +354 -277
- package/lib/zh-cn/diagnosticMessages.generated.json +2 -0
- package/lib/zh-tw/diagnosticMessages.generated.json +2 -0
- package/package.json +1 -1
package/lib/tsc.js
CHANGED
|
@@ -69,7 +69,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
69
69
|
var ts;
|
|
70
70
|
(function (ts) {
|
|
71
71
|
ts.versionMajorMinor = "4.7";
|
|
72
|
-
ts.version = ts.versionMajorMinor + ".0-insiders.
|
|
72
|
+
ts.version = ts.versionMajorMinor + ".0-insiders.20220420";
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -5901,6 +5901,7 @@ var ts;
|
|
|
5901
5901
|
_0_index_signatures_are_incompatible: diag(2634, ts.DiagnosticCategory.Error, "_0_index_signatures_are_incompatible_2634", "'{0}' index signatures are incompatible."),
|
|
5902
5902
|
Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable: diag(2635, ts.DiagnosticCategory.Error, "Type_0_has_no_signatures_for_which_the_type_argument_list_is_applicable_2635", "Type '{0}' has no signatures for which the type argument list is applicable."),
|
|
5903
5903
|
Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation: diag(2636, ts.DiagnosticCategory.Error, "Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation_2636", "Type '{0}' is not assignable to type '{1}' as implied by variance annotation."),
|
|
5904
|
+
Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types: diag(2637, ts.DiagnosticCategory.Error, "Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_t_2637", "Variance annotations are only supported in type aliases for object, function, constructor, and mapped types."),
|
|
5904
5905
|
Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, ts.DiagnosticCategory.Error, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
|
|
5905
5906
|
A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, ts.DiagnosticCategory.Error, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
|
|
5906
5907
|
Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, ts.DiagnosticCategory.Error, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
|
|
@@ -11443,6 +11444,10 @@ var ts;
|
|
|
11443
11444
|
}
|
|
11444
11445
|
}
|
|
11445
11446
|
ts.isAnyImportSyntax = isAnyImportSyntax;
|
|
11447
|
+
function isAnyImportOrBareOrAccessedRequire(node) {
|
|
11448
|
+
return isAnyImportSyntax(node) || isVariableDeclarationInitializedToBareOrAccessedRequire(node);
|
|
11449
|
+
}
|
|
11450
|
+
ts.isAnyImportOrBareOrAccessedRequire = isAnyImportOrBareOrAccessedRequire;
|
|
11446
11451
|
function isLateVisibilityPaintedStatement(node) {
|
|
11447
11452
|
switch (node.kind) {
|
|
11448
11453
|
case 266:
|
|
@@ -12673,17 +12678,13 @@ var ts;
|
|
|
12673
12678
|
if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) {
|
|
12674
12679
|
return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer);
|
|
12675
12680
|
}
|
|
12676
|
-
if (ts.
|
|
12681
|
+
if (ts.isMemberName(name) && isLiteralLikeAccess(initializer) &&
|
|
12677
12682
|
(initializer.expression.kind === 108 ||
|
|
12678
12683
|
ts.isIdentifier(initializer.expression) &&
|
|
12679
12684
|
(initializer.expression.escapedText === "window" ||
|
|
12680
12685
|
initializer.expression.escapedText === "self" ||
|
|
12681
12686
|
initializer.expression.escapedText === "global"))) {
|
|
12682
|
-
|
|
12683
|
-
if (ts.isPrivateIdentifier(nameOrArgument)) {
|
|
12684
|
-
ts.Debug.fail("Unexpected PrivateIdentifier in name expression with literal-like access.");
|
|
12685
|
-
}
|
|
12686
|
-
return isSameEntityName(name, nameOrArgument);
|
|
12687
|
+
return isSameEntityName(name, getNameOrArgument(initializer));
|
|
12687
12688
|
}
|
|
12688
12689
|
if (isLiteralLikeAccess(name) && isLiteralLikeAccess(initializer)) {
|
|
12689
12690
|
return getElementOrPropertyAccessName(name) === getElementOrPropertyAccessName(initializer)
|
|
@@ -12873,14 +12874,14 @@ var ts;
|
|
|
12873
12874
|
}
|
|
12874
12875
|
ts.isFunctionSymbol = isFunctionSymbol;
|
|
12875
12876
|
function tryGetModuleSpecifierFromDeclaration(node) {
|
|
12876
|
-
var _a, _b
|
|
12877
|
+
var _a, _b;
|
|
12877
12878
|
switch (node.kind) {
|
|
12878
12879
|
case 254:
|
|
12879
|
-
return node.initializer.arguments[0]
|
|
12880
|
+
return (_a = ts.findAncestor(node.initializer, function (node) { return isRequireCall(node, true); })) === null || _a === void 0 ? void 0 : _a.arguments[0];
|
|
12880
12881
|
case 266:
|
|
12881
|
-
return
|
|
12882
|
+
return ts.tryCast(node.moduleSpecifier, ts.isStringLiteralLike);
|
|
12882
12883
|
case 265:
|
|
12883
|
-
return
|
|
12884
|
+
return ts.tryCast((_b = ts.tryCast(node.moduleReference, ts.isExternalModuleReference)) === null || _b === void 0 ? void 0 : _b.expression, ts.isStringLiteralLike);
|
|
12884
12885
|
default:
|
|
12885
12886
|
ts.Debug.assertNever(node);
|
|
12886
12887
|
}
|
|
@@ -13353,24 +13354,31 @@ var ts;
|
|
|
13353
13354
|
return parent.propertyName === node;
|
|
13354
13355
|
case 275:
|
|
13355
13356
|
case 285:
|
|
13357
|
+
case 279:
|
|
13358
|
+
case 280:
|
|
13359
|
+
case 281:
|
|
13356
13360
|
return true;
|
|
13357
13361
|
}
|
|
13358
13362
|
return false;
|
|
13359
13363
|
}
|
|
13360
13364
|
ts.isIdentifierName = isIdentifierName;
|
|
13361
13365
|
function isAliasSymbolDeclaration(node) {
|
|
13362
|
-
|
|
13366
|
+
if (node.kind === 265 ||
|
|
13363
13367
|
node.kind === 264 ||
|
|
13364
13368
|
node.kind === 267 && !!node.name ||
|
|
13365
13369
|
node.kind === 268 ||
|
|
13366
13370
|
node.kind === 274 ||
|
|
13367
13371
|
node.kind === 270 ||
|
|
13368
13372
|
node.kind === 275 ||
|
|
13369
|
-
node.kind === 271 && exportAssignmentIsAlias(node)
|
|
13370
|
-
|
|
13371
|
-
|
|
13372
|
-
|
|
13373
|
-
|
|
13373
|
+
node.kind === 271 && exportAssignmentIsAlias(node)) {
|
|
13374
|
+
return true;
|
|
13375
|
+
}
|
|
13376
|
+
return isInJSFile(node) && (ts.isBinaryExpression(node) && getAssignmentDeclarationKind(node) === 2 && exportAssignmentIsAlias(node) ||
|
|
13377
|
+
ts.isPropertyAccessExpression(node)
|
|
13378
|
+
&& ts.isBinaryExpression(node.parent)
|
|
13379
|
+
&& node.parent.left === node
|
|
13380
|
+
&& node.parent.operatorToken.kind === 63
|
|
13381
|
+
&& isAliasableExpression(node.parent.right));
|
|
13374
13382
|
}
|
|
13375
13383
|
ts.isAliasSymbolDeclaration = isAliasSymbolDeclaration;
|
|
13376
13384
|
function getAliasDeclarationFromName(node) {
|
|
@@ -13381,6 +13389,7 @@ var ts;
|
|
|
13381
13389
|
case 275:
|
|
13382
13390
|
case 271:
|
|
13383
13391
|
case 265:
|
|
13392
|
+
case 274:
|
|
13384
13393
|
return node.parent;
|
|
13385
13394
|
case 161:
|
|
13386
13395
|
do {
|
|
@@ -14880,6 +14889,11 @@ var ts;
|
|
|
14880
14889
|
(node.parent.kind === 206 && node.parent.name === node);
|
|
14881
14890
|
}
|
|
14882
14891
|
ts.isRightSideOfQualifiedNameOrPropertyAccess = isRightSideOfQualifiedNameOrPropertyAccess;
|
|
14892
|
+
function isRightSideOfAccessExpression(node) {
|
|
14893
|
+
return ts.isPropertyAccessExpression(node.parent) && node.parent.name === node
|
|
14894
|
+
|| ts.isElementAccessExpression(node.parent) && node.parent.argumentExpression === node;
|
|
14895
|
+
}
|
|
14896
|
+
ts.isRightSideOfAccessExpression = isRightSideOfAccessExpression;
|
|
14883
14897
|
function isRightSideOfQualifiedNameOrPropertyAccessOrJSDocMemberName(node) {
|
|
14884
14898
|
return ts.isQualifiedName(node.parent) && node.parent.right === node
|
|
14885
14899
|
|| ts.isPropertyAccessExpression(node.parent) && node.parent.name === node
|
|
@@ -15440,6 +15454,38 @@ var ts;
|
|
|
15440
15454
|
return expr;
|
|
15441
15455
|
}
|
|
15442
15456
|
ts.getLeftmostAccessExpression = getLeftmostAccessExpression;
|
|
15457
|
+
function forEachNameInAccessChainWalkingLeft(name, action) {
|
|
15458
|
+
if (isAccessExpression(name.parent) && isRightSideOfAccessExpression(name)) {
|
|
15459
|
+
return walkAccessExpression(name.parent);
|
|
15460
|
+
}
|
|
15461
|
+
function walkAccessExpression(access) {
|
|
15462
|
+
if (access.kind === 206) {
|
|
15463
|
+
var res = action(access.name);
|
|
15464
|
+
if (res !== undefined) {
|
|
15465
|
+
return res;
|
|
15466
|
+
}
|
|
15467
|
+
}
|
|
15468
|
+
else if (access.kind === 207) {
|
|
15469
|
+
if (ts.isIdentifier(access.argumentExpression) || ts.isStringLiteralLike(access.argumentExpression)) {
|
|
15470
|
+
var res = action(access.argumentExpression);
|
|
15471
|
+
if (res !== undefined) {
|
|
15472
|
+
return res;
|
|
15473
|
+
}
|
|
15474
|
+
}
|
|
15475
|
+
else {
|
|
15476
|
+
return undefined;
|
|
15477
|
+
}
|
|
15478
|
+
}
|
|
15479
|
+
if (isAccessExpression(access.expression)) {
|
|
15480
|
+
return walkAccessExpression(access.expression);
|
|
15481
|
+
}
|
|
15482
|
+
if (ts.isIdentifier(access.expression)) {
|
|
15483
|
+
return action(access.expression);
|
|
15484
|
+
}
|
|
15485
|
+
return undefined;
|
|
15486
|
+
}
|
|
15487
|
+
}
|
|
15488
|
+
ts.forEachNameInAccessChainWalkingLeft = forEachNameInAccessChainWalkingLeft;
|
|
15443
15489
|
function getLeftmostExpression(node, stopAtCallExpressions) {
|
|
15444
15490
|
while (true) {
|
|
15445
15491
|
switch (node.kind) {
|
|
@@ -16297,6 +16343,7 @@ var ts;
|
|
|
16297
16343
|
ts.supportedJSExtensionsFlat = ts.flatten(ts.supportedJSExtensions);
|
|
16298
16344
|
var allSupportedExtensions = [[".ts", ".tsx", ".d.ts", ".js", ".jsx"], [".cts", ".d.cts", ".cjs"], [".mts", ".d.mts", ".mjs"]];
|
|
16299
16345
|
var allSupportedExtensionsWithJson = __spreadArray(__spreadArray([], allSupportedExtensions, true), [[".json"]], false);
|
|
16346
|
+
ts.supportedDeclarationExtensions = [".d.ts", ".d.cts", ".d.mts"];
|
|
16300
16347
|
function getSupportedExtensions(options, extraFileExtensions) {
|
|
16301
16348
|
var needJsExtensions = options && getAllowJSCompilerOption(options);
|
|
16302
16349
|
if (!extraFileExtensions || extraFileExtensions.length === 0) {
|
|
@@ -16885,6 +16932,11 @@ var ts;
|
|
|
16885
16932
|
return state > 1 ? { topLevelNodeModulesIndex: topLevelNodeModulesIndex, topLevelPackageNameIndex: topLevelPackageNameIndex, packageRootIndex: packageRootIndex, fileNameIndex: fileNameIndex } : undefined;
|
|
16886
16933
|
}
|
|
16887
16934
|
ts.getNodeModulePathParts = getNodeModulePathParts;
|
|
16935
|
+
function getParameterTypeNode(parameter) {
|
|
16936
|
+
var _a;
|
|
16937
|
+
return parameter.kind === 340 ? (_a = parameter.typeExpression) === null || _a === void 0 ? void 0 : _a.type : parameter.type;
|
|
16938
|
+
}
|
|
16939
|
+
ts.getParameterTypeNode = getParameterTypeNode;
|
|
16888
16940
|
})(ts || (ts = {}));
|
|
16889
16941
|
var ts;
|
|
16890
16942
|
(function (ts) {
|
|
@@ -26681,7 +26733,7 @@ var ts;
|
|
|
26681
26733
|
var pos = getNodePos();
|
|
26682
26734
|
parseExpected(112);
|
|
26683
26735
|
var entityName = parseEntityName(true, true);
|
|
26684
|
-
var typeArguments = tryParseTypeArguments();
|
|
26736
|
+
var typeArguments = !scanner.hasPrecedingLineBreak() ? tryParseTypeArguments() : undefined;
|
|
26685
26737
|
return finishNode(factory.createTypeQueryNode(entityName, typeArguments), pos);
|
|
26686
26738
|
}
|
|
26687
26739
|
function parseTypeParameter() {
|
|
@@ -27544,7 +27596,7 @@ var ts;
|
|
|
27544
27596
|
if (ts.isLeftHandSideExpression(expr) && ts.isAssignmentOperator(reScanGreaterToken())) {
|
|
27545
27597
|
return makeBinaryExpression(expr, parseTokenNode(), parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction), pos);
|
|
27546
27598
|
}
|
|
27547
|
-
return parseConditionalExpressionRest(expr, pos);
|
|
27599
|
+
return parseConditionalExpressionRest(expr, pos, disallowReturnTypeInArrowFunction);
|
|
27548
27600
|
}
|
|
27549
27601
|
function isYieldExpression() {
|
|
27550
27602
|
if (token() === 125) {
|
|
@@ -27581,24 +27633,24 @@ var ts;
|
|
|
27581
27633
|
return addJSDocComment(finishNode(node, pos));
|
|
27582
27634
|
}
|
|
27583
27635
|
function tryParseParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction) {
|
|
27584
|
-
var triState = isParenthesizedArrowFunctionExpression();
|
|
27636
|
+
var triState = isParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction);
|
|
27585
27637
|
if (triState === 0) {
|
|
27586
27638
|
return undefined;
|
|
27587
27639
|
}
|
|
27588
27640
|
return triState === 1 ?
|
|
27589
|
-
parseParenthesizedArrowFunctionExpression(true,
|
|
27641
|
+
parseParenthesizedArrowFunctionExpression(true, disallowReturnTypeInArrowFunction) :
|
|
27590
27642
|
tryParse(function () { return parsePossibleParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction); });
|
|
27591
27643
|
}
|
|
27592
|
-
function isParenthesizedArrowFunctionExpression() {
|
|
27644
|
+
function isParenthesizedArrowFunctionExpression(disallowReturnTypeInArrowFunction) {
|
|
27593
27645
|
if (token() === 20 || token() === 29 || token() === 131) {
|
|
27594
|
-
return lookAhead(isParenthesizedArrowFunctionExpressionWorker);
|
|
27646
|
+
return lookAhead(function () { return isParenthesizedArrowFunctionExpressionWorker(disallowReturnTypeInArrowFunction); });
|
|
27595
27647
|
}
|
|
27596
27648
|
if (token() === 38) {
|
|
27597
27649
|
return 1;
|
|
27598
27650
|
}
|
|
27599
27651
|
return 0;
|
|
27600
27652
|
}
|
|
27601
|
-
function isParenthesizedArrowFunctionExpressionWorker() {
|
|
27653
|
+
function isParenthesizedArrowFunctionExpressionWorker(disallowReturnTypeInArrowFunction) {
|
|
27602
27654
|
if (token() === 131) {
|
|
27603
27655
|
nextToken();
|
|
27604
27656
|
if (scanner.hasPrecedingLineBreak()) {
|
|
@@ -27614,8 +27666,12 @@ var ts;
|
|
|
27614
27666
|
if (second === 21) {
|
|
27615
27667
|
var third = nextToken();
|
|
27616
27668
|
switch (third) {
|
|
27617
|
-
case 38:
|
|
27618
27669
|
case 58:
|
|
27670
|
+
if (disallowReturnTypeInArrowFunction) {
|
|
27671
|
+
return 0;
|
|
27672
|
+
}
|
|
27673
|
+
return 1;
|
|
27674
|
+
case 38:
|
|
27619
27675
|
case 18:
|
|
27620
27676
|
return 1;
|
|
27621
27677
|
default:
|
|
@@ -27786,14 +27842,14 @@ var ts;
|
|
|
27786
27842
|
topLevel = savedTopLevel;
|
|
27787
27843
|
return node;
|
|
27788
27844
|
}
|
|
27789
|
-
function parseConditionalExpressionRest(leftOperand, pos) {
|
|
27845
|
+
function parseConditionalExpressionRest(leftOperand, pos, disallowReturnTypeInArrowFunction) {
|
|
27790
27846
|
var questionToken = parseOptionalToken(57);
|
|
27791
27847
|
if (!questionToken) {
|
|
27792
27848
|
return leftOperand;
|
|
27793
27849
|
}
|
|
27794
27850
|
var colonToken;
|
|
27795
27851
|
return finishNode(factory.createConditionalExpression(leftOperand, questionToken, doOutsideOfContext(disallowInAndDecoratorContext, function () { return parseAssignmentExpressionOrHigher(true); }), colonToken = parseExpectedToken(58), ts.nodeIsPresent(colonToken)
|
|
27796
|
-
? parseAssignmentExpressionOrHigher(
|
|
27852
|
+
? parseAssignmentExpressionOrHigher(disallowReturnTypeInArrowFunction)
|
|
27797
27853
|
: createMissingNode(79, false, ts.Diagnostics._0_expected, ts.tokenToString(58))), pos);
|
|
27798
27854
|
}
|
|
27799
27855
|
function parseBinaryExpressionOrHigher(precedence) {
|
|
@@ -28386,29 +28442,9 @@ var ts;
|
|
|
28386
28442
|
case 20:
|
|
28387
28443
|
case 14:
|
|
28388
28444
|
case 15:
|
|
28389
|
-
case 27:
|
|
28390
|
-
case 24:
|
|
28391
|
-
case 28:
|
|
28392
|
-
case 21:
|
|
28393
|
-
case 23:
|
|
28394
|
-
case 58:
|
|
28395
|
-
case 26:
|
|
28396
|
-
case 57:
|
|
28397
|
-
case 34:
|
|
28398
|
-
case 36:
|
|
28399
|
-
case 35:
|
|
28400
|
-
case 37:
|
|
28401
|
-
case 55:
|
|
28402
|
-
case 56:
|
|
28403
|
-
case 60:
|
|
28404
|
-
case 52:
|
|
28405
|
-
case 50:
|
|
28406
|
-
case 51:
|
|
28407
|
-
case 19:
|
|
28408
|
-
case 1:
|
|
28409
28445
|
return true;
|
|
28410
28446
|
}
|
|
28411
|
-
return
|
|
28447
|
+
return !isStartOfExpression();
|
|
28412
28448
|
}
|
|
28413
28449
|
function parsePrimaryExpression() {
|
|
28414
28450
|
switch (token()) {
|
|
@@ -31134,7 +31170,7 @@ var ts;
|
|
|
31134
31170
|
IncrementalParser.createSyntaxCursor = createSyntaxCursor;
|
|
31135
31171
|
})(IncrementalParser || (IncrementalParser = {}));
|
|
31136
31172
|
function isDeclarationFileName(fileName) {
|
|
31137
|
-
return ts.fileExtensionIsOneOf(fileName,
|
|
31173
|
+
return ts.fileExtensionIsOneOf(fileName, ts.supportedDeclarationExtensions);
|
|
31138
31174
|
}
|
|
31139
31175
|
ts.isDeclarationFileName = isDeclarationFileName;
|
|
31140
31176
|
function parseResolutionMode(mode, pos, end, reportDiagnostic) {
|
|
@@ -34318,6 +34354,7 @@ var ts;
|
|
|
34318
34354
|
Extensions[Extensions["Json"] = 2] = "Json";
|
|
34319
34355
|
Extensions[Extensions["TSConfig"] = 3] = "TSConfig";
|
|
34320
34356
|
Extensions[Extensions["DtsOnly"] = 4] = "DtsOnly";
|
|
34357
|
+
Extensions[Extensions["TsOnly"] = 5] = "TsOnly";
|
|
34321
34358
|
})(Extensions || (Extensions = {}));
|
|
34322
34359
|
function resolvedTypeScriptOnly(resolved) {
|
|
34323
34360
|
if (!resolved) {
|
|
@@ -35114,13 +35151,31 @@ var ts;
|
|
|
35114
35151
|
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, initialDir, { moduleResolution: ts.ModuleResolutionKind.NodeJs, allowJs: true }, host, undefined, jsOnlyExtensions, undefined);
|
|
35115
35152
|
}
|
|
35116
35153
|
function nodeModuleNameResolver(moduleName, containingFile, compilerOptions, host, cache, redirectedReference, lookupConfig) {
|
|
35117
|
-
|
|
35154
|
+
var extensions;
|
|
35155
|
+
if (lookupConfig) {
|
|
35156
|
+
extensions = tsconfigExtensions;
|
|
35157
|
+
}
|
|
35158
|
+
else if (compilerOptions.noDtsResolution) {
|
|
35159
|
+
extensions = [Extensions.TsOnly];
|
|
35160
|
+
if (compilerOptions.allowJs)
|
|
35161
|
+
extensions.push(Extensions.JavaScript);
|
|
35162
|
+
if (compilerOptions.resolveJsonModule)
|
|
35163
|
+
extensions.push(Extensions.Json);
|
|
35164
|
+
}
|
|
35165
|
+
else {
|
|
35166
|
+
extensions = compilerOptions.resolveJsonModule ? tsPlusJsonExtensions : tsExtensions;
|
|
35167
|
+
}
|
|
35168
|
+
return nodeModuleNameResolverWorker(NodeResolutionFeatures.None, moduleName, ts.getDirectoryPath(containingFile), compilerOptions, host, cache, extensions, redirectedReference);
|
|
35118
35169
|
}
|
|
35119
35170
|
ts.nodeModuleNameResolver = nodeModuleNameResolver;
|
|
35120
35171
|
function nodeModuleNameResolverWorker(features, moduleName, containingDirectory, compilerOptions, host, cache, extensions, redirectedReference) {
|
|
35121
35172
|
var _a, _b;
|
|
35122
35173
|
var traceEnabled = isTraceEnabled(compilerOptions, host);
|
|
35123
35174
|
var failedLookupLocations = [];
|
|
35175
|
+
var conditions = features & NodeResolutionFeatures.EsmMode ? ["node", "import", "types"] : ["node", "require", "types"];
|
|
35176
|
+
if (compilerOptions.noDtsResolution) {
|
|
35177
|
+
conditions.pop();
|
|
35178
|
+
}
|
|
35124
35179
|
var state = {
|
|
35125
35180
|
compilerOptions: compilerOptions,
|
|
35126
35181
|
host: host,
|
|
@@ -35128,7 +35183,7 @@ var ts;
|
|
|
35128
35183
|
failedLookupLocations: failedLookupLocations,
|
|
35129
35184
|
packageJsonInfoCache: cache,
|
|
35130
35185
|
features: features,
|
|
35131
|
-
conditions:
|
|
35186
|
+
conditions: conditions,
|
|
35132
35187
|
};
|
|
35133
35188
|
var result = ts.forEach(extensions, function (ext) { return tryResolve(ext); });
|
|
35134
35189
|
return createResolvedModuleWithFailedLookupLocations((_a = result === null || result === void 0 ? void 0 : result.value) === null || _a === void 0 ? void 0 : _a.resolved, (_b = result === null || result === void 0 ? void 0 : result.value) === null || _b === void 0 ? void 0 : _b.isExternalLibraryImport, failedLookupLocations, state.resultFromCache);
|
|
@@ -35273,9 +35328,9 @@ var ts;
|
|
|
35273
35328
|
}
|
|
35274
35329
|
}
|
|
35275
35330
|
function loadJSOrExactTSFileName(extensions, candidate, onlyRecordFailures, state) {
|
|
35276
|
-
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.
|
|
35331
|
+
if ((extensions === Extensions.TypeScript || extensions === Extensions.DtsOnly) && ts.isDeclarationFileName(candidate)) {
|
|
35277
35332
|
var result = tryFile(candidate, onlyRecordFailures, state);
|
|
35278
|
-
return result !== undefined ? { path: candidate, ext: ts.forEach(
|
|
35333
|
+
return result !== undefined ? { path: candidate, ext: ts.forEach(ts.supportedDeclarationExtensions, function (e) { return ts.fileExtensionIs(candidate, e) ? e : undefined; }) } : undefined;
|
|
35279
35334
|
}
|
|
35280
35335
|
return loadModuleFromFileNoImplicitExtensions(extensions, candidate, onlyRecordFailures, state);
|
|
35281
35336
|
}
|
|
@@ -35303,20 +35358,22 @@ var ts;
|
|
|
35303
35358
|
default: return tryExtension(".d.ts");
|
|
35304
35359
|
}
|
|
35305
35360
|
case Extensions.TypeScript:
|
|
35361
|
+
case Extensions.TsOnly:
|
|
35362
|
+
var useDts = extensions === Extensions.TypeScript;
|
|
35306
35363
|
switch (originalExtension) {
|
|
35307
35364
|
case ".mjs":
|
|
35308
35365
|
case ".mts":
|
|
35309
35366
|
case ".d.mts":
|
|
35310
|
-
return tryExtension(".mts") || tryExtension(".d.mts");
|
|
35367
|
+
return tryExtension(".mts") || (useDts ? tryExtension(".d.mts") : undefined);
|
|
35311
35368
|
case ".cjs":
|
|
35312
35369
|
case ".cts":
|
|
35313
35370
|
case ".d.cts":
|
|
35314
|
-
return tryExtension(".cts") || tryExtension(".d.cts");
|
|
35371
|
+
return tryExtension(".cts") || (useDts ? tryExtension(".d.cts") : undefined);
|
|
35315
35372
|
case ".json":
|
|
35316
35373
|
candidate += ".json";
|
|
35317
|
-
return tryExtension(".d.ts");
|
|
35374
|
+
return useDts ? tryExtension(".d.ts") : undefined;
|
|
35318
35375
|
default:
|
|
35319
|
-
return tryExtension(".ts") || tryExtension(".tsx") || tryExtension(".d.ts");
|
|
35376
|
+
return tryExtension(".ts") || tryExtension(".tsx") || (useDts ? tryExtension(".d.ts") : undefined);
|
|
35320
35377
|
}
|
|
35321
35378
|
case Extensions.JavaScript:
|
|
35322
35379
|
switch (originalExtension) {
|
|
@@ -35530,6 +35587,7 @@ var ts;
|
|
|
35530
35587
|
switch (extensions) {
|
|
35531
35588
|
case Extensions.JavaScript:
|
|
35532
35589
|
case Extensions.Json:
|
|
35590
|
+
case Extensions.TsOnly:
|
|
35533
35591
|
packageFile = readPackageJsonMainField(jsonContent, candidate, state);
|
|
35534
35592
|
break;
|
|
35535
35593
|
case Extensions.TypeScript:
|
|
@@ -35592,14 +35650,16 @@ var ts;
|
|
|
35592
35650
|
function extensionIsOk(extensions, extension) {
|
|
35593
35651
|
switch (extensions) {
|
|
35594
35652
|
case Extensions.JavaScript:
|
|
35595
|
-
return extension === ".js" || extension === ".jsx";
|
|
35653
|
+
return extension === ".js" || extension === ".jsx" || extension === ".mjs" || extension === ".cjs";
|
|
35596
35654
|
case Extensions.TSConfig:
|
|
35597
35655
|
case Extensions.Json:
|
|
35598
35656
|
return extension === ".json";
|
|
35599
35657
|
case Extensions.TypeScript:
|
|
35600
|
-
return extension === ".ts" || extension === ".tsx" || extension === ".d.ts";
|
|
35658
|
+
return extension === ".ts" || extension === ".tsx" || extension === ".mts" || extension === ".cts" || extension === ".d.ts" || extension === ".d.mts" || extension === ".d.cts";
|
|
35659
|
+
case Extensions.TsOnly:
|
|
35660
|
+
return extension === ".ts" || extension === ".tsx" || extension === ".mts" || extension === ".cts";
|
|
35601
35661
|
case Extensions.DtsOnly:
|
|
35602
|
-
return extension === ".d.ts";
|
|
35662
|
+
return extension === ".d.ts" || extension === ".d.mts" || extension === ".d.cts";
|
|
35603
35663
|
}
|
|
35604
35664
|
}
|
|
35605
35665
|
function parsePackageName(moduleName) {
|
|
@@ -37492,6 +37552,7 @@ var ts;
|
|
|
37492
37552
|
case 261:
|
|
37493
37553
|
case 259:
|
|
37494
37554
|
case 195:
|
|
37555
|
+
case 176:
|
|
37495
37556
|
return 1 | 32;
|
|
37496
37557
|
case 305:
|
|
37497
37558
|
return 1 | 4 | 32;
|
|
@@ -37509,7 +37570,6 @@ var ts;
|
|
|
37509
37570
|
case 317:
|
|
37510
37571
|
case 179:
|
|
37511
37572
|
case 175:
|
|
37512
|
-
case 176:
|
|
37513
37573
|
case 180:
|
|
37514
37574
|
case 170:
|
|
37515
37575
|
return 1 | 4 | 32 | 8;
|
|
@@ -41330,27 +41390,27 @@ var ts;
|
|
|
41330
41390
|
function resolveAlias(symbol) {
|
|
41331
41391
|
ts.Debug.assert((symbol.flags & 2097152) !== 0, "Should only get Alias here.");
|
|
41332
41392
|
var links = getSymbolLinks(symbol);
|
|
41333
|
-
if (!links.
|
|
41334
|
-
links.
|
|
41393
|
+
if (!links.aliasTarget) {
|
|
41394
|
+
links.aliasTarget = resolvingSymbol;
|
|
41335
41395
|
var node = getDeclarationOfAliasSymbol(symbol);
|
|
41336
41396
|
if (!node)
|
|
41337
41397
|
return ts.Debug.fail();
|
|
41338
41398
|
var target = getTargetOfAliasDeclaration(node);
|
|
41339
|
-
if (links.
|
|
41340
|
-
links.
|
|
41399
|
+
if (links.aliasTarget === resolvingSymbol) {
|
|
41400
|
+
links.aliasTarget = target || unknownSymbol;
|
|
41341
41401
|
}
|
|
41342
41402
|
else {
|
|
41343
41403
|
error(node, ts.Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
|
|
41344
41404
|
}
|
|
41345
41405
|
}
|
|
41346
|
-
else if (links.
|
|
41347
|
-
links.
|
|
41406
|
+
else if (links.aliasTarget === resolvingSymbol) {
|
|
41407
|
+
links.aliasTarget = unknownSymbol;
|
|
41348
41408
|
}
|
|
41349
|
-
return links.
|
|
41409
|
+
return links.aliasTarget;
|
|
41350
41410
|
}
|
|
41351
41411
|
function tryResolveAlias(symbol) {
|
|
41352
41412
|
var links = getSymbolLinks(symbol);
|
|
41353
|
-
if (links.
|
|
41413
|
+
if (links.aliasTarget !== resolvingSymbol) {
|
|
41354
41414
|
return resolveAlias(symbol);
|
|
41355
41415
|
}
|
|
41356
41416
|
return undefined;
|
|
@@ -42937,13 +42997,27 @@ var ts;
|
|
|
42937
42997
|
return ts.Debug.fail("Should be unreachable.");
|
|
42938
42998
|
function conditionalTypeToTypeNode(type) {
|
|
42939
42999
|
var checkTypeNode = typeToTypeNodeHelper(type.checkType, context);
|
|
43000
|
+
context.approximateLength += 15;
|
|
43001
|
+
if (context.flags & 4 && type.root.isDistributive && !(type.checkType.flags & 262144)) {
|
|
43002
|
+
var newParam = createTypeParameter(createSymbol(262144, "T"));
|
|
43003
|
+
var name = typeParameterToName(newParam, context);
|
|
43004
|
+
var newTypeVariable = ts.factory.createTypeReferenceNode(name);
|
|
43005
|
+
context.approximateLength += 37;
|
|
43006
|
+
var newMapper = prependTypeMapping(type.root.checkType, newParam, type.combinedMapper || type.mapper);
|
|
43007
|
+
var saveInferTypeParameters_1 = context.inferTypeParameters;
|
|
43008
|
+
context.inferTypeParameters = type.root.inferTypeParameters;
|
|
43009
|
+
var extendsTypeNode_1 = typeToTypeNodeHelper(instantiateType(type.root.extendsType, newMapper), context);
|
|
43010
|
+
context.inferTypeParameters = saveInferTypeParameters_1;
|
|
43011
|
+
var trueTypeNode_1 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode(type.root.node.trueType), newMapper));
|
|
43012
|
+
var falseTypeNode_1 = typeToTypeNodeOrCircularityElision(instantiateType(getTypeFromTypeNode(type.root.node.falseType), newMapper));
|
|
43013
|
+
return ts.factory.createConditionalTypeNode(checkTypeNode, ts.factory.createInferTypeNode(ts.factory.createTypeParameterDeclaration(undefined, ts.factory.cloneNode(newTypeVariable.typeName))), ts.factory.createConditionalTypeNode(ts.factory.createTypeReferenceNode(ts.factory.cloneNode(name)), typeToTypeNodeHelper(type.checkType, context), ts.factory.createConditionalTypeNode(newTypeVariable, extendsTypeNode_1, trueTypeNode_1, falseTypeNode_1), ts.factory.createKeywordTypeNode(143)), ts.factory.createKeywordTypeNode(143));
|
|
43014
|
+
}
|
|
42940
43015
|
var saveInferTypeParameters = context.inferTypeParameters;
|
|
42941
43016
|
context.inferTypeParameters = type.root.inferTypeParameters;
|
|
42942
43017
|
var extendsTypeNode = typeToTypeNodeHelper(type.extendsType, context);
|
|
42943
43018
|
context.inferTypeParameters = saveInferTypeParameters;
|
|
42944
43019
|
var trueTypeNode = typeToTypeNodeOrCircularityElision(getTrueTypeFromConditionalType(type));
|
|
42945
43020
|
var falseTypeNode = typeToTypeNodeOrCircularityElision(getFalseTypeFromConditionalType(type));
|
|
42946
|
-
context.approximateLength += 15;
|
|
42947
43021
|
return ts.factory.createConditionalTypeNode(checkTypeNode, extendsTypeNode, trueTypeNode, falseTypeNode);
|
|
42948
43022
|
}
|
|
42949
43023
|
function typeToTypeNodeOrCircularityElision(type) {
|
|
@@ -43044,7 +43118,7 @@ var ts;
|
|
|
43044
43118
|
type.symbol ? (isConstructorObject ? "+" : "") + getSymbolId(type.symbol) :
|
|
43045
43119
|
undefined;
|
|
43046
43120
|
if (!context.visitedTypes) {
|
|
43047
|
-
context.visitedTypes = new ts.
|
|
43121
|
+
context.visitedTypes = new ts.Set();
|
|
43048
43122
|
}
|
|
43049
43123
|
if (id && !context.symbolDepth) {
|
|
43050
43124
|
context.symbolDepth = new ts.Map();
|
|
@@ -43062,22 +43136,15 @@ var ts;
|
|
|
43062
43136
|
context.approximateLength += cachedResult.addedLength;
|
|
43063
43137
|
return deepCloneOrReuseNode(cachedResult);
|
|
43064
43138
|
}
|
|
43065
|
-
var
|
|
43066
|
-
var symbolDepth = id ? context.symbolDepth.get(id) : undefined;
|
|
43067
|
-
if (symbolDepth) {
|
|
43068
|
-
totalDepth += symbolDepth;
|
|
43069
|
-
}
|
|
43070
|
-
var visitedTypeDepth = context.visitedTypes.get(typeId);
|
|
43071
|
-
if (visitedTypeDepth) {
|
|
43072
|
-
totalDepth += visitedTypeDepth;
|
|
43073
|
-
}
|
|
43074
|
-
if (totalDepth > 10) {
|
|
43075
|
-
return createElidedInformationPlaceholder(context);
|
|
43076
|
-
}
|
|
43139
|
+
var depth;
|
|
43077
43140
|
if (id) {
|
|
43078
|
-
context.symbolDepth.
|
|
43141
|
+
depth = context.symbolDepth.get(id) || 0;
|
|
43142
|
+
if (depth > 10) {
|
|
43143
|
+
return createElidedInformationPlaceholder(context);
|
|
43144
|
+
}
|
|
43145
|
+
context.symbolDepth.set(id, depth + 1);
|
|
43079
43146
|
}
|
|
43080
|
-
context.visitedTypes.
|
|
43147
|
+
context.visitedTypes.add(typeId);
|
|
43081
43148
|
var startLength = context.approximateLength;
|
|
43082
43149
|
var result = transform(type);
|
|
43083
43150
|
var addedLength = context.approximateLength - startLength;
|
|
@@ -43088,19 +43155,9 @@ var ts;
|
|
|
43088
43155
|
result.addedLength = addedLength;
|
|
43089
43156
|
(_b = links === null || links === void 0 ? void 0 : links.serializedTypes) === null || _b === void 0 ? void 0 : _b.set(key, result);
|
|
43090
43157
|
}
|
|
43091
|
-
|
|
43092
|
-
context.visitedTypes.set(typeId, visitedTypeDepth);
|
|
43093
|
-
}
|
|
43094
|
-
else {
|
|
43095
|
-
context.visitedTypes.delete(typeId);
|
|
43096
|
-
}
|
|
43158
|
+
context.visitedTypes.delete(typeId);
|
|
43097
43159
|
if (id) {
|
|
43098
|
-
|
|
43099
|
-
context.symbolDepth.set(id, symbolDepth);
|
|
43100
|
-
}
|
|
43101
|
-
else {
|
|
43102
|
-
context.symbolDepth.delete(id);
|
|
43103
|
-
}
|
|
43160
|
+
context.symbolDepth.set(id, depth);
|
|
43104
43161
|
}
|
|
43105
43162
|
return result;
|
|
43106
43163
|
function deepCloneOrReuseNode(node) {
|
|
@@ -43604,9 +43661,6 @@ var ts;
|
|
|
43604
43661
|
if (parameterDeclaration && isRequiredInitializedParameter(parameterDeclaration)) {
|
|
43605
43662
|
parameterType = getOptionalType(parameterType);
|
|
43606
43663
|
}
|
|
43607
|
-
if ((context.flags & 1073741824) && parameterDeclaration && !ts.isJSDocParameterTag(parameterDeclaration) && isOptionalUninitializedParameter(parameterDeclaration)) {
|
|
43608
|
-
parameterType = getTypeWithFacts(parameterType, 524288);
|
|
43609
|
-
}
|
|
43610
43664
|
var parameterTypeNode = serializeTypeForDeclaration(context, parameterType, parameterSymbol, context.enclosingDeclaration, privateSymbolVisitor, bundledImports);
|
|
43611
43665
|
var modifiers = !(context.flags & 8192) && preserveModifierFlags && parameterDeclaration && parameterDeclaration.modifiers ? parameterDeclaration.modifiers.map(ts.factory.cloneNode) : undefined;
|
|
43612
43666
|
var isRest = parameterDeclaration && ts.isRestParameter(parameterDeclaration) || ts.getCheckFlags(parameterSymbol) & 32768;
|
|
@@ -44113,7 +44167,7 @@ var ts;
|
|
|
44113
44167
|
var declWithExistingAnnotation = getDeclarationWithTypeAnnotation(symbol, enclosingDeclaration);
|
|
44114
44168
|
if (declWithExistingAnnotation && !ts.isFunctionLikeDeclaration(declWithExistingAnnotation) && !ts.isGetAccessorDeclaration(declWithExistingAnnotation)) {
|
|
44115
44169
|
var existing = ts.getEffectiveTypeAnnotationNode(declWithExistingAnnotation);
|
|
44116
|
-
if (
|
|
44170
|
+
if (typeNodeIsEquivalentToType(existing, declWithExistingAnnotation, type) && existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(existing, type)) {
|
|
44117
44171
|
var result_6 = serializeExistingTypeNode(context, existing, includePrivateSymbol, bundled);
|
|
44118
44172
|
if (result_6) {
|
|
44119
44173
|
return result_6;
|
|
@@ -44130,6 +44184,16 @@ var ts;
|
|
|
44130
44184
|
context.flags = oldFlags;
|
|
44131
44185
|
return result;
|
|
44132
44186
|
}
|
|
44187
|
+
function typeNodeIsEquivalentToType(typeNode, annotatedDeclaration, type) {
|
|
44188
|
+
var typeFromTypeNode = getTypeFromTypeNode(typeNode);
|
|
44189
|
+
if (typeFromTypeNode === type) {
|
|
44190
|
+
return true;
|
|
44191
|
+
}
|
|
44192
|
+
if (ts.isParameter(annotatedDeclaration) && annotatedDeclaration.questionToken) {
|
|
44193
|
+
return getTypeWithFacts(type, 524288) === typeFromTypeNode;
|
|
44194
|
+
}
|
|
44195
|
+
return false;
|
|
44196
|
+
}
|
|
44133
44197
|
function serializeReturnTypeForSignature(context, type, signature, includePrivateSymbol, bundled) {
|
|
44134
44198
|
if (!isErrorType(type) && context.enclosingDeclaration) {
|
|
44135
44199
|
var annotation = signature.declaration && ts.getEffectiveReturnTypeNode(signature.declaration);
|
|
@@ -45983,7 +46047,7 @@ var ts;
|
|
|
45983
46047
|
}
|
|
45984
46048
|
}
|
|
45985
46049
|
var sourceTypes = ts.some(constructorTypes, function (t) { return !!(t.flags & ~98304); }) ? constructorTypes : types;
|
|
45986
|
-
type = getUnionType(sourceTypes
|
|
46050
|
+
type = getUnionType(sourceTypes);
|
|
45987
46051
|
}
|
|
45988
46052
|
}
|
|
45989
46053
|
var widened = getWidenedType(addOptionality(type, false, definedInMethod && !definedInConstructor));
|
|
@@ -48369,8 +48433,9 @@ var ts;
|
|
|
48369
48433
|
return circularConstraintType;
|
|
48370
48434
|
}
|
|
48371
48435
|
var result = void 0;
|
|
48372
|
-
|
|
48373
|
-
|
|
48436
|
+
var identity_1 = getRecursionIdentity(t);
|
|
48437
|
+
if (stack.length < 10 || stack.length < 50 && !ts.contains(stack, identity_1)) {
|
|
48438
|
+
stack.push(identity_1);
|
|
48374
48439
|
result = computeBaseConstraint(getSimplifiedType(t, false));
|
|
48375
48440
|
stack.pop();
|
|
48376
48441
|
}
|
|
@@ -51357,8 +51422,11 @@ var ts;
|
|
|
51357
51422
|
return type[cache] = elementType;
|
|
51358
51423
|
}
|
|
51359
51424
|
}
|
|
51360
|
-
if (isGenericMappedType(objectType)
|
|
51361
|
-
|
|
51425
|
+
if (isGenericMappedType(objectType)) {
|
|
51426
|
+
var nameType = getNameTypeFromMappedType(objectType);
|
|
51427
|
+
if (!nameType || isTypeAssignableTo(nameType, getTypeParameterFromMappedType(objectType))) {
|
|
51428
|
+
return type[cache] = mapType(substituteIndexedMappedType(objectType, type.indexType), function (t) { return getSimplifiedType(t, writing); });
|
|
51429
|
+
}
|
|
51362
51430
|
}
|
|
51363
51431
|
return type[cache] = type;
|
|
51364
51432
|
}
|
|
@@ -55547,12 +55615,12 @@ var ts;
|
|
|
55547
55615
|
function isDeeplyNestedType(type, stack, depth, maxDepth) {
|
|
55548
55616
|
if (maxDepth === void 0) { maxDepth = 3; }
|
|
55549
55617
|
if (depth >= maxDepth) {
|
|
55550
|
-
var
|
|
55618
|
+
var identity_2 = getRecursionIdentity(type);
|
|
55551
55619
|
var count = 0;
|
|
55552
55620
|
var lastTypeId = 0;
|
|
55553
55621
|
for (var i = 0; i < depth; i++) {
|
|
55554
55622
|
var t = stack[i];
|
|
55555
|
-
if (getRecursionIdentity(t) ===
|
|
55623
|
+
if (getRecursionIdentity(t) === identity_2) {
|
|
55556
55624
|
if (t.id >= lastTypeId) {
|
|
55557
55625
|
count++;
|
|
55558
55626
|
if (count >= maxDepth) {
|
|
@@ -61936,7 +62004,9 @@ var ts;
|
|
|
61936
62004
|
}
|
|
61937
62005
|
prop = getPropertyOfType(apparentType, right.escapedText);
|
|
61938
62006
|
}
|
|
61939
|
-
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
62007
|
+
if (ts.isIdentifier(left) && parentSymbol && (compilerOptions.isolatedModules ||
|
|
62008
|
+
!(prop && (isConstEnumOrConstEnumOnlyModule(prop) || prop.flags & 8 && node.parent.kind === 299)) ||
|
|
62009
|
+
ts.shouldPreserveConstEnums(compilerOptions) && isExportOrExportExpression(node))) {
|
|
61940
62010
|
markAliasReferenced(parentSymbol, node);
|
|
61941
62011
|
}
|
|
61942
62012
|
var propType;
|
|
@@ -64080,7 +64150,7 @@ var ts;
|
|
|
64080
64150
|
var newSymbol = createSymbol(2097152, "default");
|
|
64081
64151
|
newSymbol.parent = originalSymbol;
|
|
64082
64152
|
newSymbol.nameType = getStringLiteralType("default");
|
|
64083
|
-
newSymbol.
|
|
64153
|
+
newSymbol.aliasTarget = resolveSymbol(symbol);
|
|
64084
64154
|
memberTable.set("default", newSymbol);
|
|
64085
64155
|
return createAnonymousType(anonymousSymbol, memberTable, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
64086
64156
|
}
|
|
@@ -66604,19 +66674,28 @@ var ts;
|
|
|
66604
66674
|
if (constraintType && defaultType) {
|
|
66605
66675
|
checkTypeAssignableTo(defaultType, getTypeWithThisArgument(instantiateType(constraintType, makeUnaryTypeMapper(typeParameter, defaultType)), defaultType), node.default, ts.Diagnostics.Type_0_does_not_satisfy_the_constraint_1);
|
|
66606
66676
|
}
|
|
66607
|
-
|
|
66677
|
+
checkNodeDeferred(node);
|
|
66678
|
+
addLazyDiagnostic(function () { return checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0); });
|
|
66679
|
+
}
|
|
66680
|
+
function checkTypeParameterDeferred(node) {
|
|
66681
|
+
if (ts.isInterfaceDeclaration(node.parent) || ts.isClassLike(node.parent) || ts.isTypeAliasDeclaration(node.parent)) {
|
|
66682
|
+
var typeParameter = getDeclaredTypeOfTypeParameter(getSymbolOfNode(node));
|
|
66608
66683
|
var modifiers = getVarianceModifiers(typeParameter);
|
|
66609
|
-
if (modifiers
|
|
66684
|
+
if (modifiers) {
|
|
66610
66685
|
var symbol = getSymbolOfNode(node.parent);
|
|
66611
|
-
|
|
66612
|
-
|
|
66613
|
-
|
|
66614
|
-
|
|
66615
|
-
|
|
66616
|
-
|
|
66686
|
+
if (ts.isTypeAliasDeclaration(node.parent) && !(ts.getObjectFlags(getDeclaredTypeOfSymbol(symbol)) & (16 | 32))) {
|
|
66687
|
+
error(node, ts.Diagnostics.Variance_annotations_are_only_supported_in_type_aliases_for_object_function_constructor_and_mapped_types);
|
|
66688
|
+
}
|
|
66689
|
+
else if (modifiers === 32768 || modifiers === 65536) {
|
|
66690
|
+
var source = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSubType : markerSuperType);
|
|
66691
|
+
var target = createMarkerType(symbol, typeParameter, modifiers === 65536 ? markerSuperType : markerSubType);
|
|
66692
|
+
var saveVarianceTypeParameter = typeParameter;
|
|
66693
|
+
varianceTypeParameter = typeParameter;
|
|
66694
|
+
checkTypeAssignableTo(source, target, node, ts.Diagnostics.Type_0_is_not_assignable_to_type_1_as_implied_by_variance_annotation);
|
|
66695
|
+
varianceTypeParameter = saveVarianceTypeParameter;
|
|
66696
|
+
}
|
|
66617
66697
|
}
|
|
66618
66698
|
}
|
|
66619
|
-
addLazyDiagnostic(function () { return checkTypeNameIsReserved(node.name, ts.Diagnostics.Type_parameter_name_cannot_be_0); });
|
|
66620
66699
|
}
|
|
66621
66700
|
function checkParameter(node) {
|
|
66622
66701
|
checkGrammarDecoratorsAndModifiers(node);
|
|
@@ -67043,7 +67122,7 @@ var ts;
|
|
|
67043
67122
|
superCallStatement = statement;
|
|
67044
67123
|
break;
|
|
67045
67124
|
}
|
|
67046
|
-
if (
|
|
67125
|
+
if (nodeImmediatelyReferencesSuperOrThis(statement)) {
|
|
67047
67126
|
break;
|
|
67048
67127
|
}
|
|
67049
67128
|
}
|
|
@@ -71581,6 +71660,9 @@ var ts;
|
|
|
71581
71660
|
case 226:
|
|
71582
71661
|
checkClassExpressionDeferred(node);
|
|
71583
71662
|
break;
|
|
71663
|
+
case 163:
|
|
71664
|
+
checkTypeParameterDeferred(node);
|
|
71665
|
+
break;
|
|
71584
71666
|
case 279:
|
|
71585
71667
|
checkJsxSelfClosingElementDeferred(node);
|
|
71586
71668
|
break;
|
|
@@ -72054,15 +72136,14 @@ var ts;
|
|
|
72054
72136
|
return propertyDeclaration;
|
|
72055
72137
|
}
|
|
72056
72138
|
}
|
|
72057
|
-
else if (ts.isMetaProperty(parent)) {
|
|
72058
|
-
|
|
72059
|
-
var propertyDeclaration = getPropertyOfType(parentType, node.escapedText);
|
|
72060
|
-
if (propertyDeclaration) {
|
|
72061
|
-
return propertyDeclaration;
|
|
72062
|
-
}
|
|
72063
|
-
if (parent.keywordToken === 103) {
|
|
72139
|
+
else if (ts.isMetaProperty(parent) && parent.name === node) {
|
|
72140
|
+
if (parent.keywordToken === 103 && ts.idText(node) === "target") {
|
|
72064
72141
|
return checkNewTargetMetaProperty(parent).symbol;
|
|
72065
72142
|
}
|
|
72143
|
+
if (parent.keywordToken === 100 && ts.idText(node) === "meta") {
|
|
72144
|
+
return getGlobalImportMetaExpressionType().members.get("meta");
|
|
72145
|
+
}
|
|
72146
|
+
return undefined;
|
|
72066
72147
|
}
|
|
72067
72148
|
}
|
|
72068
72149
|
switch (node.kind) {
|
|
@@ -72291,11 +72372,11 @@ var ts;
|
|
|
72291
72372
|
var _a = symbol, leftSpread = _a.leftSpread, rightSpread = _a.rightSpread, syntheticOrigin = _a.syntheticOrigin;
|
|
72292
72373
|
return leftSpread ? [leftSpread, rightSpread]
|
|
72293
72374
|
: syntheticOrigin ? [syntheticOrigin]
|
|
72294
|
-
: ts.singleElementArray(
|
|
72375
|
+
: ts.singleElementArray(tryGetTarget(symbol));
|
|
72295
72376
|
}
|
|
72296
72377
|
return undefined;
|
|
72297
72378
|
}
|
|
72298
|
-
function
|
|
72379
|
+
function tryGetTarget(symbol) {
|
|
72299
72380
|
var target;
|
|
72300
72381
|
var next = symbol;
|
|
72301
72382
|
while (next = getSymbolLinks(next).target) {
|
|
@@ -72480,7 +72561,7 @@ var ts;
|
|
|
72480
72561
|
if (links === null || links === void 0 ? void 0 : links.referenced) {
|
|
72481
72562
|
return true;
|
|
72482
72563
|
}
|
|
72483
|
-
var target = getSymbolLinks(symbol).
|
|
72564
|
+
var target = getSymbolLinks(symbol).aliasTarget;
|
|
72484
72565
|
if (target && ts.getEffectiveModifierFlags(node) & 1 &&
|
|
72485
72566
|
target.flags & 111551 &&
|
|
72486
72567
|
(ts.shouldPreserveConstEnums(compilerOptions) || !isConstEnumOrConstEnumOnlyModule(target))) {
|
|
@@ -72516,11 +72597,6 @@ var ts;
|
|
|
72516
72597
|
!parameter.initializer &&
|
|
72517
72598
|
ts.hasSyntacticModifier(parameter, 16476);
|
|
72518
72599
|
}
|
|
72519
|
-
function isOptionalUninitializedParameter(parameter) {
|
|
72520
|
-
return !!strictNullChecks &&
|
|
72521
|
-
isOptionalParameter(parameter) &&
|
|
72522
|
-
!parameter.initializer;
|
|
72523
|
-
}
|
|
72524
72600
|
function isExpandoFunctionDeclaration(node) {
|
|
72525
72601
|
var declaration = ts.getParseTreeNode(node, ts.isFunctionDeclaration);
|
|
72526
72602
|
if (!declaration) {
|
|
@@ -73385,8 +73461,7 @@ var ts;
|
|
|
73385
73461
|
case 144:
|
|
73386
73462
|
var inOutFlag = modifier.kind === 101 ? 32768 : 65536;
|
|
73387
73463
|
var inOutText = modifier.kind === 101 ? "in" : "out";
|
|
73388
|
-
if (node.kind !== 163 || (node.parent.
|
|
73389
|
-
node.parent.kind !== 257 && node.parent.kind !== 259)) {
|
|
73464
|
+
if (node.kind !== 163 || !(ts.isInterfaceDeclaration(node.parent) || ts.isClassLike(node.parent) || ts.isTypeAliasDeclaration(node.parent))) {
|
|
73390
73465
|
return grammarErrorOnNode(modifier, ts.Diagnostics._0_modifier_can_only_appear_on_a_type_parameter_of_a_class_interface_or_type_alias, inOutText);
|
|
73391
73466
|
}
|
|
73392
73467
|
if (flags & inOutFlag) {
|
|
@@ -77582,19 +77657,19 @@ var ts;
|
|
|
77582
77657
|
}
|
|
77583
77658
|
var statements = [];
|
|
77584
77659
|
resumeLexicalEnvironment();
|
|
77585
|
-
var
|
|
77586
|
-
var superStatementIndex = ts.findSuperStatementIndex(body.statements,
|
|
77660
|
+
var prologueStatementCount = factory.copyPrologue(body.statements, statements, false, visitor);
|
|
77661
|
+
var superStatementIndex = ts.findSuperStatementIndex(body.statements, prologueStatementCount);
|
|
77587
77662
|
if (superStatementIndex >= 0) {
|
|
77588
|
-
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement,
|
|
77663
|
+
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, prologueStatementCount, superStatementIndex + 1 - prologueStatementCount));
|
|
77589
77664
|
}
|
|
77590
77665
|
var parameterPropertyAssignments = ts.mapDefined(parametersWithPropertyAssignments, transformParameterWithPropertyAssignment);
|
|
77591
77666
|
if (superStatementIndex >= 0) {
|
|
77592
77667
|
ts.addRange(statements, parameterPropertyAssignments);
|
|
77593
77668
|
}
|
|
77594
77669
|
else {
|
|
77595
|
-
statements =
|
|
77670
|
+
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, prologueStatementCount), true), parameterPropertyAssignments, true), statements.slice(prologueStatementCount), true);
|
|
77596
77671
|
}
|
|
77597
|
-
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, superStatementIndex + 1));
|
|
77672
|
+
ts.addRange(statements, ts.visitNodes(body.statements, visitor, ts.isStatement, superStatementIndex + 1 + prologueStatementCount));
|
|
77598
77673
|
statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
|
|
77599
77674
|
var block = factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), body.statements), true);
|
|
77600
77675
|
ts.setTextRange(block, body);
|
|
@@ -79014,7 +79089,7 @@ var ts;
|
|
|
79014
79089
|
}
|
|
79015
79090
|
resumeLexicalEnvironment();
|
|
79016
79091
|
var needsSyntheticConstructor = !constructor && isDerivedClass;
|
|
79017
|
-
var
|
|
79092
|
+
var indexOfFirstStatementAfterSuperAndPrologue = 0;
|
|
79018
79093
|
var prologueStatementCount = 0;
|
|
79019
79094
|
var superStatementIndex = -1;
|
|
79020
79095
|
var statements = [];
|
|
@@ -79022,8 +79097,11 @@ var ts;
|
|
|
79022
79097
|
prologueStatementCount = factory.copyPrologue(constructor.body.statements, statements, false, visitor);
|
|
79023
79098
|
superStatementIndex = ts.findSuperStatementIndex(constructor.body.statements, prologueStatementCount);
|
|
79024
79099
|
if (superStatementIndex >= 0) {
|
|
79025
|
-
|
|
79026
|
-
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, prologueStatementCount), true), ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, prologueStatementCount,
|
|
79100
|
+
indexOfFirstStatementAfterSuperAndPrologue = superStatementIndex + 1;
|
|
79101
|
+
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, prologueStatementCount), true), ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, prologueStatementCount, indexOfFirstStatementAfterSuperAndPrologue - prologueStatementCount), true), statements.slice(prologueStatementCount), true);
|
|
79102
|
+
}
|
|
79103
|
+
else if (prologueStatementCount >= 0) {
|
|
79104
|
+
indexOfFirstStatementAfterSuperAndPrologue = prologueStatementCount;
|
|
79027
79105
|
}
|
|
79028
79106
|
}
|
|
79029
79107
|
if (needsSyntheticConstructor) {
|
|
@@ -79042,19 +79120,17 @@ var ts;
|
|
|
79042
79120
|
}
|
|
79043
79121
|
}
|
|
79044
79122
|
if (parameterPropertyDeclarationCount > 0) {
|
|
79045
|
-
var parameterProperties = ts.visitNodes(constructor.body.statements, visitor, ts.isStatement,
|
|
79123
|
+
var parameterProperties = ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, indexOfFirstStatementAfterSuperAndPrologue, parameterPropertyDeclarationCount);
|
|
79046
79124
|
if (superStatementIndex >= 0) {
|
|
79047
79125
|
ts.addRange(statements, parameterProperties);
|
|
79048
79126
|
}
|
|
79049
|
-
else if (needsSyntheticConstructor) {
|
|
79050
|
-
statements = __spreadArray(__spreadArray([
|
|
79051
|
-
statements[0]
|
|
79052
|
-
], parameterProperties, true), statements.slice(1), true);
|
|
79053
|
-
}
|
|
79054
79127
|
else {
|
|
79055
|
-
|
|
79128
|
+
var superAndPrologueStatementCount = prologueStatementCount;
|
|
79129
|
+
if (needsSyntheticConstructor)
|
|
79130
|
+
superAndPrologueStatementCount++;
|
|
79131
|
+
statements = __spreadArray(__spreadArray(__spreadArray([], statements.slice(0, superAndPrologueStatementCount), true), parameterProperties, true), statements.slice(superAndPrologueStatementCount), true);
|
|
79056
79132
|
}
|
|
79057
|
-
|
|
79133
|
+
indexOfFirstStatementAfterSuperAndPrologue += parameterPropertyDeclarationCount;
|
|
79058
79134
|
}
|
|
79059
79135
|
}
|
|
79060
79136
|
}
|
|
@@ -79062,7 +79138,7 @@ var ts;
|
|
|
79062
79138
|
addMethodStatements(statements, privateMethodsAndAccessors, receiver);
|
|
79063
79139
|
addPropertyOrClassStaticBlockStatements(statements, properties, receiver);
|
|
79064
79140
|
if (constructor) {
|
|
79065
|
-
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitBodyStatement, ts.isStatement,
|
|
79141
|
+
ts.addRange(statements, ts.visitNodes(constructor.body.statements, visitBodyStatement, ts.isStatement, indexOfFirstStatementAfterSuperAndPrologue));
|
|
79066
79142
|
}
|
|
79067
79143
|
statements = factory.mergeLexicalEnvironment(statements, endLexicalEnvironment());
|
|
79068
79144
|
return ts.setTextRange(factory.createBlock(ts.setTextRange(factory.createNodeArray(statements), constructor ? constructor.body.statements : node.members), true), constructor ? constructor.body : undefined);
|
|
@@ -82282,7 +82358,7 @@ var ts;
|
|
|
82282
82358
|
else {
|
|
82283
82359
|
insertCaptureThisForNodeIfNeeded(prologue, constructor);
|
|
82284
82360
|
}
|
|
82285
|
-
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex)), true), statements, true)), constructor.body.statements), true);
|
|
82361
|
+
var body = factory.createBlock(ts.setTextRange(factory.createNodeArray(__spreadArray(__spreadArray(__spreadArray(__spreadArray([], existingPrologue, true), prologue, true), (superStatementIndex <= existingPrologue.length ? ts.emptyArray : ts.visitNodes(constructor.body.statements, visitor, ts.isStatement, existingPrologue.length, superStatementIndex - existingPrologue.length)), true), statements, true)), constructor.body.statements), true);
|
|
82286
82362
|
ts.setTextRange(body, constructor.body);
|
|
82287
82363
|
return body;
|
|
82288
82364
|
}
|
|
@@ -88880,6 +88956,10 @@ var ts;
|
|
|
88880
88956
|
return factory.updateModifiers(statement, modifiers);
|
|
88881
88957
|
}
|
|
88882
88958
|
function transformTopLevelDeclaration(input) {
|
|
88959
|
+
if (lateMarkedStatements) {
|
|
88960
|
+
while (ts.orderedRemoveItem(lateMarkedStatements, input))
|
|
88961
|
+
;
|
|
88962
|
+
}
|
|
88883
88963
|
if (shouldStripInternal(input))
|
|
88884
88964
|
return;
|
|
88885
88965
|
switch (input.kind) {
|
|
@@ -89846,7 +89926,7 @@ var ts;
|
|
|
89846
89926
|
addOutput(buildInfoPath);
|
|
89847
89927
|
}
|
|
89848
89928
|
function getOwnOutputFileNames(configFile, inputFileName, ignoreCase, addOutput, getCommonSourceDirectory) {
|
|
89849
|
-
if (ts.
|
|
89929
|
+
if (ts.isDeclarationFileName(inputFileName))
|
|
89850
89930
|
return;
|
|
89851
89931
|
var js = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
89852
89932
|
addOutput(js);
|
|
@@ -89884,7 +89964,7 @@ var ts;
|
|
|
89884
89964
|
ts.getCommonSourceDirectory = getCommonSourceDirectory;
|
|
89885
89965
|
function getCommonSourceDirectoryOfConfig(_a, ignoreCase) {
|
|
89886
89966
|
var options = _a.options, fileNames = _a.fileNames;
|
|
89887
|
-
return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.supportedJSExtensionsFlat)) && !ts.
|
|
89967
|
+
return getCommonSourceDirectory(options, function () { return ts.filter(fileNames, function (file) { return !(options.noEmitForJsFiles && ts.fileExtensionIsOneOf(file, ts.supportedJSExtensionsFlat)) && !ts.isDeclarationFileName(file); }); }, ts.getDirectoryPath(ts.normalizeSlashes(ts.Debug.checkDefined(options.configFilePath))), ts.createGetCanonicalFileName(!ignoreCase));
|
|
89888
89968
|
}
|
|
89889
89969
|
ts.getCommonSourceDirectoryOfConfig = getCommonSourceDirectoryOfConfig;
|
|
89890
89970
|
function getAllProjectOutputs(configFile, ignoreCase) {
|
|
@@ -89924,7 +90004,7 @@ var ts;
|
|
|
89924
90004
|
var getCommonSourceDirectory = ts.memoize(function () { return getCommonSourceDirectoryOfConfig(configFile, ignoreCase); });
|
|
89925
90005
|
for (var _a = 0, _b = configFile.fileNames; _a < _b.length; _a++) {
|
|
89926
90006
|
var inputFileName = _b[_a];
|
|
89927
|
-
if (ts.
|
|
90007
|
+
if (ts.isDeclarationFileName(inputFileName))
|
|
89928
90008
|
continue;
|
|
89929
90009
|
var jsFilePath = getOutputJSFileName(inputFileName, configFile, ignoreCase, getCommonSourceDirectory);
|
|
89930
90010
|
if (jsFilePath)
|
|
@@ -94779,7 +94859,7 @@ var ts;
|
|
|
94779
94859
|
return false;
|
|
94780
94860
|
if (ts.outFile(options) || options.outDir)
|
|
94781
94861
|
return false;
|
|
94782
|
-
if (ts.
|
|
94862
|
+
if (ts.isDeclarationFileName(fileOrDirectoryPath)) {
|
|
94783
94863
|
if (options.declarationDir)
|
|
94784
94864
|
return false;
|
|
94785
94865
|
}
|
|
@@ -95837,7 +95917,7 @@ var ts;
|
|
|
95837
95917
|
var getCommonSourceDirectory_2 = ts.memoize(function () { return ts.getCommonSourceDirectoryOfConfig(parsedRef.commandLine, !host.useCaseSensitiveFileNames()); });
|
|
95838
95918
|
for (var _b = 0, _c = parsedRef.commandLine.fileNames; _b < _c.length; _b++) {
|
|
95839
95919
|
var fileName = _c[_b];
|
|
95840
|
-
if (!ts.
|
|
95920
|
+
if (!ts.isDeclarationFileName(fileName) && !ts.fileExtensionIs(fileName, ".json")) {
|
|
95841
95921
|
processProjectReferenceFile(ts.getOutputDeclarationFileName(fileName, parsedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory_2), { kind: ts.FileIncludeKind.OutputFromProjectReference, index: index });
|
|
95842
95922
|
}
|
|
95843
95923
|
}
|
|
@@ -96013,7 +96093,7 @@ var ts;
|
|
|
96013
96093
|
}
|
|
96014
96094
|
function getRedirectReferenceForResolution(file) {
|
|
96015
96095
|
var redirect = getResolvedProjectReferenceToRedirect(file.originalFileName);
|
|
96016
|
-
if (redirect || !ts.
|
|
96096
|
+
if (redirect || !ts.isDeclarationFileName(file.originalFileName))
|
|
96017
96097
|
return redirect;
|
|
96018
96098
|
var resultFromDts = getRedirectReferenceForResolutionFromSourceOfProject(file.path);
|
|
96019
96099
|
if (resultFromDts)
|
|
@@ -97202,7 +97282,7 @@ var ts;
|
|
|
97202
97282
|
return referencedProject && getProjectReferenceOutputName(referencedProject, fileName);
|
|
97203
97283
|
}
|
|
97204
97284
|
function getProjectReferenceRedirectProject(fileName) {
|
|
97205
|
-
if (!resolvedProjectReferences || !resolvedProjectReferences.length || ts.
|
|
97285
|
+
if (!resolvedProjectReferences || !resolvedProjectReferences.length || ts.isDeclarationFileName(fileName) || ts.fileExtensionIs(fileName, ".json")) {
|
|
97206
97286
|
return undefined;
|
|
97207
97287
|
}
|
|
97208
97288
|
return getResolvedProjectReferenceToRedirect(fileName);
|
|
@@ -97244,7 +97324,7 @@ var ts;
|
|
|
97244
97324
|
else {
|
|
97245
97325
|
var getCommonSourceDirectory_3 = ts.memoize(function () { return ts.getCommonSourceDirectoryOfConfig(resolvedRef.commandLine, !host.useCaseSensitiveFileNames()); });
|
|
97246
97326
|
ts.forEach(resolvedRef.commandLine.fileNames, function (fileName) {
|
|
97247
|
-
if (!ts.
|
|
97327
|
+
if (!ts.isDeclarationFileName(fileName) && !ts.fileExtensionIs(fileName, ".json")) {
|
|
97248
97328
|
var outputDts = ts.getOutputDeclarationFileName(fileName, resolvedRef.commandLine, !host.useCaseSensitiveFileNames(), getCommonSourceDirectory_3);
|
|
97249
97329
|
mapFromToProjectReferenceRedirectSource.set(toPath(outputDts), fileName);
|
|
97250
97330
|
}
|
|
@@ -97993,7 +98073,7 @@ var ts;
|
|
|
97993
98073
|
if (options.outDir) {
|
|
97994
98074
|
return ts.containsPath(options.outDir, filePath, currentDirectory, !host.useCaseSensitiveFileNames());
|
|
97995
98075
|
}
|
|
97996
|
-
if (ts.fileExtensionIsOneOf(filePath, ts.supportedJSExtensionsFlat) || ts.
|
|
98076
|
+
if (ts.fileExtensionIsOneOf(filePath, ts.supportedJSExtensionsFlat) || ts.isDeclarationFileName(filePath)) {
|
|
97997
98077
|
var filePathWithoutExtension = ts.removeFileExtension(filePath);
|
|
97998
98078
|
return !!getSourceFileByPath((filePathWithoutExtension + ".ts")) ||
|
|
97999
98079
|
!!getSourceFileByPath((filePathWithoutExtension + ".tsx"));
|
|
@@ -98285,13 +98365,9 @@ var ts;
|
|
|
98285
98365
|
ts.getFileEmitOutput = getFileEmitOutput;
|
|
98286
98366
|
var BuilderState;
|
|
98287
98367
|
(function (BuilderState) {
|
|
98288
|
-
var manyToManyPathMapCount = 0;
|
|
98289
98368
|
function createManyToManyPathMap() {
|
|
98290
98369
|
function create(forward, reverse, deleted) {
|
|
98291
|
-
var version = 0;
|
|
98292
98370
|
var map = {
|
|
98293
|
-
id: manyToManyPathMapCount++,
|
|
98294
|
-
version: function () { return version; },
|
|
98295
98371
|
clone: function () { return create(new ts.Map(forward), new ts.Map(reverse), deleted && new ts.Set(deleted)); },
|
|
98296
98372
|
forEach: function (fn) { return forward.forEach(fn); },
|
|
98297
98373
|
getKeys: function (v) { return reverse.get(v); },
|
|
@@ -98307,30 +98383,29 @@ var ts;
|
|
|
98307
98383
|
}
|
|
98308
98384
|
set.forEach(function (v) { return deleteFromMultimap(reverse, v, k); });
|
|
98309
98385
|
forward.delete(k);
|
|
98310
|
-
version++;
|
|
98311
98386
|
return true;
|
|
98312
98387
|
},
|
|
98313
98388
|
set: function (k, vSet) {
|
|
98314
|
-
|
|
98389
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.delete(k);
|
|
98315
98390
|
var existingVSet = forward.get(k);
|
|
98316
98391
|
forward.set(k, vSet);
|
|
98317
98392
|
existingVSet === null || existingVSet === void 0 ? void 0 : existingVSet.forEach(function (v) {
|
|
98318
98393
|
if (!vSet.has(v)) {
|
|
98319
|
-
changed = true;
|
|
98320
98394
|
deleteFromMultimap(reverse, v, k);
|
|
98321
98395
|
}
|
|
98322
98396
|
});
|
|
98323
98397
|
vSet.forEach(function (v) {
|
|
98324
98398
|
if (!(existingVSet === null || existingVSet === void 0 ? void 0 : existingVSet.has(v))) {
|
|
98325
|
-
changed = true;
|
|
98326
98399
|
addToMultimap(reverse, v, k);
|
|
98327
98400
|
}
|
|
98328
98401
|
});
|
|
98329
|
-
if (changed) {
|
|
98330
|
-
version++;
|
|
98331
|
-
}
|
|
98332
98402
|
return map;
|
|
98333
98403
|
},
|
|
98404
|
+
clear: function () {
|
|
98405
|
+
forward.clear();
|
|
98406
|
+
reverse.clear();
|
|
98407
|
+
deleted === null || deleted === void 0 ? void 0 : deleted.clear();
|
|
98408
|
+
}
|
|
98334
98409
|
};
|
|
98335
98410
|
return map;
|
|
98336
98411
|
}
|
|
@@ -98345,11 +98420,10 @@ var ts;
|
|
|
98345
98420
|
}
|
|
98346
98421
|
set.add(v);
|
|
98347
98422
|
}
|
|
98348
|
-
function deleteFromMultimap(map, k, v
|
|
98349
|
-
if (removeEmpty === void 0) { removeEmpty = true; }
|
|
98423
|
+
function deleteFromMultimap(map, k, v) {
|
|
98350
98424
|
var set = map.get(k);
|
|
98351
98425
|
if (set === null || set === void 0 ? void 0 : set.delete(v)) {
|
|
98352
|
-
if (
|
|
98426
|
+
if (!set.size) {
|
|
98353
98427
|
map.delete(k);
|
|
98354
98428
|
}
|
|
98355
98429
|
return true;
|
|
@@ -98525,7 +98599,7 @@ var ts;
|
|
|
98525
98599
|
var emitOutput_1 = getFileEmitOutput(programOfThisState, sourceFile, true, cancellationToken, undefined, true);
|
|
98526
98600
|
var firstDts_1 = ts.firstOrUndefined(emitOutput_1.outputFiles);
|
|
98527
98601
|
if (firstDts_1) {
|
|
98528
|
-
ts.Debug.assert(ts.
|
|
98602
|
+
ts.Debug.assert(ts.isDeclarationFileName(firstDts_1.name), "File extension for signature expected to be dts", function () { return "Found: " + ts.getAnyExtensionFromPath(firstDts_1.name) + " for " + firstDts_1.name + ":: All output files: " + JSON.stringify(emitOutput_1.outputFiles.map(function (f) { return f.name; })); });
|
|
98529
98603
|
latestSignature = (computeHash || ts.generateDjb2Hash)(firstDts_1.text);
|
|
98530
98604
|
if (exportedModulesMapCache && latestSignature !== prevSignature) {
|
|
98531
98605
|
updateExportedModules(sourceFile, emitOutput_1.exportedModulesFromDeclarationEmit, exportedModulesMapCache);
|
|
@@ -98574,18 +98648,6 @@ var ts;
|
|
|
98574
98648
|
var _a;
|
|
98575
98649
|
if (exportedModulesMapCache) {
|
|
98576
98650
|
ts.Debug.assert(!!state.exportedModulesMap);
|
|
98577
|
-
var cacheId = exportedModulesMapCache.id;
|
|
98578
|
-
var cacheVersion = exportedModulesMapCache.version();
|
|
98579
|
-
if (state.previousCache) {
|
|
98580
|
-
if (state.previousCache.id === cacheId && state.previousCache.version === cacheVersion) {
|
|
98581
|
-
return;
|
|
98582
|
-
}
|
|
98583
|
-
state.previousCache.id = cacheId;
|
|
98584
|
-
state.previousCache.version = cacheVersion;
|
|
98585
|
-
}
|
|
98586
|
-
else {
|
|
98587
|
-
state.previousCache = { id: cacheId, version: cacheVersion };
|
|
98588
|
-
}
|
|
98589
98651
|
(_a = exportedModulesMapCache.deletedKeys()) === null || _a === void 0 ? void 0 : _a.forEach(function (path) { return state.exportedModulesMap.deleteKey(path); });
|
|
98590
98652
|
exportedModulesMapCache.forEach(function (exportedModules, path) { return state.exportedModulesMap.set(path, exportedModules); });
|
|
98591
98653
|
}
|
|
@@ -98838,7 +98900,8 @@ var ts;
|
|
|
98838
98900
|
function assertSourceFileOkWithoutNextAffectedCall(state, sourceFile) {
|
|
98839
98901
|
ts.Debug.assert(!sourceFile || !state.affectedFiles || state.affectedFiles[state.affectedFilesIndex - 1] !== sourceFile || !state.semanticDiagnosticsPerFile.has(sourceFile.resolvedPath));
|
|
98840
98902
|
}
|
|
98841
|
-
function getNextAffectedFile(state, cancellationToken, computeHash) {
|
|
98903
|
+
function getNextAffectedFile(state, cancellationToken, computeHash, host) {
|
|
98904
|
+
var _a;
|
|
98842
98905
|
while (true) {
|
|
98843
98906
|
var affectedFiles = state.affectedFiles;
|
|
98844
98907
|
if (affectedFiles) {
|
|
@@ -98848,7 +98911,7 @@ var ts;
|
|
|
98848
98911
|
var affectedFile = affectedFiles[affectedFilesIndex];
|
|
98849
98912
|
if (!seenAffectedFiles.has(affectedFile.resolvedPath)) {
|
|
98850
98913
|
state.affectedFilesIndex = affectedFilesIndex;
|
|
98851
|
-
handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash);
|
|
98914
|
+
handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host);
|
|
98852
98915
|
return affectedFile;
|
|
98853
98916
|
}
|
|
98854
98917
|
affectedFilesIndex++;
|
|
@@ -98858,6 +98921,7 @@ var ts;
|
|
|
98858
98921
|
ts.BuilderState.updateSignaturesFromCache(state, state.currentAffectedFilesSignatures);
|
|
98859
98922
|
state.currentAffectedFilesSignatures.clear();
|
|
98860
98923
|
ts.BuilderState.updateExportedFilesMapFromCache(state, state.currentAffectedFilesExportedModulesMap);
|
|
98924
|
+
(_a = state.currentAffectedFilesExportedModulesMap) === null || _a === void 0 ? void 0 : _a.clear();
|
|
98861
98925
|
state.affectedFiles = undefined;
|
|
98862
98926
|
}
|
|
98863
98927
|
var nextKey = state.changedFilesSet.keys().next();
|
|
@@ -98882,6 +98946,11 @@ var ts;
|
|
|
98882
98946
|
state.seenAffectedFiles = new ts.Set();
|
|
98883
98947
|
}
|
|
98884
98948
|
}
|
|
98949
|
+
function clearAffectedFilesPendingEmit(state) {
|
|
98950
|
+
state.affectedFilesPendingEmit = undefined;
|
|
98951
|
+
state.affectedFilesPendingEmitKind = undefined;
|
|
98952
|
+
state.affectedFilesPendingEmitIndex = undefined;
|
|
98953
|
+
}
|
|
98885
98954
|
function getNextAffectedFilePendingEmit(state) {
|
|
98886
98955
|
var affectedFilesPendingEmit = state.affectedFilesPendingEmit;
|
|
98887
98956
|
if (affectedFilesPendingEmit) {
|
|
@@ -98897,13 +98966,11 @@ var ts;
|
|
|
98897
98966
|
}
|
|
98898
98967
|
}
|
|
98899
98968
|
}
|
|
98900
|
-
state
|
|
98901
|
-
state.affectedFilesPendingEmitKind = undefined;
|
|
98902
|
-
state.affectedFilesPendingEmitIndex = undefined;
|
|
98969
|
+
clearAffectedFilesPendingEmit(state);
|
|
98903
98970
|
}
|
|
98904
98971
|
return undefined;
|
|
98905
98972
|
}
|
|
98906
|
-
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash) {
|
|
98973
|
+
function handleDtsMayChangeOfAffectedFile(state, affectedFile, cancellationToken, computeHash, host) {
|
|
98907
98974
|
var _a;
|
|
98908
98975
|
removeSemanticDiagnosticsOf(state, affectedFile.resolvedPath);
|
|
98909
98976
|
if (state.allFilesExcludingDefaultLibraryFile === state.affectedFiles) {
|
|
@@ -98924,16 +98991,16 @@ var ts;
|
|
|
98924
98991
|
ts.Debug.assert(state.hasCalledUpdateShapeSignature.has(affectedFile.resolvedPath) || ((_a = state.currentAffectedFilesSignatures) === null || _a === void 0 ? void 0 : _a.has(affectedFile.resolvedPath)), "Signature not updated for affected file: " + affectedFile.fileName);
|
|
98925
98992
|
}
|
|
98926
98993
|
if (!state.compilerOptions.assumeChangesOnlyAffectDirectDependencies) {
|
|
98927
|
-
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash); });
|
|
98994
|
+
forEachReferencingModulesOfExportOfAffectedFile(state, affectedFile, function (state, path) { return handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host); });
|
|
98928
98995
|
}
|
|
98929
98996
|
}
|
|
98930
|
-
function handleDtsMayChangeOf(state, path, cancellationToken, computeHash) {
|
|
98997
|
+
function handleDtsMayChangeOf(state, path, cancellationToken, computeHash, host) {
|
|
98931
98998
|
removeSemanticDiagnosticsOf(state, path);
|
|
98932
98999
|
if (!state.changedFilesSet.has(path)) {
|
|
98933
99000
|
var program = ts.Debug.checkDefined(state.program);
|
|
98934
99001
|
var sourceFile = program.getSourceFileByPath(path);
|
|
98935
99002
|
if (sourceFile) {
|
|
98936
|
-
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap,
|
|
99003
|
+
ts.BuilderState.updateShapeSignature(state, program, sourceFile, ts.Debug.checkDefined(state.currentAffectedFilesSignatures), cancellationToken, computeHash, state.currentAffectedFilesExportedModulesMap, !host.disableUseFileVersionAsSignature);
|
|
98937
99004
|
if (ts.getEmitDeclarations(state.compilerOptions)) {
|
|
98938
99005
|
addToAffectedFilesPendingEmit(state, path, 0);
|
|
98939
99006
|
}
|
|
@@ -99078,8 +99145,8 @@ var ts;
|
|
|
99078
99145
|
var signature = state.currentAffectedFilesSignatures && state.currentAffectedFilesSignatures.get(key);
|
|
99079
99146
|
var actualSignature = signature !== null && signature !== void 0 ? signature : value.signature;
|
|
99080
99147
|
return value.version === actualSignature ?
|
|
99081
|
-
value.affectsGlobalScope ?
|
|
99082
|
-
{ version: value.version, signature: undefined, affectsGlobalScope:
|
|
99148
|
+
value.affectsGlobalScope || value.impliedFormat ?
|
|
99149
|
+
{ version: value.version, signature: undefined, affectsGlobalScope: value.affectsGlobalScope, impliedFormat: value.impliedFormat } :
|
|
99083
99150
|
value.version :
|
|
99084
99151
|
actualSignature !== undefined ?
|
|
99085
99152
|
signature === undefined ?
|
|
@@ -99312,7 +99379,7 @@ var ts;
|
|
|
99312
99379
|
return ts.emitSkippedWithNoDiagnostics;
|
|
99313
99380
|
}
|
|
99314
99381
|
function emitNextAffectedFile(writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
|
|
99315
|
-
var affected = getNextAffectedFile(state, cancellationToken, computeHash);
|
|
99382
|
+
var affected = getNextAffectedFile(state, cancellationToken, computeHash, host);
|
|
99316
99383
|
var emitKind = 1;
|
|
99317
99384
|
var isPendingEmitFile = false;
|
|
99318
99385
|
if (!affected) {
|
|
@@ -99338,55 +99405,49 @@ var ts;
|
|
|
99338
99405
|
return toAffectedFileEmitResult(state, ts.Debug.checkDefined(state.program).emit(affected === state.program ? undefined : affected, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles || emitKind === 0, customTransformers), affected, emitKind, isPendingEmitFile);
|
|
99339
99406
|
}
|
|
99340
99407
|
function emit(targetSourceFile, writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers) {
|
|
99341
|
-
var
|
|
99342
|
-
var savedAffectedFilesPendingEmit;
|
|
99343
|
-
var savedAffectedFilesPendingEmitKind;
|
|
99344
|
-
var savedAffectedFilesPendingEmitIndex;
|
|
99345
|
-
if (kind !== BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram &&
|
|
99346
|
-
!targetSourceFile &&
|
|
99347
|
-
!ts.outFile(state.compilerOptions) &&
|
|
99348
|
-
!state.compilerOptions.noEmit &&
|
|
99349
|
-
state.compilerOptions.noEmitOnError) {
|
|
99350
|
-
restorePendingEmitOnHandlingNoEmitSuccess = true;
|
|
99351
|
-
savedAffectedFilesPendingEmit = state.affectedFilesPendingEmit && state.affectedFilesPendingEmit.slice();
|
|
99352
|
-
savedAffectedFilesPendingEmitKind = state.affectedFilesPendingEmitKind && new ts.Map(state.affectedFilesPendingEmitKind);
|
|
99353
|
-
savedAffectedFilesPendingEmitIndex = state.affectedFilesPendingEmitIndex;
|
|
99354
|
-
}
|
|
99408
|
+
var _a;
|
|
99355
99409
|
if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) {
|
|
99356
99410
|
assertSourceFileOkWithoutNextAffectedCall(state, targetSourceFile);
|
|
99357
99411
|
}
|
|
99358
99412
|
var result = ts.handleNoEmitOptions(builderProgram, targetSourceFile, writeFile, cancellationToken);
|
|
99359
99413
|
if (result)
|
|
99360
99414
|
return result;
|
|
99361
|
-
if (
|
|
99362
|
-
|
|
99363
|
-
|
|
99364
|
-
|
|
99365
|
-
|
|
99366
|
-
|
|
99367
|
-
|
|
99368
|
-
|
|
99369
|
-
|
|
99370
|
-
|
|
99371
|
-
|
|
99372
|
-
|
|
99373
|
-
|
|
99374
|
-
|
|
99375
|
-
|
|
99376
|
-
|
|
99415
|
+
if (!targetSourceFile) {
|
|
99416
|
+
if (kind === BuilderProgramKind.EmitAndSemanticDiagnosticsBuilderProgram) {
|
|
99417
|
+
var sourceMaps = [];
|
|
99418
|
+
var emitSkipped = false;
|
|
99419
|
+
var diagnostics = void 0;
|
|
99420
|
+
var emittedFiles = [];
|
|
99421
|
+
var affectedEmitResult = void 0;
|
|
99422
|
+
while (affectedEmitResult = emitNextAffectedFile(writeFile, cancellationToken, emitOnlyDtsFiles, customTransformers)) {
|
|
99423
|
+
emitSkipped = emitSkipped || affectedEmitResult.result.emitSkipped;
|
|
99424
|
+
diagnostics = ts.addRange(diagnostics, affectedEmitResult.result.diagnostics);
|
|
99425
|
+
emittedFiles = ts.addRange(emittedFiles, affectedEmitResult.result.emittedFiles);
|
|
99426
|
+
sourceMaps = ts.addRange(sourceMaps, affectedEmitResult.result.sourceMaps);
|
|
99427
|
+
}
|
|
99428
|
+
return {
|
|
99429
|
+
emitSkipped: emitSkipped,
|
|
99430
|
+
diagnostics: diagnostics || ts.emptyArray,
|
|
99431
|
+
emittedFiles: emittedFiles,
|
|
99432
|
+
sourceMaps: sourceMaps
|
|
99433
|
+
};
|
|
99434
|
+
}
|
|
99435
|
+
else if ((_a = state.affectedFilesPendingEmitKind) === null || _a === void 0 ? void 0 : _a.size) {
|
|
99436
|
+
ts.Debug.assert(kind === BuilderProgramKind.SemanticDiagnosticsBuilderProgram);
|
|
99437
|
+
if (!emitOnlyDtsFiles
|
|
99438
|
+
|| ts.every(state.affectedFilesPendingEmit, function (path, index) {
|
|
99439
|
+
return index < state.affectedFilesPendingEmitIndex ||
|
|
99440
|
+
state.affectedFilesPendingEmitKind.get(path) === 0;
|
|
99441
|
+
})) {
|
|
99442
|
+
clearAffectedFilesPendingEmit(state);
|
|
99443
|
+
}
|
|
99377
99444
|
}
|
|
99378
|
-
return {
|
|
99379
|
-
emitSkipped: emitSkipped,
|
|
99380
|
-
diagnostics: diagnostics || ts.emptyArray,
|
|
99381
|
-
emittedFiles: emittedFiles,
|
|
99382
|
-
sourceMaps: sourceMaps
|
|
99383
|
-
};
|
|
99384
99445
|
}
|
|
99385
99446
|
return ts.Debug.checkDefined(state.program).emit(targetSourceFile, writeFile || ts.maybeBind(host, host.writeFile), cancellationToken, emitOnlyDtsFiles, customTransformers);
|
|
99386
99447
|
}
|
|
99387
99448
|
function getSemanticDiagnosticsOfNextAffectedFile(cancellationToken, ignoreSourceFile) {
|
|
99388
99449
|
while (true) {
|
|
99389
|
-
var affected = getNextAffectedFile(state, cancellationToken, computeHash);
|
|
99450
|
+
var affected = getNextAffectedFile(state, cancellationToken, computeHash, host);
|
|
99390
99451
|
if (!affected) {
|
|
99391
99452
|
return undefined;
|
|
99392
99453
|
}
|
|
@@ -102141,9 +102202,6 @@ var ts;
|
|
|
102141
102202
|
function newer(date1, date2) {
|
|
102142
102203
|
return date2 > date1 ? date2 : date1;
|
|
102143
102204
|
}
|
|
102144
|
-
function isDeclarationFile(fileName) {
|
|
102145
|
-
return ts.fileExtensionIs(fileName, ".d.ts");
|
|
102146
|
-
}
|
|
102147
102205
|
function isCircularBuildOrder(buildOrder) {
|
|
102148
102206
|
return !!buildOrder && !!buildOrder.buildOrder;
|
|
102149
102207
|
}
|
|
@@ -102681,7 +102739,7 @@ var ts;
|
|
|
102681
102739
|
outputFiles.forEach(function (_a) {
|
|
102682
102740
|
var name = _a.name, text = _a.text, writeByteOrderMark = _a.writeByteOrderMark;
|
|
102683
102741
|
var priorChangeTime;
|
|
102684
|
-
if (!anyDtsChanged &&
|
|
102742
|
+
if (!anyDtsChanged && ts.isDeclarationFileName(name)) {
|
|
102685
102743
|
if (host.fileExists(name) && state.readFileWithCache(name) === text) {
|
|
102686
102744
|
priorChangeTime = host.getModifiedTime(name);
|
|
102687
102745
|
}
|
|
@@ -102997,7 +103055,7 @@ var ts;
|
|
|
102997
103055
|
newestOutputFileTime = outputTime;
|
|
102998
103056
|
newestOutputFileName = output;
|
|
102999
103057
|
}
|
|
103000
|
-
if (
|
|
103058
|
+
if (ts.isDeclarationFileName(output)) {
|
|
103001
103059
|
var outputModifiedTime = ts.getModifiedTime(host, output);
|
|
103002
103060
|
newestDeclarationFileContentChangedTime = newer(newestDeclarationFileContentChangedTime, outputModifiedTime);
|
|
103003
103061
|
}
|
|
@@ -103137,7 +103195,7 @@ var ts;
|
|
|
103137
103195
|
reportVerbose = false;
|
|
103138
103196
|
reportStatus(state, verboseMessage, proj.options.configFilePath);
|
|
103139
103197
|
}
|
|
103140
|
-
if (
|
|
103198
|
+
if (ts.isDeclarationFileName(file)) {
|
|
103141
103199
|
priorNewestUpdateTime = newer(priorNewestUpdateTime, ts.getModifiedTime(host, file));
|
|
103142
103200
|
}
|
|
103143
103201
|
host.setModifiedTime(file, now);
|