@typescript-deploys/pr-build 4.9.0-pr-49929-7 → 4.9.0-pr-50856-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/tsc.js +161 -244
- package/lib/tsserver.js +286 -425
- package/lib/tsserverlibrary.d.ts +47 -50
- package/lib/tsserverlibrary.js +286 -425
- package/lib/typescript.d.ts +46 -49
- package/lib/typescript.js +285 -423
- package/lib/typescriptServices.d.ts +46 -49
- package/lib/typescriptServices.js +285 -423
- package/lib/typingsInstaller.js +184 -302
- 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.9";
|
|
72
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.
|
|
72
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.20220920");
|
|
73
73
|
var NativeCollections;
|
|
74
74
|
(function (NativeCollections) {
|
|
75
75
|
var globals = typeof globalThis !== "undefined" ? globalThis :
|
|
@@ -235,10 +235,6 @@ var ts;
|
|
|
235
235
|
return true;
|
|
236
236
|
}
|
|
237
237
|
ts.every = every;
|
|
238
|
-
function isArrayOf(array, callback) {
|
|
239
|
-
return every(array, callback);
|
|
240
|
-
}
|
|
241
|
-
ts.isArrayOf = isArrayOf;
|
|
242
238
|
function find(array, predicate, startIndex) {
|
|
243
239
|
if (array === undefined)
|
|
244
240
|
return undefined;
|
|
@@ -2270,7 +2266,7 @@ var ts;
|
|
|
2270
2266
|
if (typeof func !== "function") {
|
|
2271
2267
|
return "";
|
|
2272
2268
|
}
|
|
2273
|
-
else if (
|
|
2269
|
+
else if (ts.hasProperty(func, "name")) {
|
|
2274
2270
|
return func.name;
|
|
2275
2271
|
}
|
|
2276
2272
|
else {
|
|
@@ -2568,7 +2564,7 @@ var ts;
|
|
|
2568
2564
|
];
|
|
2569
2565
|
for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
|
|
2570
2566
|
var ctor = nodeConstructors_1[_i];
|
|
2571
|
-
if (!
|
|
2567
|
+
if (!ts.hasProperty(ctor, "__debugKind")) {
|
|
2572
2568
|
Object.defineProperties(ctor.prototype, {
|
|
2573
2569
|
__tsDebuggerDisplay: {
|
|
2574
2570
|
value: function () {
|
|
@@ -3272,7 +3268,6 @@ var ts;
|
|
|
3272
3268
|
var typeCatalog = [];
|
|
3273
3269
|
var legendPath;
|
|
3274
3270
|
var legend = [];
|
|
3275
|
-
;
|
|
3276
3271
|
function startTracing(tracingMode, traceDir, configFilePath) {
|
|
3277
3272
|
ts.Debug.assert(!ts.tracing, "Tracing already started");
|
|
3278
3273
|
if (fs === undefined) {
|
|
@@ -5858,8 +5853,6 @@ var ts;
|
|
|
5858
5853
|
The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access: diag(2357, ts.DiagnosticCategory.Error, "The_operand_of_an_increment_or_decrement_operator_must_be_a_variable_or_a_property_access_2357", "The operand of an increment or decrement operator must be a variable or a property access."),
|
|
5859
5854
|
The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_parameter: diag(2358, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_instanceof_expression_must_be_of_type_any_an_object_type_or_a_type_paramete_2358", "The left-hand side of an 'instanceof' expression must be of type 'any', an object type or a type parameter."),
|
|
5860
5855
|
The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_Function_interface_type: diag(2359, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_instanceof_expression_must_be_of_type_any_or_of_a_type_assignable_to_the_F_2359", "The right-hand side of an 'instanceof' expression must be of type 'any' or of a type assignable to the 'Function' interface type."),
|
|
5861
|
-
The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol: diag(2360, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or__2360", "The left-hand side of an 'in' expression must be a private identifier or of type 'any', 'string', 'number', or 'symbol'."),
|
|
5862
|
-
The_right_hand_side_of_an_in_expression_must_not_be_a_primitive: diag(2361, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_in_expression_must_not_be_a_primitive_2361", "The right-hand side of an 'in' expression must not be a primitive."),
|
|
5863
5856
|
The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2362, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2362", "The left-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
5864
5857
|
The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type: diag(2363, ts.DiagnosticCategory.Error, "The_right_hand_side_of_an_arithmetic_operation_must_be_of_type_any_number_bigint_or_an_enum_type_2363", "The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type."),
|
|
5865
5858
|
The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access: diag(2364, ts.DiagnosticCategory.Error, "The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access_2364", "The left-hand side of an assignment expression must be a variable or a property access."),
|
|
@@ -6108,6 +6101,7 @@ var ts;
|
|
|
6108
6101
|
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."),
|
|
6109
6102
|
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."),
|
|
6110
6103
|
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."),
|
|
6104
|
+
Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, ts.DiagnosticCategory.Error, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),
|
|
6111
6105
|
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."),
|
|
6112
6106
|
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."),
|
|
6113
6107
|
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."),
|
|
@@ -7429,7 +7423,7 @@ var ts;
|
|
|
7429
7423
|
}
|
|
7430
7424
|
ts.stringToToken = stringToToken;
|
|
7431
7425
|
function computeLineStarts(text) {
|
|
7432
|
-
var result =
|
|
7426
|
+
var result = [];
|
|
7433
7427
|
var pos = 0;
|
|
7434
7428
|
var lineStart = 0;
|
|
7435
7429
|
while (pos < text.length) {
|
|
@@ -7834,7 +7828,9 @@ var ts;
|
|
|
7834
7828
|
}
|
|
7835
7829
|
ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
|
|
7836
7830
|
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
7837
|
-
if (comments
|
|
7831
|
+
if (!comments) {
|
|
7832
|
+
comments = [];
|
|
7833
|
+
}
|
|
7838
7834
|
comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
|
|
7839
7835
|
return comments;
|
|
7840
7836
|
}
|
|
@@ -8859,12 +8855,31 @@ var ts;
|
|
|
8859
8855
|
pos++;
|
|
8860
8856
|
return token = 0;
|
|
8861
8857
|
}
|
|
8862
|
-
|
|
8858
|
+
var charAfterHash = codePointAt(text, pos + 1);
|
|
8859
|
+
if (charAfterHash === 92) {
|
|
8860
|
+
pos++;
|
|
8861
|
+
var extendedCookedChar_1 = peekExtendedUnicodeEscape();
|
|
8862
|
+
if (extendedCookedChar_1 >= 0 && isIdentifierStart(extendedCookedChar_1, languageVersion)) {
|
|
8863
|
+
pos += 3;
|
|
8864
|
+
tokenFlags |= 8;
|
|
8865
|
+
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
8866
|
+
return token = 80;
|
|
8867
|
+
}
|
|
8868
|
+
var cookedChar_1 = peekUnicodeEscape();
|
|
8869
|
+
if (cookedChar_1 >= 0 && isIdentifierStart(cookedChar_1, languageVersion)) {
|
|
8870
|
+
pos += 6;
|
|
8871
|
+
tokenFlags |= 1024;
|
|
8872
|
+
tokenValue = "#" + String.fromCharCode(cookedChar_1) + scanIdentifierParts();
|
|
8873
|
+
return token = 80;
|
|
8874
|
+
}
|
|
8875
|
+
pos--;
|
|
8876
|
+
}
|
|
8877
|
+
if (isIdentifierStart(charAfterHash, languageVersion)) {
|
|
8863
8878
|
pos++;
|
|
8864
|
-
scanIdentifier(
|
|
8879
|
+
scanIdentifier(charAfterHash, languageVersion);
|
|
8865
8880
|
}
|
|
8866
8881
|
else {
|
|
8867
|
-
tokenValue =
|
|
8882
|
+
tokenValue = "#";
|
|
8868
8883
|
error(ts.Diagnostics.Invalid_character, pos++, charSize(ch));
|
|
8869
8884
|
}
|
|
8870
8885
|
return token = 80;
|
|
@@ -9601,10 +9616,7 @@ var ts;
|
|
|
9601
9616
|
node = node.original;
|
|
9602
9617
|
}
|
|
9603
9618
|
}
|
|
9604
|
-
|
|
9605
|
-
return node;
|
|
9606
|
-
}
|
|
9607
|
-
return nodeTest(node) ? node : undefined;
|
|
9619
|
+
return !nodeTest || nodeTest(node) ? node : undefined;
|
|
9608
9620
|
}
|
|
9609
9621
|
ts.getOriginalNode = getOriginalNode;
|
|
9610
9622
|
function findAncestor(node, callback) {
|
|
@@ -10136,7 +10148,7 @@ var ts;
|
|
|
10136
10148
|
}
|
|
10137
10149
|
ts.isToken = isToken;
|
|
10138
10150
|
function isNodeArray(array) {
|
|
10139
|
-
return
|
|
10151
|
+
return ts.hasProperty(array, "pos") && ts.hasProperty(array, "end");
|
|
10140
10152
|
}
|
|
10141
10153
|
ts.isNodeArray = isNodeArray;
|
|
10142
10154
|
function isLiteralKind(kind) {
|
|
@@ -10445,13 +10457,6 @@ var ts;
|
|
|
10445
10457
|
return false;
|
|
10446
10458
|
}
|
|
10447
10459
|
ts.isDeclarationBindingElement = isDeclarationBindingElement;
|
|
10448
|
-
function isBindingOrAssignmentElement(node) {
|
|
10449
|
-
return ts.isVariableDeclaration(node)
|
|
10450
|
-
|| ts.isParameter(node)
|
|
10451
|
-
|| isObjectBindingOrAssignmentElement(node)
|
|
10452
|
-
|| isArrayBindingOrAssignmentElement(node);
|
|
10453
|
-
}
|
|
10454
|
-
ts.isBindingOrAssignmentElement = isBindingOrAssignmentElement;
|
|
10455
10460
|
function isBindingOrAssignmentPattern(node) {
|
|
10456
10461
|
return isObjectBindingOrAssignmentPattern(node)
|
|
10457
10462
|
|| isArrayBindingOrAssignmentPattern(node);
|
|
@@ -10486,21 +10491,6 @@ var ts;
|
|
|
10486
10491
|
return false;
|
|
10487
10492
|
}
|
|
10488
10493
|
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
|
|
10489
|
-
function isArrayBindingOrAssignmentElement(node) {
|
|
10490
|
-
switch (node.kind) {
|
|
10491
|
-
case 205:
|
|
10492
|
-
case 229:
|
|
10493
|
-
case 227:
|
|
10494
|
-
case 206:
|
|
10495
|
-
case 207:
|
|
10496
|
-
case 79:
|
|
10497
|
-
case 208:
|
|
10498
|
-
case 209:
|
|
10499
|
-
return true;
|
|
10500
|
-
}
|
|
10501
|
-
return ts.isAssignmentExpression(node, true);
|
|
10502
|
-
}
|
|
10503
|
-
ts.isArrayBindingOrAssignmentElement = isArrayBindingOrAssignmentElement;
|
|
10504
10494
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
10505
10495
|
var kind = node.kind;
|
|
10506
10496
|
return kind === 208
|
|
@@ -10609,19 +10599,6 @@ var ts;
|
|
|
10609
10599
|
}
|
|
10610
10600
|
}
|
|
10611
10601
|
ts.isUnaryExpressionWithWrite = isUnaryExpressionWithWrite;
|
|
10612
|
-
function isLiteralTypeLiteral(node) {
|
|
10613
|
-
node = skipPartiallyEmittedExpressions(node);
|
|
10614
|
-
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
10615
|
-
case 104:
|
|
10616
|
-
case 110:
|
|
10617
|
-
case 95:
|
|
10618
|
-
case 221:
|
|
10619
|
-
return true;
|
|
10620
|
-
default:
|
|
10621
|
-
return isLiteralExpression(node);
|
|
10622
|
-
}
|
|
10623
|
-
}
|
|
10624
|
-
ts.isLiteralTypeLiteral = isLiteralTypeLiteral;
|
|
10625
10602
|
function isExpression(node) {
|
|
10626
10603
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
10627
10604
|
}
|
|
@@ -11455,7 +11432,6 @@ var ts;
|
|
|
11455
11432
|
return emitNode && emitNode.flags || 0;
|
|
11456
11433
|
}
|
|
11457
11434
|
ts.getEmitFlags = getEmitFlags;
|
|
11458
|
-
;
|
|
11459
11435
|
function getScriptTargetFeatures() {
|
|
11460
11436
|
return {
|
|
11461
11437
|
es2015: {
|
|
@@ -11732,7 +11708,6 @@ var ts;
|
|
|
11732
11708
|
}
|
|
11733
11709
|
ts.isBlockScope = isBlockScope;
|
|
11734
11710
|
function isDeclarationWithTypeParameters(node) {
|
|
11735
|
-
ts.Debug.type(node);
|
|
11736
11711
|
switch (node.kind) {
|
|
11737
11712
|
case 341:
|
|
11738
11713
|
case 348:
|
|
@@ -11745,7 +11720,6 @@ var ts;
|
|
|
11745
11720
|
}
|
|
11746
11721
|
ts.isDeclarationWithTypeParameters = isDeclarationWithTypeParameters;
|
|
11747
11722
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
11748
|
-
ts.Debug.type(node);
|
|
11749
11723
|
switch (node.kind) {
|
|
11750
11724
|
case 176:
|
|
11751
11725
|
case 177:
|
|
@@ -15548,7 +15522,7 @@ var ts;
|
|
|
15548
15522
|
return node.initializer !== undefined;
|
|
15549
15523
|
}
|
|
15550
15524
|
function isWatchSet(options) {
|
|
15551
|
-
return options.watch &&
|
|
15525
|
+
return options.watch && ts.hasProperty(options, "watch");
|
|
15552
15526
|
}
|
|
15553
15527
|
ts.isWatchSet = isWatchSet;
|
|
15554
15528
|
function closeFileWatcher(watcher) {
|
|
@@ -15766,7 +15740,6 @@ var ts;
|
|
|
15766
15740
|
|| kind === 114
|
|
15767
15741
|
|| kind === 155
|
|
15768
15742
|
|| kind === 144
|
|
15769
|
-
|| kind === 139
|
|
15770
15743
|
|| kind === 230
|
|
15771
15744
|
|| kind === 315
|
|
15772
15745
|
|| kind === 316
|
|
@@ -17663,9 +17636,6 @@ var ts;
|
|
|
17663
17636
|
}
|
|
17664
17637
|
}
|
|
17665
17638
|
ts.createParenthesizerRules = createParenthesizerRules;
|
|
17666
|
-
function castToNodeArray(nodes) {
|
|
17667
|
-
return ts.cast(nodes, ts.isNodeArray);
|
|
17668
|
-
}
|
|
17669
17639
|
ts.nullParenthesizerRules = {
|
|
17670
17640
|
getParenthesizeLeftSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
17671
17641
|
getParenthesizeRightSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
@@ -17679,23 +17649,23 @@ var ts;
|
|
|
17679
17649
|
parenthesizeLeftSideOfAccess: function (expression) { return ts.cast(expression, ts.isLeftHandSideExpression); },
|
|
17680
17650
|
parenthesizeOperandOfPostfixUnary: function (operand) { return ts.cast(operand, ts.isLeftHandSideExpression); },
|
|
17681
17651
|
parenthesizeOperandOfPrefixUnary: function (operand) { return ts.cast(operand, ts.isUnaryExpression); },
|
|
17682
|
-
parenthesizeExpressionsOfCommaDelimitedList:
|
|
17652
|
+
parenthesizeExpressionsOfCommaDelimitedList: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17683
17653
|
parenthesizeExpressionForDisallowedComma: ts.identity,
|
|
17684
17654
|
parenthesizeExpressionOfExpressionStatement: ts.identity,
|
|
17685
17655
|
parenthesizeConciseBodyOfArrowFunction: ts.identity,
|
|
17686
17656
|
parenthesizeCheckTypeOfConditionalType: ts.identity,
|
|
17687
17657
|
parenthesizeExtendsTypeOfConditionalType: ts.identity,
|
|
17688
|
-
parenthesizeConstituentTypesOfUnionType:
|
|
17658
|
+
parenthesizeConstituentTypesOfUnionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17689
17659
|
parenthesizeConstituentTypeOfUnionType: ts.identity,
|
|
17690
|
-
parenthesizeConstituentTypesOfIntersectionType:
|
|
17660
|
+
parenthesizeConstituentTypesOfIntersectionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17691
17661
|
parenthesizeConstituentTypeOfIntersectionType: ts.identity,
|
|
17692
17662
|
parenthesizeOperandOfTypeOperator: ts.identity,
|
|
17693
17663
|
parenthesizeOperandOfReadonlyTypeOperator: ts.identity,
|
|
17694
17664
|
parenthesizeNonArrayTypeOfPostfixType: ts.identity,
|
|
17695
|
-
parenthesizeElementTypesOfTupleType:
|
|
17665
|
+
parenthesizeElementTypesOfTupleType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17696
17666
|
parenthesizeElementTypeOfTupleType: ts.identity,
|
|
17697
17667
|
parenthesizeTypeOfOptionalType: ts.identity,
|
|
17698
|
-
parenthesizeTypeArguments: function (nodes) { return nodes &&
|
|
17668
|
+
parenthesizeTypeArguments: function (nodes) { return nodes && ts.cast(nodes, ts.isNodeArray); },
|
|
17699
17669
|
parenthesizeLeadingTypeArgument: ts.identity,
|
|
17700
17670
|
};
|
|
17701
17671
|
})(ts || (ts = {}));
|
|
@@ -21762,7 +21732,7 @@ var ts;
|
|
|
21762
21732
|
clone.transformFlags = node.transformFlags;
|
|
21763
21733
|
setOriginalNode(clone, node);
|
|
21764
21734
|
for (var key in node) {
|
|
21765
|
-
if (
|
|
21735
|
+
if (ts.hasProperty(clone, key) || !ts.hasProperty(node, key)) {
|
|
21766
21736
|
continue;
|
|
21767
21737
|
}
|
|
21768
21738
|
clone[key] = node[key];
|
|
@@ -25806,7 +25776,6 @@ var ts;
|
|
|
25806
25776
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
25807
25777
|
visitNode(cbNode, node.type);
|
|
25808
25778
|
}
|
|
25809
|
-
;
|
|
25810
25779
|
function forEachChildInUnionOrIntersectionType(node, cbNode, cbNodes) {
|
|
25811
25780
|
return visitNodes(cbNode, cbNodes, node.types);
|
|
25812
25781
|
}
|
|
@@ -26849,7 +26818,7 @@ var ts;
|
|
|
26849
26818
|
}
|
|
26850
26819
|
function parsePrivateIdentifier() {
|
|
26851
26820
|
var pos = getNodePos();
|
|
26852
|
-
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.
|
|
26821
|
+
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.getTokenValue()));
|
|
26853
26822
|
nextToken();
|
|
26854
26823
|
return finishNode(node, pos);
|
|
26855
26824
|
}
|
|
@@ -31860,8 +31829,8 @@ var ts;
|
|
|
31860
31829
|
}
|
|
31861
31830
|
}
|
|
31862
31831
|
}
|
|
31863
|
-
function moveElementEntirelyPastChangeRange(element, delta, oldText, newText, aggressiveChecks) {
|
|
31864
|
-
if (
|
|
31832
|
+
function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) {
|
|
31833
|
+
if (isArray) {
|
|
31865
31834
|
visitArray(element);
|
|
31866
31835
|
}
|
|
31867
31836
|
else {
|
|
@@ -31869,7 +31838,6 @@ var ts;
|
|
|
31869
31838
|
}
|
|
31870
31839
|
return;
|
|
31871
31840
|
function visitNode(node) {
|
|
31872
|
-
ts.Debug.type(node);
|
|
31873
31841
|
var text = "";
|
|
31874
31842
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
31875
31843
|
text = oldText.substring(node.pos, node.end);
|
|
@@ -31891,7 +31859,6 @@ var ts;
|
|
|
31891
31859
|
checkNodePositions(node, aggressiveChecks);
|
|
31892
31860
|
}
|
|
31893
31861
|
function visitArray(array) {
|
|
31894
|
-
ts.Debug.type(array);
|
|
31895
31862
|
array._children = undefined;
|
|
31896
31863
|
ts.setTextRangePosEnd(array, array.pos + delta, array.end + delta);
|
|
31897
31864
|
for (var _i = 0, array_9 = array; _i < array_9.length; _i++) {
|
|
@@ -31945,10 +31912,9 @@ var ts;
|
|
|
31945
31912
|
visitNode(sourceFile);
|
|
31946
31913
|
return;
|
|
31947
31914
|
function visitNode(child) {
|
|
31948
|
-
ts.Debug.type(child);
|
|
31949
31915
|
ts.Debug.assert(child.pos <= child.end);
|
|
31950
31916
|
if (child.pos > changeRangeOldEnd) {
|
|
31951
|
-
moveElementEntirelyPastChangeRange(child, delta, oldText, newText, aggressiveChecks);
|
|
31917
|
+
moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks);
|
|
31952
31918
|
return;
|
|
31953
31919
|
}
|
|
31954
31920
|
var fullEnd = child.end;
|
|
@@ -31969,10 +31935,9 @@ var ts;
|
|
|
31969
31935
|
ts.Debug.assert(fullEnd < changeStart);
|
|
31970
31936
|
}
|
|
31971
31937
|
function visitArray(array) {
|
|
31972
|
-
ts.Debug.type(array);
|
|
31973
31938
|
ts.Debug.assert(array.pos <= array.end);
|
|
31974
31939
|
if (array.pos > changeRangeOldEnd) {
|
|
31975
|
-
moveElementEntirelyPastChangeRange(array, delta, oldText, newText, aggressiveChecks);
|
|
31940
|
+
moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks);
|
|
31976
31941
|
return;
|
|
31977
31942
|
}
|
|
31978
31943
|
var fullEnd = array.end;
|
|
@@ -35203,7 +35168,6 @@ var ts;
|
|
|
35203
35168
|
}
|
|
35204
35169
|
}
|
|
35205
35170
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
35206
|
-
ts.Debug.assert(typeof spec === "string");
|
|
35207
35171
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
35208
35172
|
return [ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
35209
35173
|
}
|
|
@@ -35307,7 +35271,7 @@ var ts;
|
|
|
35307
35271
|
function convertCompilerOptionsForTelemetry(opts) {
|
|
35308
35272
|
var out = {};
|
|
35309
35273
|
for (var key in opts) {
|
|
35310
|
-
if (
|
|
35274
|
+
if (ts.hasProperty(opts, key)) {
|
|
35311
35275
|
var type = getOptionFromName(key);
|
|
35312
35276
|
if (type !== undefined) {
|
|
35313
35277
|
out[key] = getOptionValueWithEmptyStrings(opts[key], type);
|
|
@@ -40809,7 +40773,8 @@ var ts;
|
|
|
40809
40773
|
var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
|
|
40810
40774
|
emptyTypeLiteralSymbol.members = ts.createSymbolTable();
|
|
40811
40775
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40812
|
-
var
|
|
40776
|
+
var unknownEmptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40777
|
+
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
40813
40778
|
var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40814
40779
|
emptyGenericType.instantiations = new ts.Map();
|
|
40815
40780
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -40912,6 +40877,7 @@ var ts;
|
|
|
40912
40877
|
var deferredGlobalOmitSymbol;
|
|
40913
40878
|
var deferredGlobalAwaitedSymbol;
|
|
40914
40879
|
var deferredGlobalBigIntType;
|
|
40880
|
+
var deferredGlobalRecordSymbol;
|
|
40915
40881
|
var allPotentiallyUnusedIdentifiers = new ts.Map();
|
|
40916
40882
|
var flowLoopStart = 0;
|
|
40917
40883
|
var flowLoopCount = 0;
|
|
@@ -40992,7 +40958,7 @@ var ts;
|
|
|
40992
40958
|
if (jsxFragmentPragma) {
|
|
40993
40959
|
var chosenPragma = ts.isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
40994
40960
|
file.localJsxFragmentFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
40995
|
-
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic
|
|
40961
|
+
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
40996
40962
|
if (file.localJsxFragmentFactory) {
|
|
40997
40963
|
return file.localJsxFragmentNamespace = ts.getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
40998
40964
|
}
|
|
@@ -41037,7 +41003,7 @@ var ts;
|
|
|
41037
41003
|
if (jsxPragma) {
|
|
41038
41004
|
var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
41039
41005
|
file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
41040
|
-
ts.visitNode(file.localJsxFactory, markAsSynthetic
|
|
41006
|
+
ts.visitNode(file.localJsxFactory, markAsSynthetic);
|
|
41041
41007
|
if (file.localJsxFactory) {
|
|
41042
41008
|
return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
41043
41009
|
}
|
|
@@ -42438,7 +42404,6 @@ var ts;
|
|
|
42438
42404
|
return valueSymbol;
|
|
42439
42405
|
}
|
|
42440
42406
|
var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
42441
|
-
ts.Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
42442
42407
|
result.declarations = ts.deduplicate(ts.concatenate(valueSymbol.declarations, typeSymbol.declarations), ts.equateValues);
|
|
42443
42408
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
42444
42409
|
if (valueSymbol.valueDeclaration)
|
|
@@ -44275,7 +44240,6 @@ var ts;
|
|
|
44275
44240
|
var objectFlags = ts.getObjectFlags(type);
|
|
44276
44241
|
if (objectFlags & 4) {
|
|
44277
44242
|
ts.Debug.assert(!!(type.flags & 524288));
|
|
44278
|
-
ts.Debug.type(type);
|
|
44279
44243
|
return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type);
|
|
44280
44244
|
}
|
|
44281
44245
|
if (type.flags & 262144 || objectFlags & 3) {
|
|
@@ -45615,7 +45579,7 @@ var ts;
|
|
|
45615
45579
|
}
|
|
45616
45580
|
var hadError = false;
|
|
45617
45581
|
var file = ts.getSourceFileOfNode(existing);
|
|
45618
|
-
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols
|
|
45582
|
+
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols);
|
|
45619
45583
|
if (hadError) {
|
|
45620
45584
|
return undefined;
|
|
45621
45585
|
}
|
|
@@ -45644,22 +45608,22 @@ var ts;
|
|
|
45644
45608
|
var name = ts.isIdentifier(t.name) ? t.name : t.name.right;
|
|
45645
45609
|
var typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode(node), name.escapedText);
|
|
45646
45610
|
var overrideTypeNode = typeViaParent && t.typeExpression && getTypeFromTypeNode(t.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : undefined;
|
|
45647
|
-
return ts.factory.createPropertySignature(undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols
|
|
45611
|
+
return ts.factory.createPropertySignature(undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols)) || ts.factory.createKeywordTypeNode(131));
|
|
45648
45612
|
}));
|
|
45649
45613
|
}
|
|
45650
45614
|
if (ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "") {
|
|
45651
45615
|
return ts.setOriginalNode(ts.factory.createKeywordTypeNode(131), node);
|
|
45652
45616
|
}
|
|
45653
45617
|
if ((ts.isExpressionWithTypeArguments(node) || ts.isTypeReferenceNode(node)) && ts.isJSDocIndexSignature(node)) {
|
|
45654
|
-
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, "x", undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols
|
|
45618
|
+
return ts.factory.createTypeLiteralNode([ts.factory.createIndexSignature(undefined, [ts.factory.createParameterDeclaration(undefined, undefined, "x", undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols))], ts.visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols))]);
|
|
45655
45619
|
}
|
|
45656
45620
|
if (ts.isJSDocFunctionType(node)) {
|
|
45657
45621
|
if (ts.isJSDocConstructSignature(node)) {
|
|
45658
45622
|
var newTypeNode_1;
|
|
45659
|
-
return ts.factory.createConstructorTypeNode(undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
45623
|
+
return ts.factory.createConstructorTypeNode(undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.mapDefined(node.parameters, function (p, i) { return p.name && ts.isIdentifier(p.name) && p.name.escapedText === "new" ? (newTypeNode_1 = p.type, undefined) : ts.factory.createParameterDeclaration(undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(131));
|
|
45660
45624
|
}
|
|
45661
45625
|
else {
|
|
45662
|
-
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
45626
|
+
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols), undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(131));
|
|
45663
45627
|
}
|
|
45664
45628
|
}
|
|
45665
45629
|
if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(node, 788968, true))) {
|
|
@@ -46023,7 +45987,7 @@ var ts;
|
|
|
46023
45987
|
}
|
|
46024
45988
|
}
|
|
46025
45989
|
function includePrivateSymbol(symbol) {
|
|
46026
|
-
if (ts.some(symbol.declarations, ts.
|
|
45990
|
+
if (ts.some(symbol.declarations, ts.isParameterDeclaration))
|
|
46027
45991
|
return;
|
|
46028
45992
|
ts.Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
|
|
46029
45993
|
getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol);
|
|
@@ -46327,7 +46291,7 @@ var ts;
|
|
|
46327
46291
|
break;
|
|
46328
46292
|
}
|
|
46329
46293
|
case 268:
|
|
46330
|
-
if (target.escapedName === "export=" && ts.some(target.declarations,
|
|
46294
|
+
if (target.escapedName === "export=" && ts.some(target.declarations, ts.isJsonSourceFile)) {
|
|
46331
46295
|
serializeMaybeAliasAssignment(symbol);
|
|
46332
46296
|
break;
|
|
46333
46297
|
}
|
|
@@ -47298,7 +47262,6 @@ var ts;
|
|
|
47298
47262
|
return container;
|
|
47299
47263
|
}
|
|
47300
47264
|
}
|
|
47301
|
-
;
|
|
47302
47265
|
}
|
|
47303
47266
|
function getFlowTypeFromCommonJSExport(symbol) {
|
|
47304
47267
|
var file = ts.getSourceFileOfNode(symbol.declarations[0]);
|
|
@@ -51469,6 +51432,10 @@ var ts;
|
|
|
51469
51432
|
function getGlobalBigIntType() {
|
|
51470
51433
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
51471
51434
|
}
|
|
51435
|
+
function getGlobalRecordSymbol() {
|
|
51436
|
+
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", 2, true) || unknownSymbol);
|
|
51437
|
+
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
51438
|
+
}
|
|
51472
51439
|
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
|
|
51473
51440
|
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
|
|
51474
51441
|
}
|
|
@@ -60465,18 +60432,22 @@ var ts;
|
|
|
60465
60432
|
}
|
|
60466
60433
|
function isTypePresencePossible(type, propName, assumeTrue) {
|
|
60467
60434
|
var prop = getPropertyOfType(type, propName);
|
|
60468
|
-
|
|
60469
|
-
|
|
60470
|
-
|
|
60471
|
-
|
|
60472
|
-
|
|
60473
|
-
|
|
60474
|
-
|
|
60475
|
-
|
|
60476
|
-
|| ts.isThisTypeParameter(type)
|
|
60477
|
-
|| type.flags & 2097152 && ts.every(type.types, function (t) { return t.symbol !== globalThisSymbol; })) {
|
|
60435
|
+
return prop ?
|
|
60436
|
+
!!(prop.flags & 16777216) || assumeTrue :
|
|
60437
|
+
!!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
|
|
60438
|
+
}
|
|
60439
|
+
function narrowByInKeyword(type, nameType, assumeTrue) {
|
|
60440
|
+
var name = getPropertyNameFromType(nameType);
|
|
60441
|
+
var isKnownProperty = someType(type, function (t) { return isTypePresencePossible(t, name, true); });
|
|
60442
|
+
if (isKnownProperty) {
|
|
60478
60443
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
60479
60444
|
}
|
|
60445
|
+
if (assumeTrue) {
|
|
60446
|
+
var recordSymbol = getGlobalRecordSymbol();
|
|
60447
|
+
if (recordSymbol) {
|
|
60448
|
+
return getIntersectionType([type, getTypeAliasInstantiation(recordSymbol, [nameType, unknownType])]);
|
|
60449
|
+
}
|
|
60450
|
+
}
|
|
60480
60451
|
return type;
|
|
60481
60452
|
}
|
|
60482
60453
|
function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
|
|
@@ -60535,15 +60506,14 @@ var ts;
|
|
|
60535
60506
|
return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue);
|
|
60536
60507
|
}
|
|
60537
60508
|
var target = getReferenceCandidate(expr.right);
|
|
60538
|
-
var leftType =
|
|
60539
|
-
if (leftType.flags &
|
|
60540
|
-
var name = ts.escapeLeadingUnderscores(leftType.value);
|
|
60509
|
+
var leftType = getTypeOfExpression(expr.left);
|
|
60510
|
+
if (leftType.flags & 8576) {
|
|
60541
60511
|
if (containsMissingType(type) && ts.isAccessExpression(reference) && isMatchingReference(reference.expression, target) &&
|
|
60542
|
-
getAccessedPropertyName(reference) ===
|
|
60512
|
+
getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) {
|
|
60543
60513
|
return getTypeWithFacts(type, assumeTrue ? 524288 : 65536);
|
|
60544
60514
|
}
|
|
60545
60515
|
if (isMatchingReference(reference, target)) {
|
|
60546
|
-
return narrowByInKeyword(type,
|
|
60516
|
+
return narrowByInKeyword(type, leftType, assumeTrue);
|
|
60547
60517
|
}
|
|
60548
60518
|
}
|
|
60549
60519
|
break;
|
|
@@ -64059,7 +64029,6 @@ var ts;
|
|
|
64059
64029
|
}
|
|
64060
64030
|
return false;
|
|
64061
64031
|
}
|
|
64062
|
-
;
|
|
64063
64032
|
var suggestedMethod = ts.isAssignmentTarget(expr) ? "set" : "get";
|
|
64064
64033
|
if (!hasProp(suggestedMethod)) {
|
|
64065
64034
|
return undefined;
|
|
@@ -67142,6 +67111,9 @@ var ts;
|
|
|
67142
67111
|
}
|
|
67143
67112
|
return booleanType;
|
|
67144
67113
|
}
|
|
67114
|
+
function hasEmptyObjectIntersection(type) {
|
|
67115
|
+
return someType(type, function (t) { return t === unknownEmptyObjectType || !!(t.flags & 2097152) && ts.some(t.types, isEmptyAnonymousObjectType); });
|
|
67116
|
+
}
|
|
67145
67117
|
function checkInExpression(left, right, leftType, rightType) {
|
|
67146
67118
|
if (leftType === silentNeverType || rightType === silentNeverType) {
|
|
67147
67119
|
return silentNeverType;
|
|
@@ -67156,18 +67128,12 @@ var ts;
|
|
|
67156
67128
|
}
|
|
67157
67129
|
}
|
|
67158
67130
|
else {
|
|
67159
|
-
|
|
67160
|
-
if (!(allTypesAssignableToKind(leftType, 402653316 | 296 | 12288) ||
|
|
67161
|
-
isTypeAssignableToKind(leftType, 4194304 | 134217728 | 268435456 | 262144))) {
|
|
67162
|
-
error(left, ts.Diagnostics.The_left_hand_side_of_an_in_expression_must_be_a_private_identifier_or_of_type_any_string_number_or_symbol);
|
|
67163
|
-
}
|
|
67131
|
+
checkTypeAssignableTo(checkNonNullType(leftType, left), stringNumberSymbolType, left);
|
|
67164
67132
|
}
|
|
67165
|
-
|
|
67166
|
-
|
|
67167
|
-
|
|
67168
|
-
|
|
67169
|
-
!maybeTypeOfKind(rightTypeConstraint, 67108864 | 58982400 | 524288))) {
|
|
67170
|
-
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_not_be_a_primitive);
|
|
67133
|
+
if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) {
|
|
67134
|
+
if (hasEmptyObjectIntersection(rightType)) {
|
|
67135
|
+
error(right, ts.Diagnostics.Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator, typeToString(rightType));
|
|
67136
|
+
}
|
|
67171
67137
|
}
|
|
67172
67138
|
return booleanType;
|
|
67173
67139
|
}
|
|
@@ -76823,10 +76789,13 @@ var ts;
|
|
|
76823
76789
|
(function (ts) {
|
|
76824
76790
|
var _a;
|
|
76825
76791
|
function visitNode(node, visitor, test, lift) {
|
|
76826
|
-
if (node === undefined) {
|
|
76792
|
+
if (node === undefined || visitor === undefined) {
|
|
76793
|
+
return node;
|
|
76794
|
+
}
|
|
76795
|
+
var visited = visitor(node);
|
|
76796
|
+
if (visited === node) {
|
|
76827
76797
|
return node;
|
|
76828
76798
|
}
|
|
76829
|
-
var visited = visitor ? visitor(node) : node;
|
|
76830
76799
|
var visitedNode;
|
|
76831
76800
|
if (visited === undefined) {
|
|
76832
76801
|
return undefined;
|
|
@@ -76841,9 +76810,8 @@ var ts;
|
|
|
76841
76810
|
return visitedNode;
|
|
76842
76811
|
}
|
|
76843
76812
|
ts.visitNode = visitNode;
|
|
76844
|
-
(function (_) { })(visitNode);
|
|
76845
76813
|
function visitNodes(nodes, visitor, test, start, count) {
|
|
76846
|
-
if (nodes === undefined) {
|
|
76814
|
+
if (nodes === undefined || visitor === undefined) {
|
|
76847
76815
|
return nodes;
|
|
76848
76816
|
}
|
|
76849
76817
|
var length = nodes.length;
|
|
@@ -76873,7 +76841,6 @@ var ts;
|
|
|
76873
76841
|
return nodes;
|
|
76874
76842
|
}
|
|
76875
76843
|
ts.visitNodes = visitNodes;
|
|
76876
|
-
(function (_) { })(visitNodes);
|
|
76877
76844
|
function visitArray(nodes, visitor, test, start, count) {
|
|
76878
76845
|
if (nodes === undefined) {
|
|
76879
76846
|
return nodes;
|
|
@@ -76896,7 +76863,7 @@ var ts;
|
|
|
76896
76863
|
}
|
|
76897
76864
|
for (var i = 0; i < count; i++) {
|
|
76898
76865
|
var node = nodes[i + start];
|
|
76899
|
-
var visited = node !== undefined ?
|
|
76866
|
+
var visited = node !== undefined ? visitor(node) : undefined;
|
|
76900
76867
|
if (updated !== undefined || visited === undefined || visited !== node) {
|
|
76901
76868
|
if (updated === undefined) {
|
|
76902
76869
|
updated = nodes.slice(0, i);
|
|
@@ -76905,18 +76872,18 @@ var ts;
|
|
|
76905
76872
|
if (ts.isArray(visited)) {
|
|
76906
76873
|
for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
|
|
76907
76874
|
var visitedNode = visited_1[_i];
|
|
76875
|
+
void ts.Debug.assertNode(visitedNode, test);
|
|
76908
76876
|
updated.push(visitedNode);
|
|
76909
76877
|
}
|
|
76910
76878
|
}
|
|
76911
76879
|
else {
|
|
76880
|
+
void ts.Debug.assertNode(visited, test);
|
|
76912
76881
|
updated.push(visited);
|
|
76913
76882
|
}
|
|
76914
76883
|
}
|
|
76915
76884
|
}
|
|
76916
76885
|
}
|
|
76917
|
-
|
|
76918
|
-
ts.Debug.assertEachNode(result, test);
|
|
76919
|
-
return result;
|
|
76886
|
+
return updated !== null && updated !== void 0 ? updated : nodes;
|
|
76920
76887
|
}
|
|
76921
76888
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor) {
|
|
76922
76889
|
if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
|
|
@@ -76933,7 +76900,7 @@ var ts;
|
|
|
76933
76900
|
context.startLexicalEnvironment();
|
|
76934
76901
|
if (nodes) {
|
|
76935
76902
|
context.setLexicalEnvironmentFlags(1, true);
|
|
76936
|
-
updated = nodesVisitor(nodes, visitor, ts.
|
|
76903
|
+
updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
|
|
76937
76904
|
if (context.getLexicalEnvironmentFlags() & 2 &&
|
|
76938
76905
|
ts.getEmitScriptTarget(context.getCompilerOptions()) >= 2) {
|
|
76939
76906
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
@@ -77002,7 +76969,6 @@ var ts;
|
|
|
77002
76969
|
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
77003
76970
|
context.startBlockScope();
|
|
77004
76971
|
var updated = nodeVisitor(body, visitor, ts.isStatement, context.factory.liftToBlock);
|
|
77005
|
-
ts.Debug.assert(updated);
|
|
77006
76972
|
var declarations = context.endBlockScope();
|
|
77007
76973
|
if (ts.some(declarations)) {
|
|
77008
76974
|
if (ts.isBlock(updated)) {
|
|
@@ -77039,20 +77005,20 @@ var ts;
|
|
|
77039
77005
|
return context.factory.updateTypeParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isIdentifier), nodeVisitor(node.constraint, visitor, ts.isTypeNode), nodeVisitor(node.default, visitor, ts.isTypeNode));
|
|
77040
77006
|
},
|
|
77041
77007
|
_a[166] = function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77042
|
-
return context.factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken),
|
|
77008
|
+
return context.factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken), nodeVisitor(node.name, visitor, ts.isBindingName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
77043
77009
|
},
|
|
77044
77010
|
_a[167] = function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77045
77011
|
return context.factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
77046
77012
|
},
|
|
77047
77013
|
_a[168] = function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77048
|
-
return context.factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.
|
|
77014
|
+
return context.factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isToken), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77049
77015
|
},
|
|
77050
77016
|
_a[169] = function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77051
77017
|
var _a;
|
|
77052
|
-
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike),
|
|
77018
|
+
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor((_a = node.questionToken) !== null && _a !== void 0 ? _a : node.exclamationToken, tokenVisitor, ts.isQuestionOrExclamationToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodeVisitor(node.initializer, visitor, ts.isExpression));
|
|
77053
77019
|
},
|
|
77054
77020
|
_a[170] = function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77055
|
-
return context.factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
77021
|
+
return context.factory.updateMethodSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77056
77022
|
},
|
|
77057
77023
|
_a[171] = function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77058
77024
|
return context.factory.updateMethodDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.asteriskToken, tokenVisitor, ts.isAsteriskToken), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionToken), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), visitParameterList(node.parameters, visitor, context, nodesVisitor), nodeVisitor(node.type, visitor, ts.isTypeNode), visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
@@ -77072,13 +77038,13 @@ var ts;
|
|
|
77072
77038
|
return context.factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
77073
77039
|
},
|
|
77074
77040
|
_a[176] = function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77075
|
-
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
77041
|
+
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77076
77042
|
},
|
|
77077
77043
|
_a[177] = function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77078
|
-
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
77044
|
+
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77079
77045
|
},
|
|
77080
77046
|
_a[178] = function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77081
|
-
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.
|
|
77047
|
+
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77082
77048
|
},
|
|
77083
77049
|
_a[179] = function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77084
77050
|
return context.factory.updateTypePredicateNode(node, nodeVisitor(node.assertsModifier, visitor, ts.isAssertsKeyword), nodeVisitor(node.parameterName, visitor, ts.isIdentifierOrThisTypeNode), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
@@ -77087,10 +77053,10 @@ var ts;
|
|
|
77087
77053
|
return context.factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
77088
77054
|
},
|
|
77089
77055
|
_a[181] = function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77090
|
-
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
77056
|
+
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77091
77057
|
},
|
|
77092
77058
|
_a[182] = function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77093
|
-
return context.factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
77059
|
+
return context.factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77094
77060
|
},
|
|
77095
77061
|
_a[183] = function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77096
77062
|
return context.factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
@@ -77144,7 +77110,7 @@ var ts;
|
|
|
77144
77110
|
return context.factory.updateMappedTypeNode(node, nodeVisitor(node.readonlyToken, tokenVisitor, ts.isReadonlyKeywordOrPlusOrMinusToken), nodeVisitor(node.typeParameter, visitor, ts.isTypeParameterDeclaration), nodeVisitor(node.nameType, visitor, ts.isTypeNode), nodeVisitor(node.questionToken, tokenVisitor, ts.isQuestionOrPlusOrMinusToken), nodeVisitor(node.type, visitor, ts.isTypeNode), nodesVisitor(node.members, visitor, ts.isTypeElement));
|
|
77145
77111
|
},
|
|
77146
77112
|
_a[198] = function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77147
|
-
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.
|
|
77113
|
+
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
77148
77114
|
},
|
|
77149
77115
|
_a[200] = function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77150
77116
|
return context.factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
|
|
@@ -78467,7 +78433,6 @@ var ts;
|
|
|
78467
78433
|
};
|
|
78468
78434
|
if (value) {
|
|
78469
78435
|
value = ts.visitNode(value, visitor, ts.isExpression);
|
|
78470
|
-
ts.Debug.assert(value);
|
|
78471
78436
|
if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) ||
|
|
78472
78437
|
bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
78473
78438
|
value = ensureIdentifier(flattenContext, value, false, location);
|
|
@@ -78639,7 +78604,7 @@ var ts;
|
|
|
78639
78604
|
&& !(element.transformFlags & (32768 | 65536))
|
|
78640
78605
|
&& !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 | 65536))
|
|
78641
78606
|
&& !ts.isComputedPropertyName(propertyName)) {
|
|
78642
|
-
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor
|
|
78607
|
+
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor));
|
|
78643
78608
|
}
|
|
78644
78609
|
else {
|
|
78645
78610
|
if (bindingElements) {
|
|
@@ -78772,7 +78737,6 @@ var ts;
|
|
|
78772
78737
|
return factory.createArrayBindingPattern(elements);
|
|
78773
78738
|
}
|
|
78774
78739
|
function makeArrayAssignmentPattern(factory, elements) {
|
|
78775
|
-
ts.Debug.assertEachNode(elements, ts.isArrayBindingOrAssignmentElement);
|
|
78776
78740
|
return factory.createArrayLiteralExpression(ts.map(elements, factory.converters.convertToArrayAssignmentElement));
|
|
78777
78741
|
}
|
|
78778
78742
|
function makeObjectBindingPattern(factory, elements) {
|
|
@@ -78780,7 +78744,6 @@ var ts;
|
|
|
78780
78744
|
return factory.createObjectBindingPattern(elements);
|
|
78781
78745
|
}
|
|
78782
78746
|
function makeObjectAssignmentPattern(factory, elements) {
|
|
78783
|
-
ts.Debug.assertEachNode(elements, ts.isObjectBindingOrAssignmentElement);
|
|
78784
78747
|
return factory.createObjectLiteralExpression(ts.map(elements, factory.converters.convertToObjectAssignmentElement));
|
|
78785
78748
|
}
|
|
78786
78749
|
function makeBindingElement(factory, name) {
|
|
@@ -78799,7 +78762,6 @@ var ts;
|
|
|
78799
78762
|
})(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {}));
|
|
78800
78763
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
78801
78764
|
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
|
|
78802
|
-
ts.Debug.assert(tag);
|
|
78803
78765
|
var templateArguments = [undefined];
|
|
78804
78766
|
var cookedStrings = [];
|
|
78805
78767
|
var rawStrings = [];
|
|
@@ -79167,7 +79129,7 @@ var ts;
|
|
|
79167
79129
|
return factory.updateSourceFile(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
|
|
79168
79130
|
}
|
|
79169
79131
|
function visitObjectLiteralExpression(node) {
|
|
79170
|
-
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.
|
|
79132
|
+
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.isObjectLiteralElement));
|
|
79171
79133
|
}
|
|
79172
79134
|
function getClassFacts(node, staticProperties) {
|
|
79173
79135
|
var facts = 0;
|
|
@@ -79303,7 +79265,6 @@ var ts;
|
|
|
79303
79265
|
for (var _i = 0, parameterDecorators_1 = parameterDecorators; _i < parameterDecorators_1.length; _i++) {
|
|
79304
79266
|
var parameterDecorator = parameterDecorators_1[_i];
|
|
79305
79267
|
var expression = ts.visitNode(parameterDecorator.expression, visitor, ts.isExpression);
|
|
79306
|
-
ts.Debug.assert(expression);
|
|
79307
79268
|
var helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
79308
79269
|
ts.setTextRange(helper, parameterDecorator.expression);
|
|
79309
79270
|
ts.setEmitFlags(helper, 1536);
|
|
@@ -79403,7 +79364,6 @@ var ts;
|
|
|
79403
79364
|
var name = member.name;
|
|
79404
79365
|
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.hasDecorators(member))) {
|
|
79405
79366
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
79406
|
-
ts.Debug.assert(expression);
|
|
79407
79367
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
79408
79368
|
if (!ts.isSimpleInlineableExpression(innerExpression)) {
|
|
79409
79369
|
var generatedName = factory.getGeneratedNameForNode(name);
|
|
@@ -79420,7 +79380,7 @@ var ts;
|
|
|
79420
79380
|
return ts.visitEachChild(node, visitor, context);
|
|
79421
79381
|
}
|
|
79422
79382
|
function visitExpressionWithTypeArguments(node) {
|
|
79423
|
-
return factory.updateExpressionWithTypeArguments(node, ts.
|
|
79383
|
+
return factory.updateExpressionWithTypeArguments(node, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression), undefined);
|
|
79424
79384
|
}
|
|
79425
79385
|
function shouldEmitFunctionLikeDeclaration(node) {
|
|
79426
79386
|
return !ts.nodeIsMissing(node.body);
|
|
@@ -79433,7 +79393,7 @@ var ts;
|
|
|
79433
79393
|
var allDecorators = ts.getAllDecoratorsOfClassElement(node, parent);
|
|
79434
79394
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
79435
79395
|
if (isAmbient) {
|
|
79436
|
-
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.
|
|
79396
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
79437
79397
|
}
|
|
79438
79398
|
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitNode(node.initializer, visitor));
|
|
79439
79399
|
}
|
|
@@ -79547,7 +79507,7 @@ var ts;
|
|
|
79547
79507
|
if (ts.parameterIsThisKeyword(node)) {
|
|
79548
79508
|
return undefined;
|
|
79549
79509
|
}
|
|
79550
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.
|
|
79510
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
79551
79511
|
if (updated !== node) {
|
|
79552
79512
|
ts.setCommentRange(updated, node);
|
|
79553
79513
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -79588,24 +79548,20 @@ var ts;
|
|
|
79588
79548
|
var innerExpression = ts.skipOuterExpressions(node.expression, ~6);
|
|
79589
79549
|
if (ts.isAssertionExpression(innerExpression)) {
|
|
79590
79550
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79591
|
-
ts.Debug.assert(expression);
|
|
79592
79551
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79593
79552
|
}
|
|
79594
79553
|
return ts.visitEachChild(node, visitor, context);
|
|
79595
79554
|
}
|
|
79596
79555
|
function visitAssertionExpression(node) {
|
|
79597
79556
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79598
|
-
ts.Debug.assert(expression);
|
|
79599
79557
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79600
79558
|
}
|
|
79601
79559
|
function visitNonNullExpression(node) {
|
|
79602
79560
|
var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
|
|
79603
|
-
ts.Debug.assert(expression);
|
|
79604
79561
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79605
79562
|
}
|
|
79606
79563
|
function visitSatisfiesExpression(node) {
|
|
79607
79564
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79608
|
-
ts.Debug.assert(expression);
|
|
79609
79565
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79610
79566
|
}
|
|
79611
79567
|
function visitCallExpression(node) {
|
|
@@ -79615,7 +79571,7 @@ var ts;
|
|
|
79615
79571
|
return factory.updateNewExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression), undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
|
|
79616
79572
|
}
|
|
79617
79573
|
function visitTaggedTemplateExpression(node) {
|
|
79618
|
-
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression), undefined, ts.visitNode(node.template, visitor, ts.
|
|
79574
|
+
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression), undefined, ts.visitNode(node.template, visitor, ts.isExpression));
|
|
79619
79575
|
}
|
|
79620
79576
|
function visitJsxSelfClosingElement(node) {
|
|
79621
79577
|
return factory.updateJsxSelfClosingElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), undefined, ts.visitNode(node.attributes, visitor, ts.isJsxAttributes));
|
|
@@ -80270,7 +80226,6 @@ var ts;
|
|
|
80270
80226
|
var info = accessPrivateIdentifier(node.left);
|
|
80271
80227
|
if (info) {
|
|
80272
80228
|
var receiver = ts.visitNode(node.right, visitor, ts.isExpression);
|
|
80273
|
-
ts.Debug.assert(receiver);
|
|
80274
80229
|
return ts.setOriginalNode(context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver), node);
|
|
80275
80230
|
}
|
|
80276
80231
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -80286,7 +80241,6 @@ var ts;
|
|
|
80286
80241
|
}
|
|
80287
80242
|
function visitComputedPropertyName(node) {
|
|
80288
80243
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
80289
|
-
ts.Debug.assert(expression);
|
|
80290
80244
|
if (ts.some(pendingExpressions)) {
|
|
80291
80245
|
if (ts.isParenthesizedExpression(expression)) {
|
|
80292
80246
|
expression = factory.updateParenthesizedExpression(expression, factory.inlineExpressions(__spreadArray(__spreadArray([], pendingExpressions, true), [expression.expression], false)));
|
|
@@ -80354,7 +80308,6 @@ var ts;
|
|
|
80354
80308
|
var temp = factory.createTempVariable(hoistVariableDeclaration);
|
|
80355
80309
|
ts.setSourceMapRange(temp, name.expression);
|
|
80356
80310
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
80357
|
-
ts.Debug.assert(expression);
|
|
80358
80311
|
var assignment = factory.createAssignment(temp, expression);
|
|
80359
80312
|
ts.setSourceMapRange(assignment, name.expression);
|
|
80360
80313
|
getterName = factory.updateComputedPropertyName(name, factory.inlineExpressions([assignment, temp]));
|
|
@@ -80487,7 +80440,6 @@ var ts;
|
|
|
80487
80440
|
var info = void 0;
|
|
80488
80441
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
80489
80442
|
var receiver = ts.visitNode(operand.expression, visitor, ts.isExpression);
|
|
80490
|
-
ts.Debug.assert(receiver);
|
|
80491
80443
|
var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
|
|
80492
80444
|
var expression = createPrivateIdentifierAccess(info, readExpression);
|
|
80493
80445
|
var temp = ts.isPrefixUnaryExpression(node) || valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
@@ -80658,17 +80610,14 @@ var ts;
|
|
|
80658
80610
|
var superPropertyGet = factory.createReflectGetCall(superClassReference, getterName, classConstructor);
|
|
80659
80611
|
ts.setOriginalNode(superPropertyGet, node.left);
|
|
80660
80612
|
ts.setTextRange(superPropertyGet, node.left);
|
|
80661
|
-
ts.Debug.assert(expression);
|
|
80662
80613
|
expression = factory.createBinaryExpression(superPropertyGet, ts.getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), expression);
|
|
80663
80614
|
ts.setTextRange(expression, node);
|
|
80664
80615
|
}
|
|
80665
80616
|
var temp = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
80666
80617
|
if (temp) {
|
|
80667
|
-
ts.Debug.assert(expression);
|
|
80668
80618
|
expression = factory.createAssignment(temp, expression);
|
|
80669
80619
|
ts.setTextRange(temp, node);
|
|
80670
80620
|
}
|
|
80671
|
-
ts.Debug.assert(expression);
|
|
80672
80621
|
expression = factory.createReflectSetCall(superClassReference, setterName, expression, classConstructor);
|
|
80673
80622
|
ts.setOriginalNode(expression, node);
|
|
80674
80623
|
ts.setTextRange(expression, node);
|
|
@@ -81301,7 +81250,6 @@ var ts;
|
|
|
81301
81250
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
81302
81251
|
if (ts.isComputedPropertyName(name)) {
|
|
81303
81252
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
81304
|
-
ts.Debug.assert(expression);
|
|
81305
81253
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
81306
81254
|
var inlinable = ts.isSimpleInlineableExpression(innerExpression);
|
|
81307
81255
|
var alreadyTransformed = ts.isAssignmentExpression(innerExpression) && ts.isGeneratedIdentifier(innerExpression.left);
|
|
@@ -82112,7 +82060,7 @@ var ts;
|
|
|
82112
82060
|
return factory.updateClassExpression(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.name, undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement));
|
|
82113
82061
|
}
|
|
82114
82062
|
function visitConstructorDeclaration(node) {
|
|
82115
|
-
return factory.updateConstructorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNodes(node.parameters, visitor, ts.
|
|
82063
|
+
return factory.updateConstructorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), ts.visitNode(node.body, visitor, ts.isBlock));
|
|
82116
82064
|
}
|
|
82117
82065
|
function finishClassElement(updated, original) {
|
|
82118
82066
|
if (updated !== original) {
|
|
@@ -82122,22 +82070,22 @@ var ts;
|
|
|
82122
82070
|
return updated;
|
|
82123
82071
|
}
|
|
82124
82072
|
function visitMethodDeclaration(node) {
|
|
82125
|
-
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, ts.visitNodes(node.parameters, visitor, ts.
|
|
82073
|
+
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
82126
82074
|
}
|
|
82127
82075
|
function visitGetAccessorDeclaration(node) {
|
|
82128
|
-
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.
|
|
82076
|
+
return finishClassElement(factory.updateGetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
82129
82077
|
}
|
|
82130
82078
|
function visitSetAccessorDeclaration(node) {
|
|
82131
|
-
return finishClassElement(factory.updateSetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.
|
|
82079
|
+
return finishClassElement(factory.updateSetAccessorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
82132
82080
|
}
|
|
82133
82081
|
function visitPropertyDeclaration(node) {
|
|
82134
82082
|
if (node.flags & 16777216 || ts.hasSyntacticModifier(node, 2)) {
|
|
82135
82083
|
return undefined;
|
|
82136
82084
|
}
|
|
82137
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.
|
|
82085
|
+
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
|
|
82138
82086
|
}
|
|
82139
82087
|
function visitParameterDeclaration(node) {
|
|
82140
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.
|
|
82088
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName), undefined, undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
82141
82089
|
if (updated !== node) {
|
|
82142
82090
|
ts.setCommentRange(updated, node);
|
|
82143
82091
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -82215,7 +82163,7 @@ var ts;
|
|
|
82215
82163
|
return expression;
|
|
82216
82164
|
}
|
|
82217
82165
|
function transformDecorator(decorator) {
|
|
82218
|
-
return ts.
|
|
82166
|
+
return ts.visitNode(decorator.expression, visitor, ts.isExpression);
|
|
82219
82167
|
}
|
|
82220
82168
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
82221
82169
|
var expressions;
|
|
@@ -82467,7 +82415,7 @@ var ts;
|
|
|
82467
82415
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
82468
82416
|
}
|
|
82469
82417
|
function visitForOfStatementInAsyncBody(node) {
|
|
82470
|
-
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.
|
|
82418
|
+
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.isToken), isVariableDeclarationListWithCollidingName(node.initializer)
|
|
82471
82419
|
? visitVariableDeclarationListWithCollidingNames(node.initializer, true)
|
|
82472
82420
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
82473
82421
|
}
|
|
@@ -82494,12 +82442,12 @@ var ts;
|
|
|
82494
82442
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82495
82443
|
}
|
|
82496
82444
|
function visitFunctionExpression(node) {
|
|
82497
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
82445
|
+
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name, undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, ts.getFunctionFlags(node) & 2
|
|
82498
82446
|
? transformAsyncFunctionBody(node)
|
|
82499
82447
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82500
82448
|
}
|
|
82501
82449
|
function visitArrowFunction(node) {
|
|
82502
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
82450
|
+
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), undefined, ts.visitParameterList(node.parameters, visitor, context), undefined, node.equalsGreaterThanToken, ts.getFunctionFlags(node) & 2
|
|
82503
82451
|
? transformAsyncFunctionBody(node)
|
|
82504
82452
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82505
82453
|
}
|
|
@@ -82553,7 +82501,7 @@ var ts;
|
|
|
82553
82501
|
}
|
|
82554
82502
|
function transformInitializedVariable(node) {
|
|
82555
82503
|
var converted = ts.setSourceMapRange(factory.createAssignment(factory.converters.convertToAssignmentElementTarget(node.name), node.initializer), node);
|
|
82556
|
-
return ts.
|
|
82504
|
+
return ts.visitNode(converted, visitor, ts.isExpression);
|
|
82557
82505
|
}
|
|
82558
82506
|
function collidesWithParameterName(_a) {
|
|
82559
82507
|
var name = _a.name;
|
|
@@ -83245,7 +83193,7 @@ var ts;
|
|
|
83245
83193
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
83246
83194
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
83247
83195
|
? undefined
|
|
83248
|
-
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.
|
|
83196
|
+
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.isToken), undefined, ts.visitParameterList(node.parameters, parameterVisitor, context), undefined, enclosingFunctionFlags & 2 && enclosingFunctionFlags & 1
|
|
83249
83197
|
? transformAsyncGeneratorFunctionBody(node)
|
|
83250
83198
|
: transformFunctionBody(node));
|
|
83251
83199
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
@@ -84041,7 +83989,7 @@ var ts;
|
|
|
84041
83989
|
return ts.singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
84042
83990
|
}
|
|
84043
83991
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
84044
|
-
return ts.
|
|
83992
|
+
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
84045
83993
|
}
|
|
84046
83994
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
84047
83995
|
var name = getAttributeName(node);
|
|
@@ -85178,7 +85126,6 @@ var ts;
|
|
|
85178
85126
|
var sourceMapRange = ts.getSourceMapRange(member);
|
|
85179
85127
|
var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
|
|
85180
85128
|
var propertyName = ts.visitNode(member.name, visitor, ts.isPropertyName);
|
|
85181
|
-
ts.Debug.assert(propertyName);
|
|
85182
85129
|
var e;
|
|
85183
85130
|
if (!ts.isPrivateIdentifier(propertyName) && ts.getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
85184
85131
|
var name = ts.isComputedPropertyName(propertyName) ? propertyName.expression
|
|
@@ -85210,7 +85157,6 @@ var ts;
|
|
|
85210
85157
|
ts.setEmitFlags(target, 1536 | 32);
|
|
85211
85158
|
ts.setSourceMapRange(target, firstAccessor.name);
|
|
85212
85159
|
var visitedAccessorName = ts.visitNode(firstAccessor.name, visitor, ts.isPropertyName);
|
|
85213
|
-
ts.Debug.assert(visitedAccessorName);
|
|
85214
85160
|
if (ts.isPrivateIdentifier(visitedAccessorName)) {
|
|
85215
85161
|
return ts.Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
85216
85162
|
}
|
|
@@ -85405,7 +85351,6 @@ var ts;
|
|
|
85405
85351
|
var visited = ts.visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, ts.isExpression);
|
|
85406
85352
|
if (result || visited !== element) {
|
|
85407
85353
|
result || (result = node.elements.slice(0, i));
|
|
85408
|
-
ts.Debug.assert(visited);
|
|
85409
85354
|
result.push(visited);
|
|
85410
85355
|
}
|
|
85411
85356
|
}
|
|
@@ -85458,7 +85403,6 @@ var ts;
|
|
|
85458
85403
|
var declarations = ts.flatMap(node.declarations, node.flags & 1
|
|
85459
85404
|
? visitVariableDeclarationInLetDeclarationList
|
|
85460
85405
|
: visitVariableDeclaration);
|
|
85461
|
-
ts.Debug.assertEachNode(declarations, ts.isVariableDeclaration);
|
|
85462
85406
|
var declarationList = factory.createVariableDeclarationList(declarations);
|
|
85463
85407
|
ts.setOriginalNode(declarationList, node);
|
|
85464
85408
|
ts.setTextRange(declarationList, node);
|
|
@@ -85603,7 +85547,6 @@ var ts;
|
|
|
85603
85547
|
}
|
|
85604
85548
|
else {
|
|
85605
85549
|
var statement = ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock);
|
|
85606
|
-
ts.Debug.assert(statement);
|
|
85607
85550
|
if (ts.isBlock(statement)) {
|
|
85608
85551
|
return factory.updateBlock(statement, ts.setTextRange(factory.createNodeArray(ts.concatenate(statements, statement.statements)), statement.statements));
|
|
85609
85552
|
}
|
|
@@ -85618,7 +85561,6 @@ var ts;
|
|
|
85618
85561
|
}
|
|
85619
85562
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
85620
85563
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
85621
|
-
ts.Debug.assert(expression);
|
|
85622
85564
|
var counter = factory.createLoopVariable();
|
|
85623
85565
|
var rhsReference = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(expression) : factory.createTempVariable(undefined);
|
|
85624
85566
|
ts.setEmitFlags(expression, 48 | ts.getEmitFlags(expression));
|
|
@@ -85632,7 +85574,6 @@ var ts;
|
|
|
85632
85574
|
}
|
|
85633
85575
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
85634
85576
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
85635
|
-
ts.Debug.assert(expression);
|
|
85636
85577
|
var iterator = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(expression) : factory.createTempVariable(undefined);
|
|
85637
85578
|
var result = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(iterator) : factory.createTempVariable(undefined);
|
|
85638
85579
|
var errorRecord = factory.createUniqueName("e");
|
|
@@ -85927,7 +85868,6 @@ var ts;
|
|
|
85927
85868
|
statements.push(factory.createIfStatement(factory.createPrefixUnaryExpression(53, ts.visitNode(node.condition, visitor, ts.isExpression)), ts.visitNode(factory.createBreakStatement(), visitor, ts.isStatement)));
|
|
85928
85869
|
}
|
|
85929
85870
|
}
|
|
85930
|
-
ts.Debug.assert(statement);
|
|
85931
85871
|
if (ts.isBlock(statement)) {
|
|
85932
85872
|
ts.addRange(statements, statement.statements);
|
|
85933
85873
|
}
|
|
@@ -86312,9 +86252,7 @@ var ts;
|
|
|
86312
86252
|
return ts.map(chunk, visitExpressionOfSpread);
|
|
86313
86253
|
}
|
|
86314
86254
|
function visitExpressionOfSpread(node) {
|
|
86315
|
-
ts.Debug.assertNode(node, ts.isSpreadElement);
|
|
86316
86255
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
86317
|
-
ts.Debug.assert(expression);
|
|
86318
86256
|
var isCallToReadHelper = ts.isCallToHelper(expression, "___read");
|
|
86319
86257
|
var kind = isCallToReadHelper || ts.isPackedArrayLiteral(expression) ? 2 : 1;
|
|
86320
86258
|
if (compilerOptions.downlevelIteration && kind === 1 && !ts.isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -86352,7 +86290,7 @@ var ts;
|
|
|
86352
86290
|
var expression = factory.createStringLiteral(node.head.text);
|
|
86353
86291
|
for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
|
|
86354
86292
|
var span = _a[_i];
|
|
86355
|
-
var args = [ts.
|
|
86293
|
+
var args = [ts.visitNode(span.expression, visitor, ts.isExpression)];
|
|
86356
86294
|
if (span.literal.text.length > 0) {
|
|
86357
86295
|
args.push(factory.createStringLiteral(span.literal.text));
|
|
86358
86296
|
}
|
|
@@ -86867,10 +86805,10 @@ var ts;
|
|
|
86867
86805
|
var target = void 0;
|
|
86868
86806
|
switch (left.kind) {
|
|
86869
86807
|
case 208:
|
|
86870
|
-
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.
|
|
86808
|
+
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
|
|
86871
86809
|
break;
|
|
86872
86810
|
case 209:
|
|
86873
|
-
target = factory.updateElementAccessExpression(left, cacheExpression(ts.
|
|
86811
|
+
target = factory.updateElementAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
|
|
86874
86812
|
break;
|
|
86875
86813
|
default:
|
|
86876
86814
|
target = ts.visitNode(left, visitor, ts.isExpression);
|
|
@@ -87038,14 +86976,14 @@ var ts;
|
|
|
87038
86976
|
}
|
|
87039
86977
|
function visitElementAccessExpression(node) {
|
|
87040
86978
|
if (containsYield(node.argumentExpression)) {
|
|
87041
|
-
return factory.updateElementAccessExpression(node, cacheExpression(ts.
|
|
86979
|
+
return factory.updateElementAccessExpression(node, cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression)), ts.visitNode(node.argumentExpression, visitor, ts.isExpression));
|
|
87042
86980
|
}
|
|
87043
86981
|
return ts.visitEachChild(node, visitor, context);
|
|
87044
86982
|
}
|
|
87045
86983
|
function visitCallExpression(node) {
|
|
87046
86984
|
if (!ts.isImportCall(node) && ts.forEach(node.arguments, containsYield)) {
|
|
87047
86985
|
var _a = factory.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion, true), target = _a.target, thisArg = _a.thisArg;
|
|
87048
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionApplyCall(cacheExpression(ts.
|
|
86986
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionApplyCall(cacheExpression(ts.visitNode(target, visitor, ts.isLeftHandSideExpression)), thisArg, visitElements(node.arguments)), node), node);
|
|
87049
86987
|
}
|
|
87050
86988
|
return ts.visitEachChild(node, visitor, context);
|
|
87051
86989
|
}
|
|
@@ -88398,7 +88336,7 @@ var ts;
|
|
|
88398
88336
|
}
|
|
88399
88337
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
88400
88338
|
if (currentModuleInfo.exportEquals) {
|
|
88401
|
-
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor
|
|
88339
|
+
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
88402
88340
|
if (expressionResult) {
|
|
88403
88341
|
if (emitAsReturn) {
|
|
88404
88342
|
var statement = factory.createReturnStatement(expressionResult);
|
|
@@ -88579,7 +88517,7 @@ var ts;
|
|
|
88579
88517
|
}
|
|
88580
88518
|
function visitImportCallExpression(node) {
|
|
88581
88519
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
88582
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
88520
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
88583
88521
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
88584
88522
|
var containsLexicalThis = !!(node.transformFlags & 16384);
|
|
88585
88523
|
switch (compilerOptions.module) {
|
|
@@ -88795,7 +88733,7 @@ var ts;
|
|
|
88795
88733
|
function visitFunctionDeclaration(node) {
|
|
88796
88734
|
var statements;
|
|
88797
88735
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
88798
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor
|
|
88736
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor), undefined, ts.visitEachChild(node.body, visitor, context)), node), node));
|
|
88799
88737
|
}
|
|
88800
88738
|
else {
|
|
88801
88739
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -88812,7 +88750,7 @@ var ts;
|
|
|
88812
88750
|
function visitClassDeclaration(node) {
|
|
88813
88751
|
var statements;
|
|
88814
88752
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
88815
|
-
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, visitor
|
|
88753
|
+
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.heritageClauses, visitor), ts.visitNodes(node.members, visitor)), node), node));
|
|
88816
88754
|
}
|
|
88817
88755
|
else {
|
|
88818
88756
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -88844,7 +88782,7 @@ var ts;
|
|
|
88844
88782
|
else if (variable.initializer) {
|
|
88845
88783
|
if (!ts.isBindingPattern(variable.name) && (ts.isArrowFunction(variable.initializer) || ts.isFunctionExpression(variable.initializer) || ts.isClassExpression(variable.initializer))) {
|
|
88846
88784
|
var expression = factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), variable.name), variable.name), factory.createIdentifier(ts.getTextOfIdentifierOrLiteral(variable.name)));
|
|
88847
|
-
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor
|
|
88785
|
+
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor));
|
|
88848
88786
|
variables = ts.append(variables, updatedVariable);
|
|
88849
88787
|
expressions = ts.append(expressions, expression);
|
|
88850
88788
|
removeCommentsOnExpressions = true;
|
|
@@ -89468,7 +89406,7 @@ var ts;
|
|
|
89468
89406
|
}
|
|
89469
89407
|
function visitFunctionDeclaration(node) {
|
|
89470
89408
|
if (ts.hasSyntacticModifier(node, 1)) {
|
|
89471
|
-
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor, ts.
|
|
89409
|
+
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, true, true), undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration), undefined, ts.visitNode(node.body, visitor, ts.isBlock)));
|
|
89472
89410
|
}
|
|
89473
89411
|
else {
|
|
89474
89412
|
hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, visitor, context));
|
|
@@ -89784,7 +89722,7 @@ var ts;
|
|
|
89784
89722
|
return expressions ? factory.inlineExpressions(expressions) : factory.createOmittedExpression();
|
|
89785
89723
|
}
|
|
89786
89724
|
else {
|
|
89787
|
-
return ts.visitNode(node, discardedValueVisitor, ts.
|
|
89725
|
+
return ts.visitNode(node, discardedValueVisitor, ts.isExpression);
|
|
89788
89726
|
}
|
|
89789
89727
|
}
|
|
89790
89728
|
function visitDoStatement(node) {
|
|
@@ -89878,7 +89816,7 @@ var ts;
|
|
|
89878
89816
|
}
|
|
89879
89817
|
function visitImportCallExpression(node) {
|
|
89880
89818
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
89881
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
89819
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
89882
89820
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
89883
89821
|
return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")), undefined, argument ? [argument] : []);
|
|
89884
89822
|
}
|
|
@@ -90899,7 +90837,7 @@ var ts;
|
|
|
90899
90837
|
var _a;
|
|
90900
90838
|
var primaryDeclaration = (_a = parentSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.getSourceFileOfNode(d) === containingFile; });
|
|
90901
90839
|
var augmentingDeclarations = ts.filter(symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== containingFile; });
|
|
90902
|
-
if (augmentingDeclarations) {
|
|
90840
|
+
if (primaryDeclaration && augmentingDeclarations) {
|
|
90903
90841
|
for (var _i = 0, augmentingDeclarations_1 = augmentingDeclarations; _i < augmentingDeclarations_1.length; _i++) {
|
|
90904
90842
|
var augmentations = augmentingDeclarations_1[_i];
|
|
90905
90843
|
context.addDiagnostic(ts.addRelatedInfo(ts.createDiagnosticForNode(augmentations, ts.Diagnostics.Declaration_augments_declaration_in_another_file_This_cannot_be_serialized), ts.createDiagnosticForNode(primaryDeclaration, ts.Diagnostics.This_is_the_declaration_being_augmented_Consider_moving_the_augmenting_declaration_into_the_same_file)));
|
|
@@ -90954,12 +90892,12 @@ var ts;
|
|
|
90954
90892
|
if (ts.isExternalOrCommonJsModule(sourceFile) || ts.isJsonSourceFile(sourceFile)) {
|
|
90955
90893
|
resultHasExternalModuleIndicator = false;
|
|
90956
90894
|
needsDeclare = false;
|
|
90957
|
-
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
90895
|
+
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
90958
90896
|
var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([factory.createModifier(136)], factory.createStringLiteral(ts.getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory.createModuleBlock(ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)))], true, [], [], false, []);
|
|
90959
90897
|
return newFile;
|
|
90960
90898
|
}
|
|
90961
90899
|
needsDeclare = true;
|
|
90962
|
-
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
90900
|
+
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
90963
90901
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
|
|
90964
90902
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
90965
90903
|
if (prepend.kind === 311) {
|
|
@@ -91005,7 +90943,7 @@ var ts;
|
|
|
91005
90943
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
91006
90944
|
}
|
|
91007
90945
|
else {
|
|
91008
|
-
var statements = ts.visitNodes(node.statements, visitDeclarationStatements
|
|
90946
|
+
var statements = ts.visitNodes(node.statements, visitDeclarationStatements);
|
|
91009
90947
|
combinedStatements = ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
91010
90948
|
refs.forEach(referenceVisitor);
|
|
91011
90949
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
@@ -91096,10 +91034,10 @@ var ts;
|
|
|
91096
91034
|
}
|
|
91097
91035
|
else {
|
|
91098
91036
|
if (name.kind === 204) {
|
|
91099
|
-
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
91037
|
+
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
91100
91038
|
}
|
|
91101
91039
|
else {
|
|
91102
|
-
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
91040
|
+
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
91103
91041
|
}
|
|
91104
91042
|
}
|
|
91105
91043
|
function visitBindingElement(elem) {
|
|
@@ -91144,10 +91082,10 @@ var ts;
|
|
|
91144
91082
|
(resolver.isRequiredInitializedParameter(node) ||
|
|
91145
91083
|
resolver.isOptionalUninitializedParameterProperty(node));
|
|
91146
91084
|
if (type && !shouldUseResolverType) {
|
|
91147
|
-
return ts.visitNode(type, visitDeclarationSubtree
|
|
91085
|
+
return ts.visitNode(type, visitDeclarationSubtree);
|
|
91148
91086
|
}
|
|
91149
91087
|
if (!ts.getParseTreeNode(node)) {
|
|
91150
|
-
return type ? ts.visitNode(type, visitDeclarationSubtree
|
|
91088
|
+
return type ? ts.visitNode(type, visitDeclarationSubtree) : factory.createKeywordTypeNode(131);
|
|
91151
91089
|
}
|
|
91152
91090
|
if (node.kind === 175) {
|
|
91153
91091
|
return factory.createKeywordTypeNode(131);
|
|
@@ -91253,7 +91191,7 @@ var ts;
|
|
|
91253
91191
|
return factory.createNodeArray(newParams || ts.emptyArray);
|
|
91254
91192
|
}
|
|
91255
91193
|
function ensureTypeParams(node, params) {
|
|
91256
|
-
return ts.hasEffectiveModifier(node, 8) ? undefined : ts.visitNodes(params, visitDeclarationSubtree
|
|
91194
|
+
return ts.hasEffectiveModifier(node, 8) ? undefined : ts.visitNodes(params, visitDeclarationSubtree);
|
|
91257
91195
|
}
|
|
91258
91196
|
function isEnclosingDeclaration(node) {
|
|
91259
91197
|
return ts.isSourceFile(node)
|
|
@@ -91359,7 +91297,6 @@ var ts;
|
|
|
91359
91297
|
var key = ts.getOriginalNodeId(statement);
|
|
91360
91298
|
if (lateStatementReplacementMap.has(key)) {
|
|
91361
91299
|
var result = lateStatementReplacementMap.get(key);
|
|
91362
|
-
ts.Debug.type(result);
|
|
91363
91300
|
lateStatementReplacementMap.delete(key);
|
|
91364
91301
|
if (result) {
|
|
91365
91302
|
if (ts.isArray(result) ? ts.some(result, ts.needsScopeMarker) : ts.needsScopeMarker(result)) {
|
|
@@ -91491,17 +91428,13 @@ var ts;
|
|
|
91491
91428
|
return cleanup(ts.visitEachChild(input, visitDeclarationSubtree, context));
|
|
91492
91429
|
}
|
|
91493
91430
|
case 191: {
|
|
91494
|
-
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree
|
|
91495
|
-
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree
|
|
91431
|
+
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree);
|
|
91432
|
+
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree);
|
|
91496
91433
|
var oldEnclosingDecl = enclosingDeclaration;
|
|
91497
91434
|
enclosingDeclaration = input.trueType;
|
|
91498
|
-
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree
|
|
91435
|
+
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree);
|
|
91499
91436
|
enclosingDeclaration = oldEnclosingDecl;
|
|
91500
|
-
var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree
|
|
91501
|
-
ts.Debug.assert(checkType);
|
|
91502
|
-
ts.Debug.assert(extendsType);
|
|
91503
|
-
ts.Debug.assert(trueType);
|
|
91504
|
-
ts.Debug.assert(falseType);
|
|
91437
|
+
var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree);
|
|
91505
91438
|
return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
91506
91439
|
}
|
|
91507
91440
|
case 181: {
|
|
@@ -91631,7 +91564,7 @@ var ts;
|
|
|
91631
91564
|
return clean;
|
|
91632
91565
|
}
|
|
91633
91566
|
case 261: {
|
|
91634
|
-
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
91567
|
+
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
|
|
91635
91568
|
}
|
|
91636
91569
|
case 259: {
|
|
91637
91570
|
var clean = cleanup(factory.updateFunctionDeclaration(input, ensureModifiers(input), undefined, input.name, ensureTypeParams(input, input.typeParameters), updateParamsList(input, input.parameters), ensureType(input, input.type), undefined));
|
|
@@ -91693,7 +91626,7 @@ var ts;
|
|
|
91693
91626
|
var oldHasScopeFix = resultHasScopeMarker;
|
|
91694
91627
|
resultHasScopeMarker = false;
|
|
91695
91628
|
needsScopeFixMarker = false;
|
|
91696
|
-
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements
|
|
91629
|
+
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements);
|
|
91697
91630
|
var lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
91698
91631
|
if (input.flags & 16777216) {
|
|
91699
91632
|
needsScopeFixMarker = false;
|
|
@@ -91764,7 +91697,7 @@ var ts;
|
|
|
91764
91697
|
var privateIdentifier = hasPrivateIdentifier ? [
|
|
91765
91698
|
factory.createPropertyDeclaration(undefined, factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)
|
|
91766
91699
|
] : undefined;
|
|
91767
|
-
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
91700
|
+
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
91768
91701
|
var members = factory.createNodeArray(memberNodes);
|
|
91769
91702
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
91770
91703
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
@@ -91781,11 +91714,11 @@ var ts;
|
|
|
91781
91714
|
if (clause.token === 94) {
|
|
91782
91715
|
var oldDiag_2 = getSymbolAccessibilityDiagnostic;
|
|
91783
91716
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
91784
|
-
var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree
|
|
91717
|
+
var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree)); }));
|
|
91785
91718
|
getSymbolAccessibilityDiagnostic = oldDiag_2;
|
|
91786
91719
|
return newClause;
|
|
91787
91720
|
}
|
|
91788
|
-
return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104; })), visitDeclarationSubtree
|
|
91721
|
+
return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104; })), visitDeclarationSubtree));
|
|
91789
91722
|
}));
|
|
91790
91723
|
return [statement, cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members))];
|
|
91791
91724
|
}
|
|
@@ -91828,7 +91761,7 @@ var ts;
|
|
|
91828
91761
|
function transformVariableStatement(input) {
|
|
91829
91762
|
if (!ts.forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
91830
91763
|
return;
|
|
91831
|
-
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree
|
|
91764
|
+
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree);
|
|
91832
91765
|
if (!ts.length(nodes))
|
|
91833
91766
|
return;
|
|
91834
91767
|
return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -91909,7 +91842,7 @@ var ts;
|
|
|
91909
91842
|
function transformHeritageClauses(nodes) {
|
|
91910
91843
|
return factory.createNodeArray(ts.filter(ts.map(nodes, function (clause) { return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) {
|
|
91911
91844
|
return ts.isEntityNameExpression(t.expression) || (clause.token === 94 && t.expression.kind === 104);
|
|
91912
|
-
})), visitDeclarationSubtree
|
|
91845
|
+
})), visitDeclarationSubtree)); }), function (clause) { return clause.types && !!clause.types.length; }));
|
|
91913
91846
|
}
|
|
91914
91847
|
}
|
|
91915
91848
|
ts.transformDeclarations = transformDeclarations;
|
|
@@ -98184,7 +98117,6 @@ var ts;
|
|
|
98184
98117
|
return resolutions;
|
|
98185
98118
|
}
|
|
98186
98119
|
ts.loadWithTypeDirectiveCache = loadWithTypeDirectiveCache;
|
|
98187
|
-
;
|
|
98188
98120
|
function getModeForFileReference(ref, containingFileMode) {
|
|
98189
98121
|
return (ts.isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
98190
98122
|
}
|
|
@@ -104158,9 +104090,6 @@ var ts;
|
|
|
104158
104090
|
return "".concat(errorDiagnostic.file.fileName);
|
|
104159
104091
|
});
|
|
104160
104092
|
return filesInError.map(function (fileName) {
|
|
104161
|
-
if (fileName === undefined) {
|
|
104162
|
-
return undefined;
|
|
104163
|
-
}
|
|
104164
104093
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
104165
104094
|
return diagnostic.file !== undefined && diagnostic.file.fileName === fileName;
|
|
104166
104095
|
});
|
|
@@ -104755,8 +104684,6 @@ var ts;
|
|
|
104755
104684
|
parseConfigFile();
|
|
104756
104685
|
newLine = updateNewLine();
|
|
104757
104686
|
}
|
|
104758
|
-
ts.Debug.assert(compilerOptions);
|
|
104759
|
-
ts.Debug.assert(rootFileNames);
|
|
104760
104687
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
104761
104688
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
104762
104689
|
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
@@ -104873,8 +104800,6 @@ var ts;
|
|
|
104873
104800
|
}
|
|
104874
104801
|
function synchronizeProgram() {
|
|
104875
104802
|
writeLog("Synchronizing program");
|
|
104876
|
-
ts.Debug.assert(compilerOptions);
|
|
104877
|
-
ts.Debug.assert(rootFileNames);
|
|
104878
104803
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
104879
104804
|
var program = getCurrentBuilderProgram();
|
|
104880
104805
|
if (hasChangedCompilerOptions) {
|
|
@@ -105100,8 +105025,6 @@ var ts;
|
|
|
105100
105025
|
}
|
|
105101
105026
|
function reloadFileNamesFromConfigFile() {
|
|
105102
105027
|
writeLog("Reloading new file names and options");
|
|
105103
|
-
ts.Debug.assert(compilerOptions);
|
|
105104
|
-
ts.Debug.assert(configFileName);
|
|
105105
105028
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
105106
105029
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
105107
105030
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -105110,7 +105033,6 @@ var ts;
|
|
|
105110
105033
|
synchronizeProgram();
|
|
105111
105034
|
}
|
|
105112
105035
|
function reloadConfigFile() {
|
|
105113
|
-
ts.Debug.assert(configFileName);
|
|
105114
105036
|
writeLog("Reloading config file: ".concat(configFileName));
|
|
105115
105037
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
105116
105038
|
if (cachedDirectoryStructureHost) {
|
|
@@ -105123,7 +105045,6 @@ var ts;
|
|
|
105123
105045
|
updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, ts.WatchType.ExtendedConfigFile);
|
|
105124
105046
|
}
|
|
105125
105047
|
function parseConfigFile() {
|
|
105126
|
-
ts.Debug.assert(configFileName);
|
|
105127
105048
|
setConfigFileParsingResult(ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtendForConfigFile, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend, extraFileExtensions));
|
|
105128
105049
|
}
|
|
105129
105050
|
function setConfigFileParsingResult(configFileParseResult) {
|
|
@@ -105144,7 +105065,6 @@ var ts;
|
|
|
105144
105065
|
return config.parsedCommandLine;
|
|
105145
105066
|
if (config.parsedCommandLine && config.reloadLevel === ts.ConfigFileProgramReloadLevel.Partial && !host.getParsedCommandLine) {
|
|
105146
105067
|
writeLog("Reloading new file names and options");
|
|
105147
|
-
ts.Debug.assert(compilerOptions);
|
|
105148
105068
|
var fileNames = ts.getFileNamesFromConfigSpecs(config.parsedCommandLine.options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
|
|
105149
105069
|
config.parsedCommandLine = __assign(__assign({}, config.parsedCommandLine), { fileNames: fileNames });
|
|
105150
105070
|
config.reloadLevel = undefined;
|
|
@@ -105224,8 +105144,7 @@ var ts;
|
|
|
105224
105144
|
}
|
|
105225
105145
|
function watchWildcardDirectory(directory, flags) {
|
|
105226
105146
|
return watchDirectory(directory, function (fileOrDirectory) {
|
|
105227
|
-
ts.Debug.assert(configFileName);
|
|
105228
|
-
ts.Debug.assert(compilerOptions);
|
|
105147
|
+
ts.Debug.assert(!!configFileName);
|
|
105229
105148
|
var fileOrDirectoryPath = toPath(fileOrDirectory);
|
|
105230
105149
|
if (cachedDirectoryStructureHost) {
|
|
105231
105150
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -105252,7 +105171,6 @@ var ts;
|
|
|
105252
105171
|
}, flags, watchOptions, ts.WatchType.WildcardDirectory);
|
|
105253
105172
|
}
|
|
105254
105173
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions, watchType) {
|
|
105255
|
-
ts.Debug.assert(configFileName);
|
|
105256
105174
|
ts.updateSharedExtendedConfigFileWatcher(forProjectPath, options, sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = new ts.Map()), function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(extendedConfigFileName, function (_fileName, eventKind) {
|
|
105257
105175
|
var _a;
|
|
105258
105176
|
updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);
|
|
@@ -107413,7 +107331,6 @@ var ts;
|
|
|
107413
107331
|
var colors = createColors(sys);
|
|
107414
107332
|
var header = [];
|
|
107415
107333
|
var terminalWidth = (_b = (_a = sys.getWidthOfTerminal) === null || _a === void 0 ? void 0 : _a.call(sys)) !== null && _b !== void 0 ? _b : 0;
|
|
107416
|
-
;
|
|
107417
107334
|
var tsIconLength = 5;
|
|
107418
107335
|
var tsIconFirstLine = colors.blueBackground(ts.padLeft("", tsIconLength));
|
|
107419
107336
|
var tsIconSecondLine = colors.blueBackground(colors.brightWhite(ts.padLeft("TS ", tsIconLength)));
|