@typescript-deploys/pr-build 4.9.0-pr-49929-7 → 4.9.0-pr-50776-2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/de/diagnosticMessages.generated.json +1 -2
- package/lib/es/diagnosticMessages.generated.json +1 -2
- package/lib/ja/diagnosticMessages.generated.json +1 -2
- package/lib/ko/diagnosticMessages.generated.json +1 -2
- package/lib/lib.dom.d.ts +199 -58
- package/lib/lib.webworker.d.ts +73 -24
- package/lib/pt-br/diagnosticMessages.generated.json +1 -2
- package/lib/ru/diagnosticMessages.generated.json +1 -2
- package/lib/tr/diagnosticMessages.generated.json +1 -2
- package/lib/tsc.js +309 -332
- package/lib/tsserver.js +608 -572
- package/lib/tsserverlibrary.d.ts +50 -50
- package/lib/tsserverlibrary.js +608 -572
- package/lib/typescript.d.ts +49 -49
- package/lib/typescript.js +607 -570
- package/lib/typescriptServices.d.ts +49 -49
- package/lib/typescriptServices.js +607 -570
- package/lib/typingsInstaller.js +336 -395
- package/lib/zh-tw/diagnosticMessages.generated.json +1 -2
- 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.20220922");
|
|
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 (!ctor.prototype
|
|
2567
|
+
if (!ts.hasProperty(ctor.prototype, "__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."),
|
|
@@ -6288,6 +6282,7 @@ var ts;
|
|
|
6288
6282
|
_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, ts.DiagnosticCategory.Error, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
|
|
6289
6283
|
We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, ts.DiagnosticCategory.Error, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
|
|
6290
6284
|
Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, ts.DiagnosticCategory.Error, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
|
|
6285
|
+
This_condition_will_always_return_0: diag(2845, ts.DiagnosticCategory.Error, "This_condition_will_always_return_0_2845", "This condition will always return '{0}'."),
|
|
6291
6286
|
Import_declaration_0_is_using_private_name_1: diag(4000, ts.DiagnosticCategory.Error, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
|
|
6292
6287
|
Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
|
|
6293
6288
|
Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, ts.DiagnosticCategory.Error, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
|
|
@@ -7230,6 +7225,8 @@ var ts;
|
|
|
7230
7225
|
Delete_unused_param_tag_0: diag(95171, ts.DiagnosticCategory.Message, "Delete_unused_param_tag_0_95171", "Delete unused '@param' tag '{0}'"),
|
|
7231
7226
|
Delete_all_unused_param_tags: diag(95172, ts.DiagnosticCategory.Message, "Delete_all_unused_param_tags_95172", "Delete all unused '@param' tags"),
|
|
7232
7227
|
Rename_param_tag_name_0_to_1: diag(95173, ts.DiagnosticCategory.Message, "Rename_param_tag_name_0_to_1_95173", "Rename '@param' tag name '{0}' to '{1}'"),
|
|
7228
|
+
Use_0: diag(95174, ts.DiagnosticCategory.Message, "Use_0_95174", "Use `{0}`."),
|
|
7229
|
+
Use_Number_isNaN_in_all_conditions: diag(95175, ts.DiagnosticCategory.Message, "Use_Number_isNaN_in_all_conditions_95175", "Use `Number.isNaN` in all conditions."),
|
|
7233
7230
|
No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer: diag(18004, ts.DiagnosticCategory.Error, "No_value_exists_in_scope_for_the_shorthand_property_0_Either_declare_one_or_provide_an_initializer_18004", "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer."),
|
|
7234
7231
|
Classes_may_not_have_a_field_named_constructor: diag(18006, ts.DiagnosticCategory.Error, "Classes_may_not_have_a_field_named_constructor_18006", "Classes may not have a field named 'constructor'."),
|
|
7235
7232
|
JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array: diag(18007, ts.DiagnosticCategory.Error, "JSX_expressions_may_not_use_the_comma_operator_Did_you_mean_to_write_an_array_18007", "JSX expressions may not use the comma operator. Did you mean to write an array?"),
|
|
@@ -7429,7 +7426,7 @@ var ts;
|
|
|
7429
7426
|
}
|
|
7430
7427
|
ts.stringToToken = stringToToken;
|
|
7431
7428
|
function computeLineStarts(text) {
|
|
7432
|
-
var result =
|
|
7429
|
+
var result = [];
|
|
7433
7430
|
var pos = 0;
|
|
7434
7431
|
var lineStart = 0;
|
|
7435
7432
|
while (pos < text.length) {
|
|
@@ -7834,7 +7831,9 @@ var ts;
|
|
|
7834
7831
|
}
|
|
7835
7832
|
ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
|
|
7836
7833
|
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
7837
|
-
if (comments
|
|
7834
|
+
if (!comments) {
|
|
7835
|
+
comments = [];
|
|
7836
|
+
}
|
|
7838
7837
|
comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
|
|
7839
7838
|
return comments;
|
|
7840
7839
|
}
|
|
@@ -8859,12 +8858,31 @@ var ts;
|
|
|
8859
8858
|
pos++;
|
|
8860
8859
|
return token = 0;
|
|
8861
8860
|
}
|
|
8862
|
-
|
|
8861
|
+
var charAfterHash = codePointAt(text, pos + 1);
|
|
8862
|
+
if (charAfterHash === 92) {
|
|
8863
|
+
pos++;
|
|
8864
|
+
var extendedCookedChar_1 = peekExtendedUnicodeEscape();
|
|
8865
|
+
if (extendedCookedChar_1 >= 0 && isIdentifierStart(extendedCookedChar_1, languageVersion)) {
|
|
8866
|
+
pos += 3;
|
|
8867
|
+
tokenFlags |= 8;
|
|
8868
|
+
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
8869
|
+
return token = 80;
|
|
8870
|
+
}
|
|
8871
|
+
var cookedChar_1 = peekUnicodeEscape();
|
|
8872
|
+
if (cookedChar_1 >= 0 && isIdentifierStart(cookedChar_1, languageVersion)) {
|
|
8873
|
+
pos += 6;
|
|
8874
|
+
tokenFlags |= 1024;
|
|
8875
|
+
tokenValue = "#" + String.fromCharCode(cookedChar_1) + scanIdentifierParts();
|
|
8876
|
+
return token = 80;
|
|
8877
|
+
}
|
|
8878
|
+
pos--;
|
|
8879
|
+
}
|
|
8880
|
+
if (isIdentifierStart(charAfterHash, languageVersion)) {
|
|
8863
8881
|
pos++;
|
|
8864
|
-
scanIdentifier(
|
|
8882
|
+
scanIdentifier(charAfterHash, languageVersion);
|
|
8865
8883
|
}
|
|
8866
8884
|
else {
|
|
8867
|
-
tokenValue =
|
|
8885
|
+
tokenValue = "#";
|
|
8868
8886
|
error(ts.Diagnostics.Invalid_character, pos++, charSize(ch));
|
|
8869
8887
|
}
|
|
8870
8888
|
return token = 80;
|
|
@@ -9601,10 +9619,7 @@ var ts;
|
|
|
9601
9619
|
node = node.original;
|
|
9602
9620
|
}
|
|
9603
9621
|
}
|
|
9604
|
-
|
|
9605
|
-
return node;
|
|
9606
|
-
}
|
|
9607
|
-
return nodeTest(node) ? node : undefined;
|
|
9622
|
+
return !nodeTest || nodeTest(node) ? node : undefined;
|
|
9608
9623
|
}
|
|
9609
9624
|
ts.getOriginalNode = getOriginalNode;
|
|
9610
9625
|
function findAncestor(node, callback) {
|
|
@@ -10136,7 +10151,7 @@ var ts;
|
|
|
10136
10151
|
}
|
|
10137
10152
|
ts.isToken = isToken;
|
|
10138
10153
|
function isNodeArray(array) {
|
|
10139
|
-
return
|
|
10154
|
+
return ts.hasProperty(array, "pos") && ts.hasProperty(array, "end");
|
|
10140
10155
|
}
|
|
10141
10156
|
ts.isNodeArray = isNodeArray;
|
|
10142
10157
|
function isLiteralKind(kind) {
|
|
@@ -10445,13 +10460,6 @@ var ts;
|
|
|
10445
10460
|
return false;
|
|
10446
10461
|
}
|
|
10447
10462
|
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
10463
|
function isBindingOrAssignmentPattern(node) {
|
|
10456
10464
|
return isObjectBindingOrAssignmentPattern(node)
|
|
10457
10465
|
|| isArrayBindingOrAssignmentPattern(node);
|
|
@@ -10486,21 +10494,6 @@ var ts;
|
|
|
10486
10494
|
return false;
|
|
10487
10495
|
}
|
|
10488
10496
|
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
10497
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
10505
10498
|
var kind = node.kind;
|
|
10506
10499
|
return kind === 208
|
|
@@ -10609,19 +10602,6 @@ var ts;
|
|
|
10609
10602
|
}
|
|
10610
10603
|
}
|
|
10611
10604
|
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
10605
|
function isExpression(node) {
|
|
10626
10606
|
return isExpressionKind(skipPartiallyEmittedExpressions(node).kind);
|
|
10627
10607
|
}
|
|
@@ -11455,7 +11435,6 @@ var ts;
|
|
|
11455
11435
|
return emitNode && emitNode.flags || 0;
|
|
11456
11436
|
}
|
|
11457
11437
|
ts.getEmitFlags = getEmitFlags;
|
|
11458
|
-
;
|
|
11459
11438
|
function getScriptTargetFeatures() {
|
|
11460
11439
|
return {
|
|
11461
11440
|
es2015: {
|
|
@@ -11732,7 +11711,6 @@ var ts;
|
|
|
11732
11711
|
}
|
|
11733
11712
|
ts.isBlockScope = isBlockScope;
|
|
11734
11713
|
function isDeclarationWithTypeParameters(node) {
|
|
11735
|
-
ts.Debug.type(node);
|
|
11736
11714
|
switch (node.kind) {
|
|
11737
11715
|
case 341:
|
|
11738
11716
|
case 348:
|
|
@@ -11745,7 +11723,6 @@ var ts;
|
|
|
11745
11723
|
}
|
|
11746
11724
|
ts.isDeclarationWithTypeParameters = isDeclarationWithTypeParameters;
|
|
11747
11725
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
11748
|
-
ts.Debug.type(node);
|
|
11749
11726
|
switch (node.kind) {
|
|
11750
11727
|
case 176:
|
|
11751
11728
|
case 177:
|
|
@@ -15548,7 +15525,7 @@ var ts;
|
|
|
15548
15525
|
return node.initializer !== undefined;
|
|
15549
15526
|
}
|
|
15550
15527
|
function isWatchSet(options) {
|
|
15551
|
-
return options.watch &&
|
|
15528
|
+
return options.watch && ts.hasProperty(options, "watch");
|
|
15552
15529
|
}
|
|
15553
15530
|
ts.isWatchSet = isWatchSet;
|
|
15554
15531
|
function closeFileWatcher(watcher) {
|
|
@@ -15766,7 +15743,6 @@ var ts;
|
|
|
15766
15743
|
|| kind === 114
|
|
15767
15744
|
|| kind === 155
|
|
15768
15745
|
|| kind === 144
|
|
15769
|
-
|| kind === 139
|
|
15770
15746
|
|| kind === 230
|
|
15771
15747
|
|| kind === 315
|
|
15772
15748
|
|| kind === 316
|
|
@@ -17663,9 +17639,6 @@ var ts;
|
|
|
17663
17639
|
}
|
|
17664
17640
|
}
|
|
17665
17641
|
ts.createParenthesizerRules = createParenthesizerRules;
|
|
17666
|
-
function castToNodeArray(nodes) {
|
|
17667
|
-
return ts.cast(nodes, ts.isNodeArray);
|
|
17668
|
-
}
|
|
17669
17642
|
ts.nullParenthesizerRules = {
|
|
17670
17643
|
getParenthesizeLeftSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
17671
17644
|
getParenthesizeRightSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
@@ -17679,23 +17652,23 @@ var ts;
|
|
|
17679
17652
|
parenthesizeLeftSideOfAccess: function (expression) { return ts.cast(expression, ts.isLeftHandSideExpression); },
|
|
17680
17653
|
parenthesizeOperandOfPostfixUnary: function (operand) { return ts.cast(operand, ts.isLeftHandSideExpression); },
|
|
17681
17654
|
parenthesizeOperandOfPrefixUnary: function (operand) { return ts.cast(operand, ts.isUnaryExpression); },
|
|
17682
|
-
parenthesizeExpressionsOfCommaDelimitedList:
|
|
17655
|
+
parenthesizeExpressionsOfCommaDelimitedList: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17683
17656
|
parenthesizeExpressionForDisallowedComma: ts.identity,
|
|
17684
17657
|
parenthesizeExpressionOfExpressionStatement: ts.identity,
|
|
17685
17658
|
parenthesizeConciseBodyOfArrowFunction: ts.identity,
|
|
17686
17659
|
parenthesizeCheckTypeOfConditionalType: ts.identity,
|
|
17687
17660
|
parenthesizeExtendsTypeOfConditionalType: ts.identity,
|
|
17688
|
-
parenthesizeConstituentTypesOfUnionType:
|
|
17661
|
+
parenthesizeConstituentTypesOfUnionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17689
17662
|
parenthesizeConstituentTypeOfUnionType: ts.identity,
|
|
17690
|
-
parenthesizeConstituentTypesOfIntersectionType:
|
|
17663
|
+
parenthesizeConstituentTypesOfIntersectionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17691
17664
|
parenthesizeConstituentTypeOfIntersectionType: ts.identity,
|
|
17692
17665
|
parenthesizeOperandOfTypeOperator: ts.identity,
|
|
17693
17666
|
parenthesizeOperandOfReadonlyTypeOperator: ts.identity,
|
|
17694
17667
|
parenthesizeNonArrayTypeOfPostfixType: ts.identity,
|
|
17695
|
-
parenthesizeElementTypesOfTupleType:
|
|
17668
|
+
parenthesizeElementTypesOfTupleType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
17696
17669
|
parenthesizeElementTypeOfTupleType: ts.identity,
|
|
17697
17670
|
parenthesizeTypeOfOptionalType: ts.identity,
|
|
17698
|
-
parenthesizeTypeArguments: function (nodes) { return nodes &&
|
|
17671
|
+
parenthesizeTypeArguments: function (nodes) { return nodes && ts.cast(nodes, ts.isNodeArray); },
|
|
17699
17672
|
parenthesizeLeadingTypeArgument: ts.identity,
|
|
17700
17673
|
};
|
|
17701
17674
|
})(ts || (ts = {}));
|
|
@@ -21762,7 +21735,7 @@ var ts;
|
|
|
21762
21735
|
clone.transformFlags = node.transformFlags;
|
|
21763
21736
|
setOriginalNode(clone, node);
|
|
21764
21737
|
for (var key in node) {
|
|
21765
|
-
if (
|
|
21738
|
+
if (ts.hasProperty(clone, key) || !ts.hasProperty(node, key)) {
|
|
21766
21739
|
continue;
|
|
21767
21740
|
}
|
|
21768
21741
|
clone[key] = node[key];
|
|
@@ -25806,7 +25779,6 @@ var ts;
|
|
|
25806
25779
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
25807
25780
|
visitNode(cbNode, node.type);
|
|
25808
25781
|
}
|
|
25809
|
-
;
|
|
25810
25782
|
function forEachChildInUnionOrIntersectionType(node, cbNode, cbNodes) {
|
|
25811
25783
|
return visitNodes(cbNode, cbNodes, node.types);
|
|
25812
25784
|
}
|
|
@@ -26849,7 +26821,7 @@ var ts;
|
|
|
26849
26821
|
}
|
|
26850
26822
|
function parsePrivateIdentifier() {
|
|
26851
26823
|
var pos = getNodePos();
|
|
26852
|
-
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.
|
|
26824
|
+
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.getTokenValue()));
|
|
26853
26825
|
nextToken();
|
|
26854
26826
|
return finishNode(node, pos);
|
|
26855
26827
|
}
|
|
@@ -31860,8 +31832,8 @@ var ts;
|
|
|
31860
31832
|
}
|
|
31861
31833
|
}
|
|
31862
31834
|
}
|
|
31863
|
-
function moveElementEntirelyPastChangeRange(element, delta, oldText, newText, aggressiveChecks) {
|
|
31864
|
-
if (
|
|
31835
|
+
function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) {
|
|
31836
|
+
if (isArray) {
|
|
31865
31837
|
visitArray(element);
|
|
31866
31838
|
}
|
|
31867
31839
|
else {
|
|
@@ -31869,7 +31841,6 @@ var ts;
|
|
|
31869
31841
|
}
|
|
31870
31842
|
return;
|
|
31871
31843
|
function visitNode(node) {
|
|
31872
|
-
ts.Debug.type(node);
|
|
31873
31844
|
var text = "";
|
|
31874
31845
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
31875
31846
|
text = oldText.substring(node.pos, node.end);
|
|
@@ -31891,7 +31862,6 @@ var ts;
|
|
|
31891
31862
|
checkNodePositions(node, aggressiveChecks);
|
|
31892
31863
|
}
|
|
31893
31864
|
function visitArray(array) {
|
|
31894
|
-
ts.Debug.type(array);
|
|
31895
31865
|
array._children = undefined;
|
|
31896
31866
|
ts.setTextRangePosEnd(array, array.pos + delta, array.end + delta);
|
|
31897
31867
|
for (var _i = 0, array_9 = array; _i < array_9.length; _i++) {
|
|
@@ -31945,10 +31915,9 @@ var ts;
|
|
|
31945
31915
|
visitNode(sourceFile);
|
|
31946
31916
|
return;
|
|
31947
31917
|
function visitNode(child) {
|
|
31948
|
-
ts.Debug.type(child);
|
|
31949
31918
|
ts.Debug.assert(child.pos <= child.end);
|
|
31950
31919
|
if (child.pos > changeRangeOldEnd) {
|
|
31951
|
-
moveElementEntirelyPastChangeRange(child, delta, oldText, newText, aggressiveChecks);
|
|
31920
|
+
moveElementEntirelyPastChangeRange(child, false, delta, oldText, newText, aggressiveChecks);
|
|
31952
31921
|
return;
|
|
31953
31922
|
}
|
|
31954
31923
|
var fullEnd = child.end;
|
|
@@ -31969,10 +31938,9 @@ var ts;
|
|
|
31969
31938
|
ts.Debug.assert(fullEnd < changeStart);
|
|
31970
31939
|
}
|
|
31971
31940
|
function visitArray(array) {
|
|
31972
|
-
ts.Debug.type(array);
|
|
31973
31941
|
ts.Debug.assert(array.pos <= array.end);
|
|
31974
31942
|
if (array.pos > changeRangeOldEnd) {
|
|
31975
|
-
moveElementEntirelyPastChangeRange(array, delta, oldText, newText, aggressiveChecks);
|
|
31943
|
+
moveElementEntirelyPastChangeRange(array, true, delta, oldText, newText, aggressiveChecks);
|
|
31976
31944
|
return;
|
|
31977
31945
|
}
|
|
31978
31946
|
var fullEnd = array.end;
|
|
@@ -35203,7 +35171,6 @@ var ts;
|
|
|
35203
35171
|
}
|
|
35204
35172
|
}
|
|
35205
35173
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
35206
|
-
ts.Debug.assert(typeof spec === "string");
|
|
35207
35174
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
35208
35175
|
return [ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
35209
35176
|
}
|
|
@@ -35307,7 +35274,7 @@ var ts;
|
|
|
35307
35274
|
function convertCompilerOptionsForTelemetry(opts) {
|
|
35308
35275
|
var out = {};
|
|
35309
35276
|
for (var key in opts) {
|
|
35310
|
-
if (
|
|
35277
|
+
if (ts.hasProperty(opts, key)) {
|
|
35311
35278
|
var type = getOptionFromName(key);
|
|
35312
35279
|
if (type !== undefined) {
|
|
35313
35280
|
out[key] = getOptionValueWithEmptyStrings(opts[key], type);
|
|
@@ -37117,6 +37084,7 @@ var ts;
|
|
|
37117
37084
|
}
|
|
37118
37085
|
}
|
|
37119
37086
|
function loadModuleFromSpecificNodeModulesDirectory(extensions, moduleName, nodeModulesDirectory, nodeModulesDirectoryExists, state, cache, redirectedReference) {
|
|
37087
|
+
var _a;
|
|
37120
37088
|
var candidate = ts.normalizePath(ts.combinePaths(nodeModulesDirectory, moduleName));
|
|
37121
37089
|
var packageInfo = getPackageJsonInfo(candidate, !nodeModulesDirectoryExists, state);
|
|
37122
37090
|
if (!(state.features & NodeResolutionFeatures.Exports)) {
|
|
@@ -37129,12 +37097,7 @@ var ts;
|
|
|
37129
37097
|
return withPackageId(packageInfo, fromDirectory);
|
|
37130
37098
|
}
|
|
37131
37099
|
}
|
|
37132
|
-
var _a = parsePackageName(moduleName), packageName = _a.packageName, rest = _a.rest;
|
|
37133
37100
|
var loader = function (extensions, candidate, onlyRecordFailures, state) {
|
|
37134
|
-
var _a;
|
|
37135
|
-
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
37136
|
-
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37137
|
-
}
|
|
37138
37101
|
var pathAndExtension = loadModuleFromFile(extensions, candidate, onlyRecordFailures, state) ||
|
|
37139
37102
|
loadNodeModuleFromDirectoryWorker(extensions, candidate, onlyRecordFailures, state, packageInfo && packageInfo.contents.packageJsonContent, packageInfo && packageInfo.contents.versionPaths);
|
|
37140
37103
|
if (!pathAndExtension && packageInfo
|
|
@@ -37144,18 +37107,22 @@ var ts;
|
|
|
37144
37107
|
}
|
|
37145
37108
|
return withPackageId(packageInfo, pathAndExtension);
|
|
37146
37109
|
};
|
|
37110
|
+
var _b = parsePackageName(moduleName), packageName = _b.packageName, rest = _b.rest;
|
|
37111
|
+
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
37147
37112
|
if (rest !== "") {
|
|
37148
|
-
var packageDirectory = ts.combinePaths(nodeModulesDirectory, packageName);
|
|
37149
37113
|
packageInfo = getPackageJsonInfo(packageDirectory, !nodeModulesDirectoryExists, state);
|
|
37150
|
-
|
|
37151
|
-
|
|
37152
|
-
|
|
37153
|
-
|
|
37154
|
-
|
|
37155
|
-
|
|
37156
|
-
|
|
37157
|
-
|
|
37158
|
-
|
|
37114
|
+
}
|
|
37115
|
+
if (packageInfo && packageInfo.contents.packageJsonContent.exports && state.features & NodeResolutionFeatures.Exports) {
|
|
37116
|
+
return (_a = loadModuleFromExports(packageInfo, extensions, ts.combinePaths(".", rest), state, cache, redirectedReference)) === null || _a === void 0 ? void 0 : _a.value;
|
|
37117
|
+
}
|
|
37118
|
+
if (rest !== "" && packageInfo && packageInfo.contents.versionPaths) {
|
|
37119
|
+
if (state.traceEnabled) {
|
|
37120
|
+
trace(state.host, ts.Diagnostics.package_json_has_a_typesVersions_entry_0_that_matches_compiler_version_1_looking_for_a_pattern_to_match_module_name_2, packageInfo.contents.versionPaths.version, ts.version, rest);
|
|
37121
|
+
}
|
|
37122
|
+
var packageDirectoryExists = nodeModulesDirectoryExists && ts.directoryProbablyExists(packageDirectory, state.host);
|
|
37123
|
+
var fromPaths = tryLoadModuleUsingPaths(extensions, rest, packageDirectory, packageInfo.contents.versionPaths.paths, undefined, loader, !packageDirectoryExists, state);
|
|
37124
|
+
if (fromPaths) {
|
|
37125
|
+
return fromPaths.value;
|
|
37159
37126
|
}
|
|
37160
37127
|
}
|
|
37161
37128
|
return loader(extensions, candidate, !nodeModulesDirectoryExists, state);
|
|
@@ -40809,7 +40776,8 @@ var ts;
|
|
|
40809
40776
|
var emptyTypeLiteralSymbol = createSymbol(2048, "__type");
|
|
40810
40777
|
emptyTypeLiteralSymbol.members = ts.createSymbolTable();
|
|
40811
40778
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40812
|
-
var
|
|
40779
|
+
var unknownEmptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40780
|
+
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
40813
40781
|
var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
40814
40782
|
emptyGenericType.instantiations = new ts.Map();
|
|
40815
40783
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -40912,6 +40880,8 @@ var ts;
|
|
|
40912
40880
|
var deferredGlobalOmitSymbol;
|
|
40913
40881
|
var deferredGlobalAwaitedSymbol;
|
|
40914
40882
|
var deferredGlobalBigIntType;
|
|
40883
|
+
var deferredGlobalNaNSymbol;
|
|
40884
|
+
var deferredGlobalRecordSymbol;
|
|
40915
40885
|
var allPotentiallyUnusedIdentifiers = new ts.Map();
|
|
40916
40886
|
var flowLoopStart = 0;
|
|
40917
40887
|
var flowLoopCount = 0;
|
|
@@ -40992,7 +40962,7 @@ var ts;
|
|
|
40992
40962
|
if (jsxFragmentPragma) {
|
|
40993
40963
|
var chosenPragma = ts.isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
40994
40964
|
file.localJsxFragmentFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
40995
|
-
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic
|
|
40965
|
+
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
40996
40966
|
if (file.localJsxFragmentFactory) {
|
|
40997
40967
|
return file.localJsxFragmentNamespace = ts.getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
40998
40968
|
}
|
|
@@ -41037,7 +41007,7 @@ var ts;
|
|
|
41037
41007
|
if (jsxPragma) {
|
|
41038
41008
|
var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
41039
41009
|
file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
41040
|
-
ts.visitNode(file.localJsxFactory, markAsSynthetic
|
|
41010
|
+
ts.visitNode(file.localJsxFactory, markAsSynthetic);
|
|
41041
41011
|
if (file.localJsxFactory) {
|
|
41042
41012
|
return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
41043
41013
|
}
|
|
@@ -42438,7 +42408,6 @@ var ts;
|
|
|
42438
42408
|
return valueSymbol;
|
|
42439
42409
|
}
|
|
42440
42410
|
var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
42441
|
-
ts.Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
42442
42411
|
result.declarations = ts.deduplicate(ts.concatenate(valueSymbol.declarations, typeSymbol.declarations), ts.equateValues);
|
|
42443
42412
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
42444
42413
|
if (valueSymbol.valueDeclaration)
|
|
@@ -44275,7 +44244,6 @@ var ts;
|
|
|
44275
44244
|
var objectFlags = ts.getObjectFlags(type);
|
|
44276
44245
|
if (objectFlags & 4) {
|
|
44277
44246
|
ts.Debug.assert(!!(type.flags & 524288));
|
|
44278
|
-
ts.Debug.type(type);
|
|
44279
44247
|
return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type);
|
|
44280
44248
|
}
|
|
44281
44249
|
if (type.flags & 262144 || objectFlags & 3) {
|
|
@@ -45615,7 +45583,7 @@ var ts;
|
|
|
45615
45583
|
}
|
|
45616
45584
|
var hadError = false;
|
|
45617
45585
|
var file = ts.getSourceFileOfNode(existing);
|
|
45618
|
-
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols
|
|
45586
|
+
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols);
|
|
45619
45587
|
if (hadError) {
|
|
45620
45588
|
return undefined;
|
|
45621
45589
|
}
|
|
@@ -45644,22 +45612,22 @@ var ts;
|
|
|
45644
45612
|
var name = ts.isIdentifier(t.name) ? t.name : t.name.right;
|
|
45645
45613
|
var typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode(node), name.escapedText);
|
|
45646
45614
|
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
|
|
45615
|
+
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
45616
|
}));
|
|
45649
45617
|
}
|
|
45650
45618
|
if (ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "") {
|
|
45651
45619
|
return ts.setOriginalNode(ts.factory.createKeywordTypeNode(131), node);
|
|
45652
45620
|
}
|
|
45653
45621
|
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
|
|
45622
|
+
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
45623
|
}
|
|
45656
45624
|
if (ts.isJSDocFunctionType(node)) {
|
|
45657
45625
|
if (ts.isJSDocConstructSignature(node)) {
|
|
45658
45626
|
var newTypeNode_1;
|
|
45659
|
-
return ts.factory.createConstructorTypeNode(undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
45627
|
+
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
45628
|
}
|
|
45661
45629
|
else {
|
|
45662
|
-
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
45630
|
+
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
45631
|
}
|
|
45664
45632
|
}
|
|
45665
45633
|
if (ts.isTypeReferenceNode(node) && ts.isInJSDoc(node) && (!existingTypeNodeIsNotReferenceOrIsReferenceWithCompatibleTypeArgumentCount(node, getTypeFromTypeNode(node)) || getIntendedTypeFromJSDocTypeReference(node) || unknownSymbol === resolveTypeReferenceName(node, 788968, true))) {
|
|
@@ -45930,6 +45898,7 @@ var ts;
|
|
|
45930
45898
|
&& symbol.escapedName !== "export="
|
|
45931
45899
|
&& !(symbol.flags & 4194304)
|
|
45932
45900
|
&& !(symbol.flags & 32)
|
|
45901
|
+
&& !(symbol.flags & 8192)
|
|
45933
45902
|
&& !isConstMergedWithNSPrintableAsSignatureMerge) {
|
|
45934
45903
|
if (propertyAsAlias) {
|
|
45935
45904
|
var createdExport = serializeMaybeAliasAssignment(symbol);
|
|
@@ -46023,7 +45992,7 @@ var ts;
|
|
|
46023
45992
|
}
|
|
46024
45993
|
}
|
|
46025
45994
|
function includePrivateSymbol(symbol) {
|
|
46026
|
-
if (ts.some(symbol.declarations, ts.
|
|
45995
|
+
if (ts.some(symbol.declarations, ts.isParameterDeclaration))
|
|
46027
45996
|
return;
|
|
46028
45997
|
ts.Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
|
|
46029
45998
|
getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol);
|
|
@@ -46327,7 +46296,7 @@ var ts;
|
|
|
46327
46296
|
break;
|
|
46328
46297
|
}
|
|
46329
46298
|
case 268:
|
|
46330
|
-
if (target.escapedName === "export=" && ts.some(target.declarations,
|
|
46299
|
+
if (target.escapedName === "export=" && ts.some(target.declarations, ts.isJsonSourceFile)) {
|
|
46331
46300
|
serializeMaybeAliasAssignment(symbol);
|
|
46332
46301
|
break;
|
|
46333
46302
|
}
|
|
@@ -47298,7 +47267,6 @@ var ts;
|
|
|
47298
47267
|
return container;
|
|
47299
47268
|
}
|
|
47300
47269
|
}
|
|
47301
|
-
;
|
|
47302
47270
|
}
|
|
47303
47271
|
function getFlowTypeFromCommonJSExport(symbol) {
|
|
47304
47272
|
var file = ts.getSourceFileOfNode(symbol.declarations[0]);
|
|
@@ -50072,7 +50040,11 @@ var ts;
|
|
|
50072
50040
|
}
|
|
50073
50041
|
}
|
|
50074
50042
|
}
|
|
50075
|
-
if (!singleProp ||
|
|
50043
|
+
if (!singleProp ||
|
|
50044
|
+
isUnion &&
|
|
50045
|
+
(propSet || checkFlags & 48) &&
|
|
50046
|
+
checkFlags & (1024 | 512) &&
|
|
50047
|
+
!(propSet && getCommonDeclarationsOfSymbols(ts.arrayFrom(propSet.values())))) {
|
|
50076
50048
|
return undefined;
|
|
50077
50049
|
}
|
|
50078
50050
|
if (!propSet && !(checkFlags & 16) && !indexTypes) {
|
|
@@ -50162,6 +50134,33 @@ var ts;
|
|
|
50162
50134
|
}
|
|
50163
50135
|
return property;
|
|
50164
50136
|
}
|
|
50137
|
+
function getCommonDeclarationsOfSymbols(symbols) {
|
|
50138
|
+
var commonDeclarations;
|
|
50139
|
+
var _loop_14 = function (symbol) {
|
|
50140
|
+
if (!symbol.declarations) {
|
|
50141
|
+
return { value: undefined };
|
|
50142
|
+
}
|
|
50143
|
+
if (!commonDeclarations) {
|
|
50144
|
+
commonDeclarations = new ts.Set(symbol.declarations);
|
|
50145
|
+
return "continue";
|
|
50146
|
+
}
|
|
50147
|
+
commonDeclarations.forEach(function (declaration) {
|
|
50148
|
+
if (!ts.contains(symbol.declarations, declaration)) {
|
|
50149
|
+
commonDeclarations.delete(declaration);
|
|
50150
|
+
}
|
|
50151
|
+
});
|
|
50152
|
+
if (commonDeclarations.size === 0) {
|
|
50153
|
+
return { value: undefined };
|
|
50154
|
+
}
|
|
50155
|
+
};
|
|
50156
|
+
for (var _i = 0, symbols_3 = symbols; _i < symbols_3.length; _i++) {
|
|
50157
|
+
var symbol = symbols_3[_i];
|
|
50158
|
+
var state_4 = _loop_14(symbol);
|
|
50159
|
+
if (typeof state_4 === "object")
|
|
50160
|
+
return state_4.value;
|
|
50161
|
+
}
|
|
50162
|
+
return commonDeclarations;
|
|
50163
|
+
}
|
|
50165
50164
|
function getPropertyOfUnionOrIntersectionType(type, name, skipObjectFunctionPropertyAugment) {
|
|
50166
50165
|
var property = getUnionOrIntersectionProperty(type, name, skipObjectFunctionPropertyAugment);
|
|
50167
50166
|
return property && !(ts.getCheckFlags(property) & 16) ? property : undefined;
|
|
@@ -50792,7 +50791,7 @@ var ts;
|
|
|
50792
50791
|
function getIndexInfosOfIndexSymbol(indexSymbol) {
|
|
50793
50792
|
if (indexSymbol.declarations) {
|
|
50794
50793
|
var indexInfos_4 = [];
|
|
50795
|
-
var
|
|
50794
|
+
var _loop_15 = function (declaration) {
|
|
50796
50795
|
if (declaration.parameters.length === 1) {
|
|
50797
50796
|
var parameter = declaration.parameters[0];
|
|
50798
50797
|
if (parameter.type) {
|
|
@@ -50806,7 +50805,7 @@ var ts;
|
|
|
50806
50805
|
};
|
|
50807
50806
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
50808
50807
|
var declaration = _a[_i];
|
|
50809
|
-
|
|
50808
|
+
_loop_15(declaration);
|
|
50810
50809
|
}
|
|
50811
50810
|
return indexInfos_4;
|
|
50812
50811
|
}
|
|
@@ -50823,7 +50822,7 @@ var ts;
|
|
|
50823
50822
|
var _a;
|
|
50824
50823
|
var inferences;
|
|
50825
50824
|
if ((_a = typeParameter.symbol) === null || _a === void 0 ? void 0 : _a.declarations) {
|
|
50826
|
-
var
|
|
50825
|
+
var _loop_16 = function (declaration) {
|
|
50827
50826
|
if (declaration.parent.kind === 192) {
|
|
50828
50827
|
var _c = ts.walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent), _d = _c[0], childTypeParameter = _d === void 0 ? declaration.parent : _d, grandParent = _c[1];
|
|
50829
50828
|
if (grandParent.kind === 180 && !omitTypeReferences) {
|
|
@@ -50868,7 +50867,7 @@ var ts;
|
|
|
50868
50867
|
};
|
|
50869
50868
|
for (var _i = 0, _b = typeParameter.symbol.declarations; _i < _b.length; _i++) {
|
|
50870
50869
|
var declaration = _b[_i];
|
|
50871
|
-
|
|
50870
|
+
_loop_16(declaration);
|
|
50872
50871
|
}
|
|
50873
50872
|
}
|
|
50874
50873
|
return inferences && getIntersectionType(inferences);
|
|
@@ -51469,6 +51468,13 @@ var ts;
|
|
|
51469
51468
|
function getGlobalBigIntType() {
|
|
51470
51469
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", 0, false))) || emptyObjectType;
|
|
51471
51470
|
}
|
|
51471
|
+
function getGlobalNaNSymbol() {
|
|
51472
|
+
return (deferredGlobalNaNSymbol || (deferredGlobalNaNSymbol = getGlobalValueSymbol("NaN", false)));
|
|
51473
|
+
}
|
|
51474
|
+
function getGlobalRecordSymbol() {
|
|
51475
|
+
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", 2, true) || unknownSymbol);
|
|
51476
|
+
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
51477
|
+
}
|
|
51472
51478
|
function createTypeFromGenericGlobalType(genericGlobalType, typeArguments) {
|
|
51473
51479
|
return genericGlobalType !== emptyGenericType ? createTypeReference(genericGlobalType, typeArguments) : emptyObjectType;
|
|
51474
51480
|
}
|
|
@@ -51680,7 +51686,7 @@ var ts;
|
|
|
51680
51686
|
var lastRequiredIndex = -1;
|
|
51681
51687
|
var firstRestIndex = -1;
|
|
51682
51688
|
var lastOptionalOrRestIndex = -1;
|
|
51683
|
-
var
|
|
51689
|
+
var _loop_17 = function (i) {
|
|
51684
51690
|
var type = elementTypes[i];
|
|
51685
51691
|
var flags = target.elementFlags[i];
|
|
51686
51692
|
if (flags & 8) {
|
|
@@ -51706,9 +51712,9 @@ var ts;
|
|
|
51706
51712
|
}
|
|
51707
51713
|
};
|
|
51708
51714
|
for (var i = 0; i < elementTypes.length; i++) {
|
|
51709
|
-
var
|
|
51710
|
-
if (typeof
|
|
51711
|
-
return
|
|
51715
|
+
var state_5 = _loop_17(i);
|
|
51716
|
+
if (typeof state_5 === "object")
|
|
51717
|
+
return state_5.value;
|
|
51712
51718
|
}
|
|
51713
51719
|
for (var i = 0; i < lastRequiredIndex; i++) {
|
|
51714
51720
|
if (expandedFlags[i] & 2)
|
|
@@ -51734,7 +51740,7 @@ var ts;
|
|
|
51734
51740
|
if (flags & (2 | 4)) {
|
|
51735
51741
|
lastOptionalOrRestIndex = expandedFlags.length;
|
|
51736
51742
|
}
|
|
51737
|
-
expandedTypes.push(type);
|
|
51743
|
+
expandedTypes.push(flags & 2 ? addOptionality(type, true) : type);
|
|
51738
51744
|
expandedFlags.push(flags);
|
|
51739
51745
|
if (expandedDeclarations && declaration) {
|
|
51740
51746
|
expandedDeclarations.push(declaration);
|
|
@@ -51883,7 +51889,7 @@ var ts;
|
|
|
51883
51889
|
var templates = ts.filter(types, isPatternLiteralType);
|
|
51884
51890
|
if (templates.length) {
|
|
51885
51891
|
var i = types.length;
|
|
51886
|
-
var
|
|
51892
|
+
var _loop_18 = function () {
|
|
51887
51893
|
i--;
|
|
51888
51894
|
var t = types[i];
|
|
51889
51895
|
if (t.flags & 128 && ts.some(templates, function (template) { return isTypeMatchedByTemplateLiteralType(t, template); })) {
|
|
@@ -51891,7 +51897,7 @@ var ts;
|
|
|
51891
51897
|
}
|
|
51892
51898
|
};
|
|
51893
51899
|
while (i > 0) {
|
|
51894
|
-
|
|
51900
|
+
_loop_18();
|
|
51895
51901
|
}
|
|
51896
51902
|
}
|
|
51897
51903
|
}
|
|
@@ -51961,14 +51967,14 @@ var ts;
|
|
|
51961
51967
|
var namedUnions = [];
|
|
51962
51968
|
addNamedUnions(namedUnions, types);
|
|
51963
51969
|
var reducedTypes = [];
|
|
51964
|
-
var
|
|
51970
|
+
var _loop_19 = function (t) {
|
|
51965
51971
|
if (!ts.some(namedUnions, function (union) { return containsType(union.types, t); })) {
|
|
51966
51972
|
reducedTypes.push(t);
|
|
51967
51973
|
}
|
|
51968
51974
|
};
|
|
51969
51975
|
for (var _i = 0, typeSet_1 = typeSet; _i < typeSet_1.length; _i++) {
|
|
51970
51976
|
var t = typeSet_1[_i];
|
|
51971
|
-
|
|
51977
|
+
_loop_19(t);
|
|
51972
51978
|
}
|
|
51973
51979
|
if (!aliasSymbol && namedUnions.length === 1 && reducedTypes.length === 0) {
|
|
51974
51980
|
return namedUnions[0];
|
|
@@ -53050,7 +53056,7 @@ var ts;
|
|
|
53050
53056
|
var result;
|
|
53051
53057
|
var extraTypes;
|
|
53052
53058
|
var tailCount = 0;
|
|
53053
|
-
var
|
|
53059
|
+
var _loop_20 = function () {
|
|
53054
53060
|
if (tailCount === 1000) {
|
|
53055
53061
|
error(currentNode, ts.Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite);
|
|
53056
53062
|
result = errorType;
|
|
@@ -53124,10 +53130,10 @@ var ts;
|
|
|
53124
53130
|
return "break";
|
|
53125
53131
|
};
|
|
53126
53132
|
while (true) {
|
|
53127
|
-
var
|
|
53128
|
-
if (typeof
|
|
53129
|
-
return
|
|
53130
|
-
if (
|
|
53133
|
+
var state_6 = _loop_20();
|
|
53134
|
+
if (typeof state_6 === "object")
|
|
53135
|
+
return state_6.value;
|
|
53136
|
+
if (state_6 === "break")
|
|
53131
53137
|
break;
|
|
53132
53138
|
}
|
|
53133
53139
|
return extraTypes ? getUnionType(ts.append(extraTypes, result)) : result;
|
|
@@ -55486,7 +55492,7 @@ var ts;
|
|
|
55486
55492
|
reducedTarget = findMatchingDiscriminantType(source, target, isRelatedTo) || filterPrimitivesIfContainsNonPrimitive(target);
|
|
55487
55493
|
checkTypes = reducedTarget.flags & 1048576 ? reducedTarget.types : [reducedTarget];
|
|
55488
55494
|
}
|
|
55489
|
-
var
|
|
55495
|
+
var _loop_21 = function (prop) {
|
|
55490
55496
|
if (shouldCheckAsExcessProperty(prop, source.symbol) && !isIgnoredJsxProperty(source, prop)) {
|
|
55491
55497
|
if (!isKnownProperty(reducedTarget, prop.escapedName, isComparingJsxAttributes)) {
|
|
55492
55498
|
if (reportErrors) {
|
|
@@ -55539,9 +55545,9 @@ var ts;
|
|
|
55539
55545
|
};
|
|
55540
55546
|
for (var _i = 0, _b = getPropertiesOfType(source); _i < _b.length; _i++) {
|
|
55541
55547
|
var prop = _b[_i];
|
|
55542
|
-
var
|
|
55543
|
-
if (typeof
|
|
55544
|
-
return
|
|
55548
|
+
var state_7 = _loop_21(prop);
|
|
55549
|
+
if (typeof state_7 === "object")
|
|
55550
|
+
return state_7.value;
|
|
55545
55551
|
}
|
|
55546
55552
|
return false;
|
|
55547
55553
|
}
|
|
@@ -56318,11 +56324,11 @@ var ts;
|
|
|
56318
56324
|
}
|
|
56319
56325
|
var discriminantCombinations = ts.cartesianProduct(sourceDiscriminantTypes);
|
|
56320
56326
|
var matchingTypes = [];
|
|
56321
|
-
var
|
|
56327
|
+
var _loop_22 = function (combination) {
|
|
56322
56328
|
var hasMatch = false;
|
|
56323
56329
|
outer: for (var _c = 0, _d = target.types; _c < _d.length; _c++) {
|
|
56324
56330
|
var type = _d[_c];
|
|
56325
|
-
var
|
|
56331
|
+
var _loop_23 = function (i) {
|
|
56326
56332
|
var sourceProperty = sourcePropertiesFiltered[i];
|
|
56327
56333
|
var targetProperty = getPropertyOfType(type, sourceProperty.escapedName);
|
|
56328
56334
|
if (!targetProperty)
|
|
@@ -56335,8 +56341,8 @@ var ts;
|
|
|
56335
56341
|
}
|
|
56336
56342
|
};
|
|
56337
56343
|
for (var i = 0; i < sourcePropertiesFiltered.length; i++) {
|
|
56338
|
-
var
|
|
56339
|
-
switch (
|
|
56344
|
+
var state_9 = _loop_23(i);
|
|
56345
|
+
switch (state_9) {
|
|
56340
56346
|
case "continue-outer": continue outer;
|
|
56341
56347
|
}
|
|
56342
56348
|
}
|
|
@@ -56349,9 +56355,9 @@ var ts;
|
|
|
56349
56355
|
};
|
|
56350
56356
|
for (var _a = 0, discriminantCombinations_1 = discriminantCombinations; _a < discriminantCombinations_1.length; _a++) {
|
|
56351
56357
|
var combination = discriminantCombinations_1[_a];
|
|
56352
|
-
var
|
|
56353
|
-
if (typeof
|
|
56354
|
-
return
|
|
56358
|
+
var state_8 = _loop_22(combination);
|
|
56359
|
+
if (typeof state_8 === "object")
|
|
56360
|
+
return state_8.value;
|
|
56355
56361
|
}
|
|
56356
56362
|
var result = -1;
|
|
56357
56363
|
for (var _b = 0, matchingTypes_1 = matchingTypes; _b < matchingTypes_1.length; _b++) {
|
|
@@ -56993,7 +56999,7 @@ var ts;
|
|
|
56993
56999
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.push("checkTypes", "getVariancesWorker", { arity: typeParameters.length, id: getTypeId(getDeclaredTypeOfSymbol(symbol)) });
|
|
56994
57000
|
links.variances = ts.emptyArray;
|
|
56995
57001
|
var variances = [];
|
|
56996
|
-
var
|
|
57002
|
+
var _loop_24 = function (tp) {
|
|
56997
57003
|
var modifiers = getVarianceModifiers(tp);
|
|
56998
57004
|
var variance = modifiers & 65536 ?
|
|
56999
57005
|
modifiers & 32768 ? 0 : 1 :
|
|
@@ -57024,7 +57030,7 @@ var ts;
|
|
|
57024
57030
|
};
|
|
57025
57031
|
for (var _i = 0, typeParameters_2 = typeParameters; _i < typeParameters_2.length; _i++) {
|
|
57026
57032
|
var tp = typeParameters_2[_i];
|
|
57027
|
-
|
|
57033
|
+
_loop_24(tp);
|
|
57028
57034
|
}
|
|
57029
57035
|
links.variances = variances;
|
|
57030
57036
|
ts.tracing === null || ts.tracing === void 0 ? void 0 : ts.tracing.pop({ variances: variances.map(ts.Debug.formatVariance) });
|
|
@@ -57535,7 +57541,8 @@ var ts;
|
|
|
57535
57541
|
function getOptionalType(type, isProperty) {
|
|
57536
57542
|
if (isProperty === void 0) { isProperty = false; }
|
|
57537
57543
|
ts.Debug.assert(strictNullChecks);
|
|
57538
|
-
|
|
57544
|
+
var missingOrUndefined = isProperty ? missingType : undefinedType;
|
|
57545
|
+
return type.flags & 32768 || type.flags & 1048576 && type.types[0] === missingOrUndefined ? type : getUnionType([type, missingOrUndefined]);
|
|
57539
57546
|
}
|
|
57540
57547
|
function getGlobalNonNullableTypeInstantiation(type) {
|
|
57541
57548
|
if (!deferredGlobalNonNullableTypeAlias) {
|
|
@@ -58668,7 +58675,7 @@ var ts;
|
|
|
58668
58675
|
var matches = inferTypesFromTemplateLiteralType(source, target);
|
|
58669
58676
|
var types = target.types;
|
|
58670
58677
|
if (matches || ts.every(target.texts, function (s) { return s.length === 0; })) {
|
|
58671
|
-
var
|
|
58678
|
+
var _loop_25 = function (i) {
|
|
58672
58679
|
var source_1 = matches ? matches[i] : neverType;
|
|
58673
58680
|
var target_3 = types[i];
|
|
58674
58681
|
if (source_1.flags & 128 && target_3.flags & 8650752) {
|
|
@@ -58712,7 +58719,7 @@ var ts;
|
|
|
58712
58719
|
inferFromTypes(source_1, target_3);
|
|
58713
58720
|
};
|
|
58714
58721
|
for (var i = 0; i < types.length; i++) {
|
|
58715
|
-
|
|
58722
|
+
_loop_25(i);
|
|
58716
58723
|
}
|
|
58717
58724
|
}
|
|
58718
58725
|
}
|
|
@@ -59131,7 +59138,7 @@ var ts;
|
|
|
59131
59138
|
return name;
|
|
59132
59139
|
}
|
|
59133
59140
|
}
|
|
59134
|
-
if (ts.hasOnlyExpressionInitializer(declaration)) {
|
|
59141
|
+
if (ts.hasOnlyExpressionInitializer(declaration) && isBlockScopedNameDeclaredBeforeUse(declaration, node.argumentExpression)) {
|
|
59135
59142
|
var initializer = ts.getEffectiveInitializer(declaration);
|
|
59136
59143
|
return initializer && tryGetNameFromType(getTypeOfExpression(initializer));
|
|
59137
59144
|
}
|
|
@@ -59187,7 +59194,7 @@ var ts;
|
|
|
59187
59194
|
function mapTypesByKeyProperty(types, name) {
|
|
59188
59195
|
var map = new ts.Map();
|
|
59189
59196
|
var count = 0;
|
|
59190
|
-
var
|
|
59197
|
+
var _loop_26 = function (type) {
|
|
59191
59198
|
if (type.flags & (524288 | 2097152 | 58982400)) {
|
|
59192
59199
|
var discriminant = getTypeOfPropertyOfType(type, name);
|
|
59193
59200
|
if (discriminant) {
|
|
@@ -59213,9 +59220,9 @@ var ts;
|
|
|
59213
59220
|
};
|
|
59214
59221
|
for (var _i = 0, types_15 = types; _i < types_15.length; _i++) {
|
|
59215
59222
|
var type = types_15[_i];
|
|
59216
|
-
var
|
|
59217
|
-
if (typeof
|
|
59218
|
-
return
|
|
59223
|
+
var state_10 = _loop_26(type);
|
|
59224
|
+
if (typeof state_10 === "object")
|
|
59225
|
+
return state_10.value;
|
|
59219
59226
|
}
|
|
59220
59227
|
return count >= 10 && count * 2 >= types.length ? map : undefined;
|
|
59221
59228
|
}
|
|
@@ -60465,18 +60472,22 @@ var ts;
|
|
|
60465
60472
|
}
|
|
60466
60473
|
function isTypePresencePossible(type, propName, assumeTrue) {
|
|
60467
60474
|
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; })) {
|
|
60475
|
+
return prop ?
|
|
60476
|
+
!!(prop.flags & 16777216) || assumeTrue :
|
|
60477
|
+
!!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
|
|
60478
|
+
}
|
|
60479
|
+
function narrowByInKeyword(type, nameType, assumeTrue) {
|
|
60480
|
+
var name = getPropertyNameFromType(nameType);
|
|
60481
|
+
var isKnownProperty = someType(type, function (t) { return isTypePresencePossible(t, name, true); });
|
|
60482
|
+
if (isKnownProperty) {
|
|
60478
60483
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
60479
60484
|
}
|
|
60485
|
+
if (assumeTrue) {
|
|
60486
|
+
var recordSymbol = getGlobalRecordSymbol();
|
|
60487
|
+
if (recordSymbol) {
|
|
60488
|
+
return getIntersectionType([type, getTypeAliasInstantiation(recordSymbol, [nameType, unknownType])]);
|
|
60489
|
+
}
|
|
60490
|
+
}
|
|
60480
60491
|
return type;
|
|
60481
60492
|
}
|
|
60482
60493
|
function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
|
|
@@ -60535,15 +60546,14 @@ var ts;
|
|
|
60535
60546
|
return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue);
|
|
60536
60547
|
}
|
|
60537
60548
|
var target = getReferenceCandidate(expr.right);
|
|
60538
|
-
var leftType =
|
|
60539
|
-
if (leftType.flags &
|
|
60540
|
-
var name = ts.escapeLeadingUnderscores(leftType.value);
|
|
60549
|
+
var leftType = getTypeOfExpression(expr.left);
|
|
60550
|
+
if (leftType.flags & 8576) {
|
|
60541
60551
|
if (containsMissingType(type) && ts.isAccessExpression(reference) && isMatchingReference(reference.expression, target) &&
|
|
60542
|
-
getAccessedPropertyName(reference) ===
|
|
60552
|
+
getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) {
|
|
60543
60553
|
return getTypeWithFacts(type, assumeTrue ? 524288 : 65536);
|
|
60544
60554
|
}
|
|
60545
60555
|
if (isMatchingReference(reference, target)) {
|
|
60546
|
-
return narrowByInKeyword(type,
|
|
60556
|
+
return narrowByInKeyword(type, leftType, assumeTrue);
|
|
60547
60557
|
}
|
|
60548
60558
|
}
|
|
60549
60559
|
break;
|
|
@@ -64059,7 +64069,6 @@ var ts;
|
|
|
64059
64069
|
}
|
|
64060
64070
|
return false;
|
|
64061
64071
|
}
|
|
64062
|
-
;
|
|
64063
64072
|
var suggestedMethod = ts.isAssignmentTarget(expr) ? "set" : "get";
|
|
64064
64073
|
if (!hasProp(suggestedMethod)) {
|
|
64065
64074
|
return undefined;
|
|
@@ -64715,7 +64724,7 @@ var ts;
|
|
|
64715
64724
|
var spreadIndex = getSpreadArgumentIndex(args);
|
|
64716
64725
|
if (spreadIndex >= 0) {
|
|
64717
64726
|
var effectiveArgs_1 = args.slice(0, spreadIndex);
|
|
64718
|
-
var
|
|
64727
|
+
var _loop_27 = function (i) {
|
|
64719
64728
|
var arg = args[i];
|
|
64720
64729
|
var spreadType = arg.kind === 227 && (flowLoopCount ? checkExpression(arg.expression) : checkExpressionCached(arg.expression));
|
|
64721
64730
|
if (spreadType && isTupleType(spreadType)) {
|
|
@@ -64731,7 +64740,7 @@ var ts;
|
|
|
64731
64740
|
}
|
|
64732
64741
|
};
|
|
64733
64742
|
for (var i = spreadIndex; i < args.length; i++) {
|
|
64734
|
-
|
|
64743
|
+
_loop_27(i);
|
|
64735
64744
|
}
|
|
64736
64745
|
return effectiveArgs_1;
|
|
64737
64746
|
}
|
|
@@ -64981,7 +64990,7 @@ var ts;
|
|
|
64981
64990
|
var min_3 = Number.MAX_VALUE;
|
|
64982
64991
|
var minIndex = 0;
|
|
64983
64992
|
var i_1 = 0;
|
|
64984
|
-
var
|
|
64993
|
+
var _loop_28 = function (c) {
|
|
64985
64994
|
var chain_2 = function () { return ts.chainDiagnosticMessages(undefined, ts.Diagnostics.Overload_0_of_1_2_gave_the_following_error, i_1 + 1, candidates.length, signatureToString(c)); };
|
|
64986
64995
|
var diags_2 = getSignatureApplicabilityError(node, args, c, assignableRelation, 0, true, chain_2);
|
|
64987
64996
|
if (diags_2) {
|
|
@@ -64999,7 +65008,7 @@ var ts;
|
|
|
64999
65008
|
};
|
|
65000
65009
|
for (var _a = 0, candidatesForArgumentError_1 = candidatesForArgumentError; _a < candidatesForArgumentError_1.length; _a++) {
|
|
65001
65010
|
var c = candidatesForArgumentError_1[_a];
|
|
65002
|
-
|
|
65011
|
+
_loop_28(c);
|
|
65003
65012
|
}
|
|
65004
65013
|
var diags_3 = max > 1 ? allDiagnostics[minIndex] : ts.flatten(allDiagnostics);
|
|
65005
65014
|
ts.Debug.assert(diags_3.length > 0, "No errors reported for 3 or fewer overload signatures");
|
|
@@ -65142,7 +65151,7 @@ var ts;
|
|
|
65142
65151
|
}
|
|
65143
65152
|
var _a = ts.minAndMax(candidates, getNumNonRestParameters), minArgumentCount = _a.min, maxNonRestParam = _a.max;
|
|
65144
65153
|
var parameters = [];
|
|
65145
|
-
var
|
|
65154
|
+
var _loop_29 = function (i) {
|
|
65146
65155
|
var symbols = ts.mapDefined(candidates, function (s) { return signatureHasRestParameter(s) ?
|
|
65147
65156
|
i < s.parameters.length - 1 ? s.parameters[i] : ts.last(s.parameters) :
|
|
65148
65157
|
i < s.parameters.length ? s.parameters[i] : undefined; });
|
|
@@ -65150,7 +65159,7 @@ var ts;
|
|
|
65150
65159
|
parameters.push(createCombinedSymbolFromTypes(symbols, ts.mapDefined(candidates, function (candidate) { return tryGetTypeAtPosition(candidate, i); })));
|
|
65151
65160
|
};
|
|
65152
65161
|
for (var i = 0; i < maxNonRestParam; i++) {
|
|
65153
|
-
|
|
65162
|
+
_loop_29(i);
|
|
65154
65163
|
}
|
|
65155
65164
|
var restParameterSymbols = ts.mapDefined(candidates, function (c) { return signatureHasRestParameter(c) ? ts.last(c.parameters) : undefined; });
|
|
65156
65165
|
var flags = 0;
|
|
@@ -67142,6 +67151,9 @@ var ts;
|
|
|
67142
67151
|
}
|
|
67143
67152
|
return booleanType;
|
|
67144
67153
|
}
|
|
67154
|
+
function hasEmptyObjectIntersection(type) {
|
|
67155
|
+
return someType(type, function (t) { return t === unknownEmptyObjectType || !!(t.flags & 2097152) && ts.some(t.types, isEmptyAnonymousObjectType); });
|
|
67156
|
+
}
|
|
67145
67157
|
function checkInExpression(left, right, leftType, rightType) {
|
|
67146
67158
|
if (leftType === silentNeverType || rightType === silentNeverType) {
|
|
67147
67159
|
return silentNeverType;
|
|
@@ -67156,18 +67168,12 @@ var ts;
|
|
|
67156
67168
|
}
|
|
67157
67169
|
}
|
|
67158
67170
|
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
|
-
}
|
|
67171
|
+
checkTypeAssignableTo(checkNonNullType(leftType, left), stringNumberSymbolType, left);
|
|
67164
67172
|
}
|
|
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);
|
|
67173
|
+
if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) {
|
|
67174
|
+
if (hasEmptyObjectIntersection(rightType)) {
|
|
67175
|
+
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));
|
|
67176
|
+
}
|
|
67171
67177
|
}
|
|
67172
67178
|
return booleanType;
|
|
67173
67179
|
}
|
|
@@ -67635,6 +67641,7 @@ var ts;
|
|
|
67635
67641
|
var eqType = operator === 34 || operator === 36;
|
|
67636
67642
|
error(errorNode, ts.Diagnostics.This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value, eqType ? "false" : "true");
|
|
67637
67643
|
}
|
|
67644
|
+
checkNaNEquality(errorNode, operator, left, right);
|
|
67638
67645
|
reportOperatorErrorUnless(function (left, right) { return isTypeEqualityComparableTo(left, right) || isTypeEqualityComparableTo(right, left); });
|
|
67639
67646
|
return booleanType;
|
|
67640
67647
|
case 102:
|
|
@@ -67828,6 +67835,26 @@ var ts;
|
|
|
67828
67835
|
return undefined;
|
|
67829
67836
|
}
|
|
67830
67837
|
}
|
|
67838
|
+
function checkNaNEquality(errorNode, operator, left, right) {
|
|
67839
|
+
var isLeftNaN = isGlobalNaN(ts.skipParentheses(left));
|
|
67840
|
+
var isRightNaN = isGlobalNaN(ts.skipParentheses(right));
|
|
67841
|
+
if (isLeftNaN || isRightNaN) {
|
|
67842
|
+
var err = error(errorNode, ts.Diagnostics.This_condition_will_always_return_0, ts.tokenToString(operator === 36 || operator === 34 ? 95 : 110));
|
|
67843
|
+
if (isLeftNaN && isRightNaN)
|
|
67844
|
+
return;
|
|
67845
|
+
var operatorString = operator === 37 || operator === 35 ? ts.tokenToString(53) : "";
|
|
67846
|
+
var location = isLeftNaN ? right : left;
|
|
67847
|
+
var expression = ts.skipParentheses(location);
|
|
67848
|
+
ts.addRelatedInfo(err, ts.createDiagnosticForNode(location, ts.Diagnostics.Did_you_mean_0, "".concat(operatorString, "Number.isNaN(").concat(ts.isEntityNameExpression(expression) ? ts.entityNameToString(expression) : "...", ")")));
|
|
67849
|
+
}
|
|
67850
|
+
}
|
|
67851
|
+
function isGlobalNaN(expr) {
|
|
67852
|
+
if (ts.isIdentifier(expr) && expr.escapedText === "NaN") {
|
|
67853
|
+
var globalNaNSymbol = getGlobalNaNSymbol();
|
|
67854
|
+
return !!globalNaNSymbol && globalNaNSymbol === getResolvedSymbol(expr);
|
|
67855
|
+
}
|
|
67856
|
+
return false;
|
|
67857
|
+
}
|
|
67831
67858
|
}
|
|
67832
67859
|
function getBaseTypesIfUnrelated(leftType, rightType, isRelated) {
|
|
67833
67860
|
var effectiveLeft = leftType;
|
|
@@ -68749,7 +68776,7 @@ var ts;
|
|
|
68749
68776
|
var indexSymbol = getIndexSymbol(getSymbolOfNode(node));
|
|
68750
68777
|
if (indexSymbol === null || indexSymbol === void 0 ? void 0 : indexSymbol.declarations) {
|
|
68751
68778
|
var indexSignatureMap_1 = new ts.Map();
|
|
68752
|
-
var
|
|
68779
|
+
var _loop_30 = function (declaration) {
|
|
68753
68780
|
if (declaration.parameters.length === 1 && declaration.parameters[0].type) {
|
|
68754
68781
|
forEachType(getTypeFromTypeNode(declaration.parameters[0].type), function (type) {
|
|
68755
68782
|
var entry = indexSignatureMap_1.get(getTypeId(type));
|
|
@@ -68764,7 +68791,7 @@ var ts;
|
|
|
68764
68791
|
};
|
|
68765
68792
|
for (var _i = 0, _a = indexSymbol.declarations; _i < _a.length; _i++) {
|
|
68766
68793
|
var declaration = _a[_i];
|
|
68767
|
-
|
|
68794
|
+
_loop_30(declaration);
|
|
68768
68795
|
}
|
|
68769
68796
|
indexSignatureMap_1.forEach(function (entry) {
|
|
68770
68797
|
if (entry.declarations.length > 1) {
|
|
@@ -71704,7 +71731,7 @@ var ts;
|
|
|
71704
71731
|
var propDeclaration = declaration && declaration.kind === 223 ||
|
|
71705
71732
|
name && name.kind === 164 ? declaration : undefined;
|
|
71706
71733
|
var localPropDeclaration = getParentOfSymbol(prop) === type.symbol ? declaration : undefined;
|
|
71707
|
-
var
|
|
71734
|
+
var _loop_31 = function (info) {
|
|
71708
71735
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
71709
71736
|
var errorNode = localPropDeclaration || localIndexDeclaration ||
|
|
71710
71737
|
(interfaceDeclaration && !ts.some(getBaseTypes(type), function (base) { return !!getPropertyOfObjectType(base, prop.escapedName) && !!getIndexTypeOfType(base, info.keyType); }) ? interfaceDeclaration : undefined);
|
|
@@ -71718,7 +71745,7 @@ var ts;
|
|
|
71718
71745
|
};
|
|
71719
71746
|
for (var _i = 0, indexInfos_9 = indexInfos; _i < indexInfos_9.length; _i++) {
|
|
71720
71747
|
var info = indexInfos_9[_i];
|
|
71721
|
-
|
|
71748
|
+
_loop_31(info);
|
|
71722
71749
|
}
|
|
71723
71750
|
}
|
|
71724
71751
|
function checkIndexConstraintForIndexSignature(type, checkInfo) {
|
|
@@ -71726,7 +71753,7 @@ var ts;
|
|
|
71726
71753
|
var indexInfos = getApplicableIndexInfos(type, checkInfo.keyType);
|
|
71727
71754
|
var interfaceDeclaration = ts.getObjectFlags(type) & 2 ? ts.getDeclarationOfKind(type.symbol, 261) : undefined;
|
|
71728
71755
|
var localCheckDeclaration = declaration && getParentOfSymbol(getSymbolOfNode(declaration)) === type.symbol ? declaration : undefined;
|
|
71729
|
-
var
|
|
71756
|
+
var _loop_32 = function (info) {
|
|
71730
71757
|
if (info === checkInfo)
|
|
71731
71758
|
return "continue";
|
|
71732
71759
|
var localIndexDeclaration = info.declaration && getParentOfSymbol(getSymbolOfNode(info.declaration)) === type.symbol ? info.declaration : undefined;
|
|
@@ -71738,7 +71765,7 @@ var ts;
|
|
|
71738
71765
|
};
|
|
71739
71766
|
for (var _i = 0, indexInfos_10 = indexInfos; _i < indexInfos_10.length; _i++) {
|
|
71740
71767
|
var info = indexInfos_10[_i];
|
|
71741
|
-
|
|
71768
|
+
_loop_32(info);
|
|
71742
71769
|
}
|
|
71743
71770
|
}
|
|
71744
71771
|
function checkTypeNameIsReserved(name, message) {
|
|
@@ -72033,7 +72060,7 @@ var ts;
|
|
|
72033
72060
|
var baseTypes = baseTypeNode && getBaseTypes(type);
|
|
72034
72061
|
var baseWithThis = (baseTypes === null || baseTypes === void 0 ? void 0 : baseTypes.length) ? getTypeWithThisArgument(ts.first(baseTypes), type.thisType) : undefined;
|
|
72035
72062
|
var baseStaticType = getBaseConstructorTypeOfClass(type);
|
|
72036
|
-
var
|
|
72063
|
+
var _loop_33 = function (member) {
|
|
72037
72064
|
if (ts.hasAmbientModifier(member)) {
|
|
72038
72065
|
return "continue";
|
|
72039
72066
|
}
|
|
@@ -72048,7 +72075,7 @@ var ts;
|
|
|
72048
72075
|
};
|
|
72049
72076
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
72050
72077
|
var member = _a[_i];
|
|
72051
|
-
|
|
72078
|
+
_loop_33(member);
|
|
72052
72079
|
}
|
|
72053
72080
|
}
|
|
72054
72081
|
function checkExistingMemberForOverrideModifier(node, staticType, baseStaticType, baseWithThis, type, typeWithThis, member, memberIsParameterProperty, reportErrors) {
|
|
@@ -72123,7 +72150,7 @@ var ts;
|
|
|
72123
72150
|
}
|
|
72124
72151
|
function issueMemberSpecificError(node, typeWithThis, baseWithThis, broadDiag) {
|
|
72125
72152
|
var issuedMemberError = false;
|
|
72126
|
-
var
|
|
72153
|
+
var _loop_34 = function (member) {
|
|
72127
72154
|
if (ts.isStatic(member)) {
|
|
72128
72155
|
return "continue";
|
|
72129
72156
|
}
|
|
@@ -72141,7 +72168,7 @@ var ts;
|
|
|
72141
72168
|
};
|
|
72142
72169
|
for (var _i = 0, _a = node.members; _i < _a.length; _i++) {
|
|
72143
72170
|
var member = _a[_i];
|
|
72144
|
-
|
|
72171
|
+
_loop_34(member);
|
|
72145
72172
|
}
|
|
72146
72173
|
if (!issuedMemberError) {
|
|
72147
72174
|
checkTypeAssignableTo(typeWithThis, baseWithThis, node.name || node, broadDiag);
|
|
@@ -72188,7 +72215,7 @@ var ts;
|
|
|
72188
72215
|
function checkKindsOfPropertyMemberOverrides(type, baseType) {
|
|
72189
72216
|
var _a, _b, _c, _d;
|
|
72190
72217
|
var baseProperties = getPropertiesOfType(baseType);
|
|
72191
|
-
var
|
|
72218
|
+
var _loop_35 = function (baseProperty) {
|
|
72192
72219
|
var base = getTargetSymbol(baseProperty);
|
|
72193
72220
|
if (base.flags & 4194304) {
|
|
72194
72221
|
return "continue";
|
|
@@ -72286,8 +72313,8 @@ var ts;
|
|
|
72286
72313
|
};
|
|
72287
72314
|
basePropertyCheck: for (var _i = 0, baseProperties_1 = baseProperties; _i < baseProperties_1.length; _i++) {
|
|
72288
72315
|
var baseProperty = baseProperties_1[_i];
|
|
72289
|
-
var
|
|
72290
|
-
switch (
|
|
72316
|
+
var state_11 = _loop_35(baseProperty);
|
|
72317
|
+
switch (state_11) {
|
|
72291
72318
|
case "continue-basePropertyCheck": continue basePropertyCheck;
|
|
72292
72319
|
}
|
|
72293
72320
|
}
|
|
@@ -76823,10 +76850,13 @@ var ts;
|
|
|
76823
76850
|
(function (ts) {
|
|
76824
76851
|
var _a;
|
|
76825
76852
|
function visitNode(node, visitor, test, lift) {
|
|
76826
|
-
if (node === undefined) {
|
|
76853
|
+
if (node === undefined || visitor === undefined) {
|
|
76854
|
+
return node;
|
|
76855
|
+
}
|
|
76856
|
+
var visited = visitor(node);
|
|
76857
|
+
if (visited === node) {
|
|
76827
76858
|
return node;
|
|
76828
76859
|
}
|
|
76829
|
-
var visited = visitor ? visitor(node) : node;
|
|
76830
76860
|
var visitedNode;
|
|
76831
76861
|
if (visited === undefined) {
|
|
76832
76862
|
return undefined;
|
|
@@ -76841,9 +76871,8 @@ var ts;
|
|
|
76841
76871
|
return visitedNode;
|
|
76842
76872
|
}
|
|
76843
76873
|
ts.visitNode = visitNode;
|
|
76844
|
-
(function (_) { })(visitNode);
|
|
76845
76874
|
function visitNodes(nodes, visitor, test, start, count) {
|
|
76846
|
-
if (nodes === undefined) {
|
|
76875
|
+
if (nodes === undefined || visitor === undefined) {
|
|
76847
76876
|
return nodes;
|
|
76848
76877
|
}
|
|
76849
76878
|
var length = nodes.length;
|
|
@@ -76873,7 +76902,6 @@ var ts;
|
|
|
76873
76902
|
return nodes;
|
|
76874
76903
|
}
|
|
76875
76904
|
ts.visitNodes = visitNodes;
|
|
76876
|
-
(function (_) { })(visitNodes);
|
|
76877
76905
|
function visitArray(nodes, visitor, test, start, count) {
|
|
76878
76906
|
if (nodes === undefined) {
|
|
76879
76907
|
return nodes;
|
|
@@ -76896,7 +76924,7 @@ var ts;
|
|
|
76896
76924
|
}
|
|
76897
76925
|
for (var i = 0; i < count; i++) {
|
|
76898
76926
|
var node = nodes[i + start];
|
|
76899
|
-
var visited = node !== undefined ?
|
|
76927
|
+
var visited = node !== undefined ? visitor(node) : undefined;
|
|
76900
76928
|
if (updated !== undefined || visited === undefined || visited !== node) {
|
|
76901
76929
|
if (updated === undefined) {
|
|
76902
76930
|
updated = nodes.slice(0, i);
|
|
@@ -76905,18 +76933,18 @@ var ts;
|
|
|
76905
76933
|
if (ts.isArray(visited)) {
|
|
76906
76934
|
for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
|
|
76907
76935
|
var visitedNode = visited_1[_i];
|
|
76936
|
+
void ts.Debug.assertNode(visitedNode, test);
|
|
76908
76937
|
updated.push(visitedNode);
|
|
76909
76938
|
}
|
|
76910
76939
|
}
|
|
76911
76940
|
else {
|
|
76941
|
+
void ts.Debug.assertNode(visited, test);
|
|
76912
76942
|
updated.push(visited);
|
|
76913
76943
|
}
|
|
76914
76944
|
}
|
|
76915
76945
|
}
|
|
76916
76946
|
}
|
|
76917
|
-
|
|
76918
|
-
ts.Debug.assertEachNode(result, test);
|
|
76919
|
-
return result;
|
|
76947
|
+
return updated !== null && updated !== void 0 ? updated : nodes;
|
|
76920
76948
|
}
|
|
76921
76949
|
function visitLexicalEnvironment(statements, visitor, context, start, ensureUseStrict, nodesVisitor) {
|
|
76922
76950
|
if (nodesVisitor === void 0) { nodesVisitor = visitNodes; }
|
|
@@ -76933,7 +76961,7 @@ var ts;
|
|
|
76933
76961
|
context.startLexicalEnvironment();
|
|
76934
76962
|
if (nodes) {
|
|
76935
76963
|
context.setLexicalEnvironmentFlags(1, true);
|
|
76936
|
-
updated = nodesVisitor(nodes, visitor, ts.
|
|
76964
|
+
updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
|
|
76937
76965
|
if (context.getLexicalEnvironmentFlags() & 2 &&
|
|
76938
76966
|
ts.getEmitScriptTarget(context.getCompilerOptions()) >= 2) {
|
|
76939
76967
|
updated = addDefaultValueAssignmentsIfNeeded(updated, context);
|
|
@@ -77002,7 +77030,6 @@ var ts;
|
|
|
77002
77030
|
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
77003
77031
|
context.startBlockScope();
|
|
77004
77032
|
var updated = nodeVisitor(body, visitor, ts.isStatement, context.factory.liftToBlock);
|
|
77005
|
-
ts.Debug.assert(updated);
|
|
77006
77033
|
var declarations = context.endBlockScope();
|
|
77007
77034
|
if (ts.some(declarations)) {
|
|
77008
77035
|
if (ts.isBlock(updated)) {
|
|
@@ -77039,20 +77066,20 @@ var ts;
|
|
|
77039
77066
|
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
77067
|
},
|
|
77041
77068
|
_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),
|
|
77069
|
+
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
77070
|
},
|
|
77044
77071
|
_a[167] = function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77045
77072
|
return context.factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
77046
77073
|
},
|
|
77047
77074
|
_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.
|
|
77075
|
+
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
77076
|
},
|
|
77050
77077
|
_a[169] = function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77051
77078
|
var _a;
|
|
77052
|
-
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike),
|
|
77079
|
+
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
77080
|
},
|
|
77054
77081
|
_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.
|
|
77082
|
+
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
77083
|
},
|
|
77057
77084
|
_a[171] = function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
77058
77085
|
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 +77099,13 @@ var ts;
|
|
|
77072
77099
|
return context.factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
77073
77100
|
},
|
|
77074
77101
|
_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.
|
|
77102
|
+
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77076
77103
|
},
|
|
77077
77104
|
_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.
|
|
77105
|
+
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77079
77106
|
},
|
|
77080
77107
|
_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.
|
|
77108
|
+
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77082
77109
|
},
|
|
77083
77110
|
_a[179] = function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77084
77111
|
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 +77114,10 @@ var ts;
|
|
|
77087
77114
|
return context.factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
77088
77115
|
},
|
|
77089
77116
|
_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.
|
|
77117
|
+
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
77091
77118
|
},
|
|
77092
77119
|
_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.
|
|
77120
|
+
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
77121
|
},
|
|
77095
77122
|
_a[183] = function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77096
77123
|
return context.factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
@@ -77144,7 +77171,7 @@ var ts;
|
|
|
77144
77171
|
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
77172
|
},
|
|
77146
77173
|
_a[198] = function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77147
|
-
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.
|
|
77174
|
+
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
77148
77175
|
},
|
|
77149
77176
|
_a[200] = function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
77150
77177
|
return context.factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
|
|
@@ -78467,7 +78494,6 @@ var ts;
|
|
|
78467
78494
|
};
|
|
78468
78495
|
if (value) {
|
|
78469
78496
|
value = ts.visitNode(value, visitor, ts.isExpression);
|
|
78470
|
-
ts.Debug.assert(value);
|
|
78471
78497
|
if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) ||
|
|
78472
78498
|
bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
78473
78499
|
value = ensureIdentifier(flattenContext, value, false, location);
|
|
@@ -78639,7 +78665,7 @@ var ts;
|
|
|
78639
78665
|
&& !(element.transformFlags & (32768 | 65536))
|
|
78640
78666
|
&& !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 | 65536))
|
|
78641
78667
|
&& !ts.isComputedPropertyName(propertyName)) {
|
|
78642
|
-
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor
|
|
78668
|
+
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor));
|
|
78643
78669
|
}
|
|
78644
78670
|
else {
|
|
78645
78671
|
if (bindingElements) {
|
|
@@ -78772,7 +78798,6 @@ var ts;
|
|
|
78772
78798
|
return factory.createArrayBindingPattern(elements);
|
|
78773
78799
|
}
|
|
78774
78800
|
function makeArrayAssignmentPattern(factory, elements) {
|
|
78775
|
-
ts.Debug.assertEachNode(elements, ts.isArrayBindingOrAssignmentElement);
|
|
78776
78801
|
return factory.createArrayLiteralExpression(ts.map(elements, factory.converters.convertToArrayAssignmentElement));
|
|
78777
78802
|
}
|
|
78778
78803
|
function makeObjectBindingPattern(factory, elements) {
|
|
@@ -78780,7 +78805,6 @@ var ts;
|
|
|
78780
78805
|
return factory.createObjectBindingPattern(elements);
|
|
78781
78806
|
}
|
|
78782
78807
|
function makeObjectAssignmentPattern(factory, elements) {
|
|
78783
|
-
ts.Debug.assertEachNode(elements, ts.isObjectBindingOrAssignmentElement);
|
|
78784
78808
|
return factory.createObjectLiteralExpression(ts.map(elements, factory.converters.convertToObjectAssignmentElement));
|
|
78785
78809
|
}
|
|
78786
78810
|
function makeBindingElement(factory, name) {
|
|
@@ -78799,7 +78823,6 @@ var ts;
|
|
|
78799
78823
|
})(ProcessLevel = ts.ProcessLevel || (ts.ProcessLevel = {}));
|
|
78800
78824
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
78801
78825
|
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
|
|
78802
|
-
ts.Debug.assert(tag);
|
|
78803
78826
|
var templateArguments = [undefined];
|
|
78804
78827
|
var cookedStrings = [];
|
|
78805
78828
|
var rawStrings = [];
|
|
@@ -79167,7 +79190,7 @@ var ts;
|
|
|
79167
79190
|
return factory.updateSourceFile(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, 0, alwaysStrict));
|
|
79168
79191
|
}
|
|
79169
79192
|
function visitObjectLiteralExpression(node) {
|
|
79170
|
-
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.
|
|
79193
|
+
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.isObjectLiteralElement));
|
|
79171
79194
|
}
|
|
79172
79195
|
function getClassFacts(node, staticProperties) {
|
|
79173
79196
|
var facts = 0;
|
|
@@ -79303,7 +79326,6 @@ var ts;
|
|
|
79303
79326
|
for (var _i = 0, parameterDecorators_1 = parameterDecorators; _i < parameterDecorators_1.length; _i++) {
|
|
79304
79327
|
var parameterDecorator = parameterDecorators_1[_i];
|
|
79305
79328
|
var expression = ts.visitNode(parameterDecorator.expression, visitor, ts.isExpression);
|
|
79306
|
-
ts.Debug.assert(expression);
|
|
79307
79329
|
var helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
79308
79330
|
ts.setTextRange(helper, parameterDecorator.expression);
|
|
79309
79331
|
ts.setEmitFlags(helper, 1536);
|
|
@@ -79403,7 +79425,6 @@ var ts;
|
|
|
79403
79425
|
var name = member.name;
|
|
79404
79426
|
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.hasDecorators(member))) {
|
|
79405
79427
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
79406
|
-
ts.Debug.assert(expression);
|
|
79407
79428
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
79408
79429
|
if (!ts.isSimpleInlineableExpression(innerExpression)) {
|
|
79409
79430
|
var generatedName = factory.getGeneratedNameForNode(name);
|
|
@@ -79420,7 +79441,7 @@ var ts;
|
|
|
79420
79441
|
return ts.visitEachChild(node, visitor, context);
|
|
79421
79442
|
}
|
|
79422
79443
|
function visitExpressionWithTypeArguments(node) {
|
|
79423
|
-
return factory.updateExpressionWithTypeArguments(node, ts.
|
|
79444
|
+
return factory.updateExpressionWithTypeArguments(node, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression), undefined);
|
|
79424
79445
|
}
|
|
79425
79446
|
function shouldEmitFunctionLikeDeclaration(node) {
|
|
79426
79447
|
return !ts.nodeIsMissing(node.body);
|
|
@@ -79433,7 +79454,7 @@ var ts;
|
|
|
79433
79454
|
var allDecorators = ts.getAllDecoratorsOfClassElement(node, parent);
|
|
79434
79455
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
79435
79456
|
if (isAmbient) {
|
|
79436
|
-
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.
|
|
79457
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2)), ts.visitNode(node.name, visitor, ts.isPropertyName), undefined, undefined, undefined);
|
|
79437
79458
|
}
|
|
79438
79459
|
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike)), visitPropertyNameOfClassElement(node), undefined, undefined, ts.visitNode(node.initializer, visitor));
|
|
79439
79460
|
}
|
|
@@ -79547,7 +79568,7 @@ var ts;
|
|
|
79547
79568
|
if (ts.parameterIsThisKeyword(node)) {
|
|
79548
79569
|
return undefined;
|
|
79549
79570
|
}
|
|
79550
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.
|
|
79571
|
+
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
79572
|
if (updated !== node) {
|
|
79552
79573
|
ts.setCommentRange(updated, node);
|
|
79553
79574
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -79588,24 +79609,20 @@ var ts;
|
|
|
79588
79609
|
var innerExpression = ts.skipOuterExpressions(node.expression, ~6);
|
|
79589
79610
|
if (ts.isAssertionExpression(innerExpression)) {
|
|
79590
79611
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79591
|
-
ts.Debug.assert(expression);
|
|
79592
79612
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79593
79613
|
}
|
|
79594
79614
|
return ts.visitEachChild(node, visitor, context);
|
|
79595
79615
|
}
|
|
79596
79616
|
function visitAssertionExpression(node) {
|
|
79597
79617
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79598
|
-
ts.Debug.assert(expression);
|
|
79599
79618
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79600
79619
|
}
|
|
79601
79620
|
function visitNonNullExpression(node) {
|
|
79602
79621
|
var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
|
|
79603
|
-
ts.Debug.assert(expression);
|
|
79604
79622
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79605
79623
|
}
|
|
79606
79624
|
function visitSatisfiesExpression(node) {
|
|
79607
79625
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
79608
|
-
ts.Debug.assert(expression);
|
|
79609
79626
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
79610
79627
|
}
|
|
79611
79628
|
function visitCallExpression(node) {
|
|
@@ -79615,7 +79632,7 @@ var ts;
|
|
|
79615
79632
|
return factory.updateNewExpression(node, ts.visitNode(node.expression, visitor, ts.isExpression), undefined, ts.visitNodes(node.arguments, visitor, ts.isExpression));
|
|
79616
79633
|
}
|
|
79617
79634
|
function visitTaggedTemplateExpression(node) {
|
|
79618
|
-
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression), undefined, ts.visitNode(node.template, visitor, ts.
|
|
79635
|
+
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression), undefined, ts.visitNode(node.template, visitor, ts.isExpression));
|
|
79619
79636
|
}
|
|
79620
79637
|
function visitJsxSelfClosingElement(node) {
|
|
79621
79638
|
return factory.updateJsxSelfClosingElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression), undefined, ts.visitNode(node.attributes, visitor, ts.isJsxAttributes));
|
|
@@ -80270,7 +80287,6 @@ var ts;
|
|
|
80270
80287
|
var info = accessPrivateIdentifier(node.left);
|
|
80271
80288
|
if (info) {
|
|
80272
80289
|
var receiver = ts.visitNode(node.right, visitor, ts.isExpression);
|
|
80273
|
-
ts.Debug.assert(receiver);
|
|
80274
80290
|
return ts.setOriginalNode(context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver), node);
|
|
80275
80291
|
}
|
|
80276
80292
|
return ts.visitEachChild(node, visitor, context);
|
|
@@ -80286,7 +80302,6 @@ var ts;
|
|
|
80286
80302
|
}
|
|
80287
80303
|
function visitComputedPropertyName(node) {
|
|
80288
80304
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
80289
|
-
ts.Debug.assert(expression);
|
|
80290
80305
|
if (ts.some(pendingExpressions)) {
|
|
80291
80306
|
if (ts.isParenthesizedExpression(expression)) {
|
|
80292
80307
|
expression = factory.updateParenthesizedExpression(expression, factory.inlineExpressions(__spreadArray(__spreadArray([], pendingExpressions, true), [expression.expression], false)));
|
|
@@ -80354,7 +80369,6 @@ var ts;
|
|
|
80354
80369
|
var temp = factory.createTempVariable(hoistVariableDeclaration);
|
|
80355
80370
|
ts.setSourceMapRange(temp, name.expression);
|
|
80356
80371
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
80357
|
-
ts.Debug.assert(expression);
|
|
80358
80372
|
var assignment = factory.createAssignment(temp, expression);
|
|
80359
80373
|
ts.setSourceMapRange(assignment, name.expression);
|
|
80360
80374
|
getterName = factory.updateComputedPropertyName(name, factory.inlineExpressions([assignment, temp]));
|
|
@@ -80487,7 +80501,6 @@ var ts;
|
|
|
80487
80501
|
var info = void 0;
|
|
80488
80502
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
80489
80503
|
var receiver = ts.visitNode(operand.expression, visitor, ts.isExpression);
|
|
80490
|
-
ts.Debug.assert(receiver);
|
|
80491
80504
|
var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
|
|
80492
80505
|
var expression = createPrivateIdentifierAccess(info, readExpression);
|
|
80493
80506
|
var temp = ts.isPrefixUnaryExpression(node) || valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
@@ -80658,17 +80671,14 @@ var ts;
|
|
|
80658
80671
|
var superPropertyGet = factory.createReflectGetCall(superClassReference, getterName, classConstructor);
|
|
80659
80672
|
ts.setOriginalNode(superPropertyGet, node.left);
|
|
80660
80673
|
ts.setTextRange(superPropertyGet, node.left);
|
|
80661
|
-
ts.Debug.assert(expression);
|
|
80662
80674
|
expression = factory.createBinaryExpression(superPropertyGet, ts.getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), expression);
|
|
80663
80675
|
ts.setTextRange(expression, node);
|
|
80664
80676
|
}
|
|
80665
80677
|
var temp = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
80666
80678
|
if (temp) {
|
|
80667
|
-
ts.Debug.assert(expression);
|
|
80668
80679
|
expression = factory.createAssignment(temp, expression);
|
|
80669
80680
|
ts.setTextRange(temp, node);
|
|
80670
80681
|
}
|
|
80671
|
-
ts.Debug.assert(expression);
|
|
80672
80682
|
expression = factory.createReflectSetCall(superClassReference, setterName, expression, classConstructor);
|
|
80673
80683
|
ts.setOriginalNode(expression, node);
|
|
80674
80684
|
ts.setTextRange(expression, node);
|
|
@@ -81301,7 +81311,6 @@ var ts;
|
|
|
81301
81311
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
81302
81312
|
if (ts.isComputedPropertyName(name)) {
|
|
81303
81313
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
81304
|
-
ts.Debug.assert(expression);
|
|
81305
81314
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
81306
81315
|
var inlinable = ts.isSimpleInlineableExpression(innerExpression);
|
|
81307
81316
|
var alreadyTransformed = ts.isAssignmentExpression(innerExpression) && ts.isGeneratedIdentifier(innerExpression.left);
|
|
@@ -82112,7 +82121,7 @@ var ts;
|
|
|
82112
82121
|
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
82122
|
}
|
|
82114
82123
|
function visitConstructorDeclaration(node) {
|
|
82115
|
-
return factory.updateConstructorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNodes(node.parameters, visitor, ts.
|
|
82124
|
+
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
82125
|
}
|
|
82117
82126
|
function finishClassElement(updated, original) {
|
|
82118
82127
|
if (updated !== original) {
|
|
@@ -82122,22 +82131,22 @@ var ts;
|
|
|
82122
82131
|
return updated;
|
|
82123
82132
|
}
|
|
82124
82133
|
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.
|
|
82134
|
+
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
82135
|
}
|
|
82127
82136
|
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.
|
|
82137
|
+
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
82138
|
}
|
|
82130
82139
|
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.
|
|
82140
|
+
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
82141
|
}
|
|
82133
82142
|
function visitPropertyDeclaration(node) {
|
|
82134
82143
|
if (node.flags & 16777216 || ts.hasSyntacticModifier(node, 2)) {
|
|
82135
82144
|
return undefined;
|
|
82136
82145
|
}
|
|
82137
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.
|
|
82146
|
+
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
82147
|
}
|
|
82139
82148
|
function visitParameterDeclaration(node) {
|
|
82140
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.
|
|
82149
|
+
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
82150
|
if (updated !== node) {
|
|
82142
82151
|
ts.setCommentRange(updated, node);
|
|
82143
82152
|
ts.setTextRange(updated, ts.moveRangePastModifiers(node));
|
|
@@ -82215,7 +82224,7 @@ var ts;
|
|
|
82215
82224
|
return expression;
|
|
82216
82225
|
}
|
|
82217
82226
|
function transformDecorator(decorator) {
|
|
82218
|
-
return ts.
|
|
82227
|
+
return ts.visitNode(decorator.expression, visitor, ts.isExpression);
|
|
82219
82228
|
}
|
|
82220
82229
|
function transformDecoratorsOfParameter(decorators, parameterOffset) {
|
|
82221
82230
|
var expressions;
|
|
@@ -82467,7 +82476,7 @@ var ts;
|
|
|
82467
82476
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
82468
82477
|
}
|
|
82469
82478
|
function visitForOfStatementInAsyncBody(node) {
|
|
82470
|
-
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.
|
|
82479
|
+
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.isToken), isVariableDeclarationListWithCollidingName(node.initializer)
|
|
82471
82480
|
? visitVariableDeclarationListWithCollidingNames(node.initializer, true)
|
|
82472
82481
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
82473
82482
|
}
|
|
@@ -82494,12 +82503,12 @@ var ts;
|
|
|
82494
82503
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82495
82504
|
}
|
|
82496
82505
|
function visitFunctionExpression(node) {
|
|
82497
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
82506
|
+
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
82507
|
? transformAsyncFunctionBody(node)
|
|
82499
82508
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82500
82509
|
}
|
|
82501
82510
|
function visitArrowFunction(node) {
|
|
82502
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
82511
|
+
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
82512
|
? transformAsyncFunctionBody(node)
|
|
82504
82513
|
: ts.visitFunctionBody(node.body, visitor, context));
|
|
82505
82514
|
}
|
|
@@ -82553,7 +82562,7 @@ var ts;
|
|
|
82553
82562
|
}
|
|
82554
82563
|
function transformInitializedVariable(node) {
|
|
82555
82564
|
var converted = ts.setSourceMapRange(factory.createAssignment(factory.converters.convertToAssignmentElementTarget(node.name), node.initializer), node);
|
|
82556
|
-
return ts.
|
|
82565
|
+
return ts.visitNode(converted, visitor, ts.isExpression);
|
|
82557
82566
|
}
|
|
82558
82567
|
function collidesWithParameterName(_a) {
|
|
82559
82568
|
var name = _a.name;
|
|
@@ -83245,7 +83254,7 @@ var ts;
|
|
|
83245
83254
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
83246
83255
|
: node.modifiers, enclosingFunctionFlags & 2
|
|
83247
83256
|
? undefined
|
|
83248
|
-
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(undefined, visitor, ts.
|
|
83257
|
+
: 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
83258
|
? transformAsyncGeneratorFunctionBody(node)
|
|
83250
83259
|
: transformFunctionBody(node));
|
|
83251
83260
|
enclosingFunctionFlags = savedEnclosingFunctionFlags;
|
|
@@ -84041,7 +84050,7 @@ var ts;
|
|
|
84041
84050
|
return ts.singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
84042
84051
|
}
|
|
84043
84052
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
84044
|
-
return ts.
|
|
84053
|
+
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
84045
84054
|
}
|
|
84046
84055
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
84047
84056
|
var name = getAttributeName(node);
|
|
@@ -85178,7 +85187,6 @@ var ts;
|
|
|
85178
85187
|
var sourceMapRange = ts.getSourceMapRange(member);
|
|
85179
85188
|
var memberFunction = transformFunctionLikeToExpression(member, member, undefined, container);
|
|
85180
85189
|
var propertyName = ts.visitNode(member.name, visitor, ts.isPropertyName);
|
|
85181
|
-
ts.Debug.assert(propertyName);
|
|
85182
85190
|
var e;
|
|
85183
85191
|
if (!ts.isPrivateIdentifier(propertyName) && ts.getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
85184
85192
|
var name = ts.isComputedPropertyName(propertyName) ? propertyName.expression
|
|
@@ -85210,7 +85218,6 @@ var ts;
|
|
|
85210
85218
|
ts.setEmitFlags(target, 1536 | 32);
|
|
85211
85219
|
ts.setSourceMapRange(target, firstAccessor.name);
|
|
85212
85220
|
var visitedAccessorName = ts.visitNode(firstAccessor.name, visitor, ts.isPropertyName);
|
|
85213
|
-
ts.Debug.assert(visitedAccessorName);
|
|
85214
85221
|
if (ts.isPrivateIdentifier(visitedAccessorName)) {
|
|
85215
85222
|
return ts.Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
85216
85223
|
}
|
|
@@ -85405,7 +85412,6 @@ var ts;
|
|
|
85405
85412
|
var visited = ts.visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, ts.isExpression);
|
|
85406
85413
|
if (result || visited !== element) {
|
|
85407
85414
|
result || (result = node.elements.slice(0, i));
|
|
85408
|
-
ts.Debug.assert(visited);
|
|
85409
85415
|
result.push(visited);
|
|
85410
85416
|
}
|
|
85411
85417
|
}
|
|
@@ -85458,7 +85464,6 @@ var ts;
|
|
|
85458
85464
|
var declarations = ts.flatMap(node.declarations, node.flags & 1
|
|
85459
85465
|
? visitVariableDeclarationInLetDeclarationList
|
|
85460
85466
|
: visitVariableDeclaration);
|
|
85461
|
-
ts.Debug.assertEachNode(declarations, ts.isVariableDeclaration);
|
|
85462
85467
|
var declarationList = factory.createVariableDeclarationList(declarations);
|
|
85463
85468
|
ts.setOriginalNode(declarationList, node);
|
|
85464
85469
|
ts.setTextRange(declarationList, node);
|
|
@@ -85603,7 +85608,6 @@ var ts;
|
|
|
85603
85608
|
}
|
|
85604
85609
|
else {
|
|
85605
85610
|
var statement = ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock);
|
|
85606
|
-
ts.Debug.assert(statement);
|
|
85607
85611
|
if (ts.isBlock(statement)) {
|
|
85608
85612
|
return factory.updateBlock(statement, ts.setTextRange(factory.createNodeArray(ts.concatenate(statements, statement.statements)), statement.statements));
|
|
85609
85613
|
}
|
|
@@ -85618,7 +85622,6 @@ var ts;
|
|
|
85618
85622
|
}
|
|
85619
85623
|
function convertForOfStatementForArray(node, outermostLabeledStatement, convertedLoopBodyStatements) {
|
|
85620
85624
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
85621
|
-
ts.Debug.assert(expression);
|
|
85622
85625
|
var counter = factory.createLoopVariable();
|
|
85623
85626
|
var rhsReference = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(expression) : factory.createTempVariable(undefined);
|
|
85624
85627
|
ts.setEmitFlags(expression, 48 | ts.getEmitFlags(expression));
|
|
@@ -85632,7 +85635,6 @@ var ts;
|
|
|
85632
85635
|
}
|
|
85633
85636
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
85634
85637
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
85635
|
-
ts.Debug.assert(expression);
|
|
85636
85638
|
var iterator = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(expression) : factory.createTempVariable(undefined);
|
|
85637
85639
|
var result = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(iterator) : factory.createTempVariable(undefined);
|
|
85638
85640
|
var errorRecord = factory.createUniqueName("e");
|
|
@@ -85927,7 +85929,6 @@ var ts;
|
|
|
85927
85929
|
statements.push(factory.createIfStatement(factory.createPrefixUnaryExpression(53, ts.visitNode(node.condition, visitor, ts.isExpression)), ts.visitNode(factory.createBreakStatement(), visitor, ts.isStatement)));
|
|
85928
85930
|
}
|
|
85929
85931
|
}
|
|
85930
|
-
ts.Debug.assert(statement);
|
|
85931
85932
|
if (ts.isBlock(statement)) {
|
|
85932
85933
|
ts.addRange(statements, statement.statements);
|
|
85933
85934
|
}
|
|
@@ -86312,9 +86313,7 @@ var ts;
|
|
|
86312
86313
|
return ts.map(chunk, visitExpressionOfSpread);
|
|
86313
86314
|
}
|
|
86314
86315
|
function visitExpressionOfSpread(node) {
|
|
86315
|
-
ts.Debug.assertNode(node, ts.isSpreadElement);
|
|
86316
86316
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
86317
|
-
ts.Debug.assert(expression);
|
|
86318
86317
|
var isCallToReadHelper = ts.isCallToHelper(expression, "___read");
|
|
86319
86318
|
var kind = isCallToReadHelper || ts.isPackedArrayLiteral(expression) ? 2 : 1;
|
|
86320
86319
|
if (compilerOptions.downlevelIteration && kind === 1 && !ts.isArrayLiteralExpression(expression) && !isCallToReadHelper) {
|
|
@@ -86352,7 +86351,7 @@ var ts;
|
|
|
86352
86351
|
var expression = factory.createStringLiteral(node.head.text);
|
|
86353
86352
|
for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
|
|
86354
86353
|
var span = _a[_i];
|
|
86355
|
-
var args = [ts.
|
|
86354
|
+
var args = [ts.visitNode(span.expression, visitor, ts.isExpression)];
|
|
86356
86355
|
if (span.literal.text.length > 0) {
|
|
86357
86356
|
args.push(factory.createStringLiteral(span.literal.text));
|
|
86358
86357
|
}
|
|
@@ -86867,10 +86866,10 @@ var ts;
|
|
|
86867
86866
|
var target = void 0;
|
|
86868
86867
|
switch (left.kind) {
|
|
86869
86868
|
case 208:
|
|
86870
|
-
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.
|
|
86869
|
+
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
|
|
86871
86870
|
break;
|
|
86872
86871
|
case 209:
|
|
86873
|
-
target = factory.updateElementAccessExpression(left, cacheExpression(ts.
|
|
86872
|
+
target = factory.updateElementAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
|
|
86874
86873
|
break;
|
|
86875
86874
|
default:
|
|
86876
86875
|
target = ts.visitNode(left, visitor, ts.isExpression);
|
|
@@ -87038,14 +87037,14 @@ var ts;
|
|
|
87038
87037
|
}
|
|
87039
87038
|
function visitElementAccessExpression(node) {
|
|
87040
87039
|
if (containsYield(node.argumentExpression)) {
|
|
87041
|
-
return factory.updateElementAccessExpression(node, cacheExpression(ts.
|
|
87040
|
+
return factory.updateElementAccessExpression(node, cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression)), ts.visitNode(node.argumentExpression, visitor, ts.isExpression));
|
|
87042
87041
|
}
|
|
87043
87042
|
return ts.visitEachChild(node, visitor, context);
|
|
87044
87043
|
}
|
|
87045
87044
|
function visitCallExpression(node) {
|
|
87046
87045
|
if (!ts.isImportCall(node) && ts.forEach(node.arguments, containsYield)) {
|
|
87047
87046
|
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.
|
|
87047
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionApplyCall(cacheExpression(ts.visitNode(target, visitor, ts.isLeftHandSideExpression)), thisArg, visitElements(node.arguments)), node), node);
|
|
87049
87048
|
}
|
|
87050
87049
|
return ts.visitEachChild(node, visitor, context);
|
|
87051
87050
|
}
|
|
@@ -88398,7 +88397,7 @@ var ts;
|
|
|
88398
88397
|
}
|
|
88399
88398
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
88400
88399
|
if (currentModuleInfo.exportEquals) {
|
|
88401
|
-
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor
|
|
88400
|
+
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
88402
88401
|
if (expressionResult) {
|
|
88403
88402
|
if (emitAsReturn) {
|
|
88404
88403
|
var statement = factory.createReturnStatement(expressionResult);
|
|
@@ -88579,7 +88578,7 @@ var ts;
|
|
|
88579
88578
|
}
|
|
88580
88579
|
function visitImportCallExpression(node) {
|
|
88581
88580
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
88582
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
88581
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
88583
88582
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
88584
88583
|
var containsLexicalThis = !!(node.transformFlags & 16384);
|
|
88585
88584
|
switch (compilerOptions.module) {
|
|
@@ -88795,7 +88794,7 @@ var ts;
|
|
|
88795
88794
|
function visitFunctionDeclaration(node) {
|
|
88796
88795
|
var statements;
|
|
88797
88796
|
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
|
|
88797
|
+
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
88798
|
}
|
|
88800
88799
|
else {
|
|
88801
88800
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -88812,7 +88811,7 @@ var ts;
|
|
|
88812
88811
|
function visitClassDeclaration(node) {
|
|
88813
88812
|
var statements;
|
|
88814
88813
|
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
|
|
88814
|
+
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
88815
|
}
|
|
88817
88816
|
else {
|
|
88818
88817
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -88844,7 +88843,7 @@ var ts;
|
|
|
88844
88843
|
else if (variable.initializer) {
|
|
88845
88844
|
if (!ts.isBindingPattern(variable.name) && (ts.isArrowFunction(variable.initializer) || ts.isFunctionExpression(variable.initializer) || ts.isClassExpression(variable.initializer))) {
|
|
88846
88845
|
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
|
|
88846
|
+
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor));
|
|
88848
88847
|
variables = ts.append(variables, updatedVariable);
|
|
88849
88848
|
expressions = ts.append(expressions, expression);
|
|
88850
88849
|
removeCommentsOnExpressions = true;
|
|
@@ -89468,7 +89467,7 @@ var ts;
|
|
|
89468
89467
|
}
|
|
89469
89468
|
function visitFunctionDeclaration(node) {
|
|
89470
89469
|
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.
|
|
89470
|
+
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
89471
|
}
|
|
89473
89472
|
else {
|
|
89474
89473
|
hoistedStatements = ts.append(hoistedStatements, ts.visitEachChild(node, visitor, context));
|
|
@@ -89784,7 +89783,7 @@ var ts;
|
|
|
89784
89783
|
return expressions ? factory.inlineExpressions(expressions) : factory.createOmittedExpression();
|
|
89785
89784
|
}
|
|
89786
89785
|
else {
|
|
89787
|
-
return ts.visitNode(node, discardedValueVisitor, ts.
|
|
89786
|
+
return ts.visitNode(node, discardedValueVisitor, ts.isExpression);
|
|
89788
89787
|
}
|
|
89789
89788
|
}
|
|
89790
89789
|
function visitDoStatement(node) {
|
|
@@ -89878,7 +89877,7 @@ var ts;
|
|
|
89878
89877
|
}
|
|
89879
89878
|
function visitImportCallExpression(node) {
|
|
89880
89879
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
89881
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
89880
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
89882
89881
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
89883
89882
|
return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")), undefined, argument ? [argument] : []);
|
|
89884
89883
|
}
|
|
@@ -90899,7 +90898,7 @@ var ts;
|
|
|
90899
90898
|
var _a;
|
|
90900
90899
|
var primaryDeclaration = (_a = parentSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.getSourceFileOfNode(d) === containingFile; });
|
|
90901
90900
|
var augmentingDeclarations = ts.filter(symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== containingFile; });
|
|
90902
|
-
if (augmentingDeclarations) {
|
|
90901
|
+
if (primaryDeclaration && augmentingDeclarations) {
|
|
90903
90902
|
for (var _i = 0, augmentingDeclarations_1 = augmentingDeclarations; _i < augmentingDeclarations_1.length; _i++) {
|
|
90904
90903
|
var augmentations = augmentingDeclarations_1[_i];
|
|
90905
90904
|
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 +90953,12 @@ var ts;
|
|
|
90954
90953
|
if (ts.isExternalOrCommonJsModule(sourceFile) || ts.isJsonSourceFile(sourceFile)) {
|
|
90955
90954
|
resultHasExternalModuleIndicator = false;
|
|
90956
90955
|
needsDeclare = false;
|
|
90957
|
-
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
90956
|
+
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
90958
90957
|
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
90958
|
return newFile;
|
|
90960
90959
|
}
|
|
90961
90960
|
needsDeclare = true;
|
|
90962
|
-
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
90961
|
+
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
90963
90962
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), true, [], [], false, []);
|
|
90964
90963
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
90965
90964
|
if (prepend.kind === 311) {
|
|
@@ -91005,7 +91004,7 @@ var ts;
|
|
|
91005
91004
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
91006
91005
|
}
|
|
91007
91006
|
else {
|
|
91008
|
-
var statements = ts.visitNodes(node.statements, visitDeclarationStatements
|
|
91007
|
+
var statements = ts.visitNodes(node.statements, visitDeclarationStatements);
|
|
91009
91008
|
combinedStatements = ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
91010
91009
|
refs.forEach(referenceVisitor);
|
|
91011
91010
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
@@ -91096,10 +91095,10 @@ var ts;
|
|
|
91096
91095
|
}
|
|
91097
91096
|
else {
|
|
91098
91097
|
if (name.kind === 204) {
|
|
91099
|
-
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
91098
|
+
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
91100
91099
|
}
|
|
91101
91100
|
else {
|
|
91102
|
-
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
91101
|
+
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
91103
91102
|
}
|
|
91104
91103
|
}
|
|
91105
91104
|
function visitBindingElement(elem) {
|
|
@@ -91144,10 +91143,10 @@ var ts;
|
|
|
91144
91143
|
(resolver.isRequiredInitializedParameter(node) ||
|
|
91145
91144
|
resolver.isOptionalUninitializedParameterProperty(node));
|
|
91146
91145
|
if (type && !shouldUseResolverType) {
|
|
91147
|
-
return ts.visitNode(type, visitDeclarationSubtree
|
|
91146
|
+
return ts.visitNode(type, visitDeclarationSubtree);
|
|
91148
91147
|
}
|
|
91149
91148
|
if (!ts.getParseTreeNode(node)) {
|
|
91150
|
-
return type ? ts.visitNode(type, visitDeclarationSubtree
|
|
91149
|
+
return type ? ts.visitNode(type, visitDeclarationSubtree) : factory.createKeywordTypeNode(131);
|
|
91151
91150
|
}
|
|
91152
91151
|
if (node.kind === 175) {
|
|
91153
91152
|
return factory.createKeywordTypeNode(131);
|
|
@@ -91253,7 +91252,7 @@ var ts;
|
|
|
91253
91252
|
return factory.createNodeArray(newParams || ts.emptyArray);
|
|
91254
91253
|
}
|
|
91255
91254
|
function ensureTypeParams(node, params) {
|
|
91256
|
-
return ts.hasEffectiveModifier(node, 8) ? undefined : ts.visitNodes(params, visitDeclarationSubtree
|
|
91255
|
+
return ts.hasEffectiveModifier(node, 8) ? undefined : ts.visitNodes(params, visitDeclarationSubtree);
|
|
91257
91256
|
}
|
|
91258
91257
|
function isEnclosingDeclaration(node) {
|
|
91259
91258
|
return ts.isSourceFile(node)
|
|
@@ -91359,7 +91358,6 @@ var ts;
|
|
|
91359
91358
|
var key = ts.getOriginalNodeId(statement);
|
|
91360
91359
|
if (lateStatementReplacementMap.has(key)) {
|
|
91361
91360
|
var result = lateStatementReplacementMap.get(key);
|
|
91362
|
-
ts.Debug.type(result);
|
|
91363
91361
|
lateStatementReplacementMap.delete(key);
|
|
91364
91362
|
if (result) {
|
|
91365
91363
|
if (ts.isArray(result) ? ts.some(result, ts.needsScopeMarker) : ts.needsScopeMarker(result)) {
|
|
@@ -91491,17 +91489,13 @@ var ts;
|
|
|
91491
91489
|
return cleanup(ts.visitEachChild(input, visitDeclarationSubtree, context));
|
|
91492
91490
|
}
|
|
91493
91491
|
case 191: {
|
|
91494
|
-
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree
|
|
91495
|
-
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree
|
|
91492
|
+
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree);
|
|
91493
|
+
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree);
|
|
91496
91494
|
var oldEnclosingDecl = enclosingDeclaration;
|
|
91497
91495
|
enclosingDeclaration = input.trueType;
|
|
91498
|
-
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree
|
|
91496
|
+
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree);
|
|
91499
91497
|
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);
|
|
91498
|
+
var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree);
|
|
91505
91499
|
return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
91506
91500
|
}
|
|
91507
91501
|
case 181: {
|
|
@@ -91631,7 +91625,7 @@ var ts;
|
|
|
91631
91625
|
return clean;
|
|
91632
91626
|
}
|
|
91633
91627
|
case 261: {
|
|
91634
|
-
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
91628
|
+
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
|
|
91635
91629
|
}
|
|
91636
91630
|
case 259: {
|
|
91637
91631
|
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 +91687,7 @@ var ts;
|
|
|
91693
91687
|
var oldHasScopeFix = resultHasScopeMarker;
|
|
91694
91688
|
resultHasScopeMarker = false;
|
|
91695
91689
|
needsScopeFixMarker = false;
|
|
91696
|
-
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements
|
|
91690
|
+
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements);
|
|
91697
91691
|
var lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
91698
91692
|
if (input.flags & 16777216) {
|
|
91699
91693
|
needsScopeFixMarker = false;
|
|
@@ -91764,7 +91758,7 @@ var ts;
|
|
|
91764
91758
|
var privateIdentifier = hasPrivateIdentifier ? [
|
|
91765
91759
|
factory.createPropertyDeclaration(undefined, factory.createPrivateIdentifier("#private"), undefined, undefined, undefined)
|
|
91766
91760
|
] : undefined;
|
|
91767
|
-
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
91761
|
+
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
91768
91762
|
var members = factory.createNodeArray(memberNodes);
|
|
91769
91763
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
91770
91764
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104) {
|
|
@@ -91781,11 +91775,11 @@ var ts;
|
|
|
91781
91775
|
if (clause.token === 94) {
|
|
91782
91776
|
var oldDiag_2 = getSymbolAccessibilityDiagnostic;
|
|
91783
91777
|
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
|
|
91778
|
+
var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree)); }));
|
|
91785
91779
|
getSymbolAccessibilityDiagnostic = oldDiag_2;
|
|
91786
91780
|
return newClause;
|
|
91787
91781
|
}
|
|
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
|
|
91782
|
+
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
91783
|
}));
|
|
91790
91784
|
return [statement, cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members))];
|
|
91791
91785
|
}
|
|
@@ -91828,7 +91822,7 @@ var ts;
|
|
|
91828
91822
|
function transformVariableStatement(input) {
|
|
91829
91823
|
if (!ts.forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
91830
91824
|
return;
|
|
91831
|
-
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree
|
|
91825
|
+
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree);
|
|
91832
91826
|
if (!ts.length(nodes))
|
|
91833
91827
|
return;
|
|
91834
91828
|
return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -91909,7 +91903,7 @@ var ts;
|
|
|
91909
91903
|
function transformHeritageClauses(nodes) {
|
|
91910
91904
|
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
91905
|
return ts.isEntityNameExpression(t.expression) || (clause.token === 94 && t.expression.kind === 104);
|
|
91912
|
-
})), visitDeclarationSubtree
|
|
91906
|
+
})), visitDeclarationSubtree)); }), function (clause) { return clause.types && !!clause.types.length; }));
|
|
91913
91907
|
}
|
|
91914
91908
|
}
|
|
91915
91909
|
ts.transformDeclarations = transformDeclarations;
|
|
@@ -95301,6 +95295,7 @@ var ts;
|
|
|
95301
95295
|
writeTrailingSemicolon();
|
|
95302
95296
|
}
|
|
95303
95297
|
function emitExportDeclaration(node) {
|
|
95298
|
+
emitModifiers(node, node.modifiers);
|
|
95304
95299
|
var nextPos = emitTokenWithComment(93, node.pos, writeKeyword, node);
|
|
95305
95300
|
writeSpace();
|
|
95306
95301
|
if (node.isTypeOnly) {
|
|
@@ -98184,7 +98179,6 @@ var ts;
|
|
|
98184
98179
|
return resolutions;
|
|
98185
98180
|
}
|
|
98186
98181
|
ts.loadWithTypeDirectiveCache = loadWithTypeDirectiveCache;
|
|
98187
|
-
;
|
|
98188
98182
|
function getModeForFileReference(ref, containingFileMode) {
|
|
98189
98183
|
return (ts.isString(ref) ? containingFileMode : ref.resolutionMode) || containingFileMode;
|
|
98190
98184
|
}
|
|
@@ -102715,15 +102709,12 @@ var ts;
|
|
|
102715
102709
|
var value = filesWithInvalidatedNonRelativeUnresolvedImports.get(path);
|
|
102716
102710
|
return !!value && !!value.length;
|
|
102717
102711
|
}
|
|
102718
|
-
function createHasInvalidatedResolution(
|
|
102712
|
+
function createHasInvalidatedResolution(userProvidedHasInvalidatedResolution) {
|
|
102719
102713
|
invalidateResolutionsOfFailedLookupLocations();
|
|
102720
|
-
if (forceAllFilesAsInvalidated) {
|
|
102721
|
-
filesWithInvalidatedResolutions = undefined;
|
|
102722
|
-
return ts.returnTrue;
|
|
102723
|
-
}
|
|
102724
102714
|
var collected = filesWithInvalidatedResolutions;
|
|
102725
102715
|
filesWithInvalidatedResolutions = undefined;
|
|
102726
|
-
return function (path) { return (
|
|
102716
|
+
return function (path) { return (userProvidedHasInvalidatedResolution === null || userProvidedHasInvalidatedResolution === void 0 ? void 0 : userProvidedHasInvalidatedResolution(path)) ||
|
|
102717
|
+
!!(collected === null || collected === void 0 ? void 0 : collected.has(path)) ||
|
|
102727
102718
|
isFileWithInvalidatedNonRelativeUnresolvedImports(path); };
|
|
102728
102719
|
}
|
|
102729
102720
|
function startCachingPerDirectoryResolution() {
|
|
@@ -103687,7 +103678,7 @@ var ts;
|
|
|
103687
103678
|
importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules;
|
|
103688
103679
|
});
|
|
103689
103680
|
var sortedPaths = [];
|
|
103690
|
-
var
|
|
103681
|
+
var _loop_36 = function (directory) {
|
|
103691
103682
|
var directoryStart = ts.ensureTrailingDirectorySeparator(directory);
|
|
103692
103683
|
var pathsInDirectory;
|
|
103693
103684
|
allFileNames.forEach(function (_a, fileName) {
|
|
@@ -103711,9 +103702,9 @@ var ts;
|
|
|
103711
103702
|
};
|
|
103712
103703
|
var out_directory_1;
|
|
103713
103704
|
for (var directory = ts.getDirectoryPath(importingFileName); allFileNames.size !== 0;) {
|
|
103714
|
-
var
|
|
103705
|
+
var state_12 = _loop_36(directory);
|
|
103715
103706
|
directory = out_directory_1;
|
|
103716
|
-
if (
|
|
103707
|
+
if (state_12 === "break")
|
|
103717
103708
|
break;
|
|
103718
103709
|
}
|
|
103719
103710
|
if (allFileNames.size) {
|
|
@@ -103772,7 +103763,7 @@ var ts;
|
|
|
103772
103763
|
}
|
|
103773
103764
|
function tryGetModuleNameFromPaths(relativeToBaseUrl, paths, allowedEndings, host, compilerOptions) {
|
|
103774
103765
|
for (var key in paths) {
|
|
103775
|
-
var
|
|
103766
|
+
var _loop_37 = function (patternText_1) {
|
|
103776
103767
|
var pattern = ts.normalizePath(patternText_1);
|
|
103777
103768
|
var indexOfStar = pattern.indexOf("*");
|
|
103778
103769
|
var candidates = allowedEndings.map(function (ending) { return ({
|
|
@@ -103803,9 +103794,9 @@ var ts;
|
|
|
103803
103794
|
};
|
|
103804
103795
|
for (var _i = 0, _a = paths[key]; _i < _a.length; _i++) {
|
|
103805
103796
|
var patternText_1 = _a[_i];
|
|
103806
|
-
var
|
|
103807
|
-
if (typeof
|
|
103808
|
-
return
|
|
103797
|
+
var state_13 = _loop_37(patternText_1);
|
|
103798
|
+
if (typeof state_13 === "object")
|
|
103799
|
+
return state_13.value;
|
|
103809
103800
|
}
|
|
103810
103801
|
}
|
|
103811
103802
|
function validateEnding(_a) {
|
|
@@ -104158,9 +104149,6 @@ var ts;
|
|
|
104158
104149
|
return "".concat(errorDiagnostic.file.fileName);
|
|
104159
104150
|
});
|
|
104160
104151
|
return filesInError.map(function (fileName) {
|
|
104161
|
-
if (fileName === undefined) {
|
|
104162
|
-
return undefined;
|
|
104163
|
-
}
|
|
104164
104152
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
104165
104153
|
return diagnostic.file !== undefined && diagnostic.file.fileName === fileName;
|
|
104166
104154
|
});
|
|
@@ -104755,8 +104743,6 @@ var ts;
|
|
|
104755
104743
|
parseConfigFile();
|
|
104756
104744
|
newLine = updateNewLine();
|
|
104757
104745
|
}
|
|
104758
|
-
ts.Debug.assert(compilerOptions);
|
|
104759
|
-
ts.Debug.assert(rootFileNames);
|
|
104760
104746
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
104761
104747
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
104762
104748
|
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
@@ -104818,6 +104804,7 @@ var ts;
|
|
|
104818
104804
|
ts.maybeBind(host, host.getModuleResolutionCache) :
|
|
104819
104805
|
(function () { return resolutionCache.getModuleResolutionCache(); });
|
|
104820
104806
|
var userProvidedResolution = !!host.resolveModuleNames || !!host.resolveTypeReferenceDirectives;
|
|
104807
|
+
var userProvidedHasInvalidatedResolution = ts.maybeBind(host, host.hasInvalidatedResolution) || ts.returnTrue;
|
|
104821
104808
|
builderProgram = readBuilderProgram(compilerOptions, compilerHost);
|
|
104822
104809
|
synchronizeProgram();
|
|
104823
104810
|
watchConfigFileWildCardDirectories();
|
|
@@ -104873,8 +104860,6 @@ var ts;
|
|
|
104873
104860
|
}
|
|
104874
104861
|
function synchronizeProgram() {
|
|
104875
104862
|
writeLog("Synchronizing program");
|
|
104876
|
-
ts.Debug.assert(compilerOptions);
|
|
104877
|
-
ts.Debug.assert(rootFileNames);
|
|
104878
104863
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
104879
104864
|
var program = getCurrentBuilderProgram();
|
|
104880
104865
|
if (hasChangedCompilerOptions) {
|
|
@@ -104883,7 +104868,7 @@ var ts;
|
|
|
104883
104868
|
resolutionCache.clear();
|
|
104884
104869
|
}
|
|
104885
104870
|
}
|
|
104886
|
-
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution);
|
|
104871
|
+
var hasInvalidatedResolution = resolutionCache.createHasInvalidatedResolution(userProvidedResolution ? userProvidedHasInvalidatedResolution : undefined);
|
|
104887
104872
|
var _a = ts.changeCompilerHostLikeToUseCache(compilerHost, toPath), originalReadFile = _a.originalReadFile, originalFileExists = _a.originalFileExists, originalDirectoryExists = _a.originalDirectoryExists, originalCreateDirectory = _a.originalCreateDirectory, originalWriteFile = _a.originalWriteFile;
|
|
104888
104873
|
if (ts.isProgramUptoDate(getCurrentProgram(), rootFileNames, compilerOptions, getSourceVersion, function (fileName) { return compilerHost.fileExists(fileName); }, hasInvalidatedResolution, hasChangedAutomaticTypeDirectiveNames, getParsedCommandLine, projectReferences)) {
|
|
104889
104874
|
if (hasChangedConfigFileParsingErrors) {
|
|
@@ -105100,8 +105085,6 @@ var ts;
|
|
|
105100
105085
|
}
|
|
105101
105086
|
function reloadFileNamesFromConfigFile() {
|
|
105102
105087
|
writeLog("Reloading new file names and options");
|
|
105103
|
-
ts.Debug.assert(compilerOptions);
|
|
105104
|
-
ts.Debug.assert(configFileName);
|
|
105105
105088
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
105106
105089
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
105107
105090
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -105110,7 +105093,6 @@ var ts;
|
|
|
105110
105093
|
synchronizeProgram();
|
|
105111
105094
|
}
|
|
105112
105095
|
function reloadConfigFile() {
|
|
105113
|
-
ts.Debug.assert(configFileName);
|
|
105114
105096
|
writeLog("Reloading config file: ".concat(configFileName));
|
|
105115
105097
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
105116
105098
|
if (cachedDirectoryStructureHost) {
|
|
@@ -105123,7 +105105,6 @@ var ts;
|
|
|
105123
105105
|
updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, ts.WatchType.ExtendedConfigFile);
|
|
105124
105106
|
}
|
|
105125
105107
|
function parseConfigFile() {
|
|
105126
|
-
ts.Debug.assert(configFileName);
|
|
105127
105108
|
setConfigFileParsingResult(ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtendForConfigFile, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend, extraFileExtensions));
|
|
105128
105109
|
}
|
|
105129
105110
|
function setConfigFileParsingResult(configFileParseResult) {
|
|
@@ -105144,7 +105125,6 @@ var ts;
|
|
|
105144
105125
|
return config.parsedCommandLine;
|
|
105145
105126
|
if (config.parsedCommandLine && config.reloadLevel === ts.ConfigFileProgramReloadLevel.Partial && !host.getParsedCommandLine) {
|
|
105146
105127
|
writeLog("Reloading new file names and options");
|
|
105147
|
-
ts.Debug.assert(compilerOptions);
|
|
105148
105128
|
var fileNames = ts.getFileNamesFromConfigSpecs(config.parsedCommandLine.options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
|
|
105149
105129
|
config.parsedCommandLine = __assign(__assign({}, config.parsedCommandLine), { fileNames: fileNames });
|
|
105150
105130
|
config.reloadLevel = undefined;
|
|
@@ -105224,8 +105204,7 @@ var ts;
|
|
|
105224
105204
|
}
|
|
105225
105205
|
function watchWildcardDirectory(directory, flags) {
|
|
105226
105206
|
return watchDirectory(directory, function (fileOrDirectory) {
|
|
105227
|
-
ts.Debug.assert(configFileName);
|
|
105228
|
-
ts.Debug.assert(compilerOptions);
|
|
105207
|
+
ts.Debug.assert(!!configFileName);
|
|
105229
105208
|
var fileOrDirectoryPath = toPath(fileOrDirectory);
|
|
105230
105209
|
if (cachedDirectoryStructureHost) {
|
|
105231
105210
|
cachedDirectoryStructureHost.addOrDeleteFileOrDirectory(fileOrDirectory, fileOrDirectoryPath);
|
|
@@ -105252,7 +105231,6 @@ var ts;
|
|
|
105252
105231
|
}, flags, watchOptions, ts.WatchType.WildcardDirectory);
|
|
105253
105232
|
}
|
|
105254
105233
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions, watchType) {
|
|
105255
|
-
ts.Debug.assert(configFileName);
|
|
105256
105234
|
ts.updateSharedExtendedConfigFileWatcher(forProjectPath, options, sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = new ts.Map()), function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(extendedConfigFileName, function (_fileName, eventKind) {
|
|
105257
105235
|
var _a;
|
|
105258
105236
|
updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);
|
|
@@ -107413,7 +107391,6 @@ var ts;
|
|
|
107413
107391
|
var colors = createColors(sys);
|
|
107414
107392
|
var header = [];
|
|
107415
107393
|
var terminalWidth = (_b = (_a = sys.getWidthOfTerminal) === null || _a === void 0 ? void 0 : _a.call(sys)) !== null && _b !== void 0 ? _b : 0;
|
|
107416
|
-
;
|
|
107417
107394
|
var tsIconLength = 5;
|
|
107418
107395
|
var tsIconFirstLine = colors.blueBackground(ts.padLeft("", tsIconLength));
|
|
107419
107396
|
var tsIconSecondLine = colors.blueBackground(colors.brightWhite(ts.padLeft("TS ", tsIconLength)));
|