@typescript-deploys/pr-build 4.9.0-pr-49929-7 → 4.9.0-pr-50856-4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/tsc.js +161 -244
- package/lib/tsserver.js +286 -425
- package/lib/tsserverlibrary.d.ts +47 -50
- package/lib/tsserverlibrary.js +286 -425
- package/lib/typescript.d.ts +46 -49
- package/lib/typescript.js +285 -423
- package/lib/typescriptServices.d.ts +46 -49
- package/lib/typescriptServices.js +285 -423
- package/lib/typingsInstaller.js +184 -302
- package/package.json +1 -1
package/lib/tsserver.js
CHANGED
|
@@ -109,7 +109,7 @@ var ts;
|
|
|
109
109
|
// The following is baselined as a literal template type without intervention
|
|
110
110
|
/** The version of the TypeScript compiler release */
|
|
111
111
|
// eslint-disable-next-line @typescript-eslint/no-inferrable-types
|
|
112
|
-
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.
|
|
112
|
+
ts.version = "".concat(ts.versionMajorMinor, ".0-insiders.20220920");
|
|
113
113
|
/* @internal */
|
|
114
114
|
var Comparison;
|
|
115
115
|
(function (Comparison) {
|
|
@@ -298,6 +298,11 @@ var ts;
|
|
|
298
298
|
return result;
|
|
299
299
|
}
|
|
300
300
|
ts.intersperse = intersperse;
|
|
301
|
+
/**
|
|
302
|
+
* Iterates through `array` by index and performs the callback on each element of array until the callback
|
|
303
|
+
* returns a falsey value, then returns false.
|
|
304
|
+
* If no such value is found, the callback is applied to each element of array and `true` is returned.
|
|
305
|
+
*/
|
|
301
306
|
function every(array, callback) {
|
|
302
307
|
if (array) {
|
|
303
308
|
for (var i = 0; i < array.length; i++) {
|
|
@@ -309,10 +314,6 @@ var ts;
|
|
|
309
314
|
return true;
|
|
310
315
|
}
|
|
311
316
|
ts.every = every;
|
|
312
|
-
function isArrayOf(array, callback) {
|
|
313
|
-
return every(array, callback);
|
|
314
|
-
}
|
|
315
|
-
ts.isArrayOf = isArrayOf;
|
|
316
317
|
function find(array, predicate, startIndex) {
|
|
317
318
|
if (array === undefined)
|
|
318
319
|
return undefined;
|
|
@@ -989,7 +990,6 @@ var ts;
|
|
|
989
990
|
}
|
|
990
991
|
ts.sum = sum;
|
|
991
992
|
function append(to, value) {
|
|
992
|
-
// If to is Push<T>, return value is void, so safe to cast to T[].
|
|
993
993
|
if (value === undefined)
|
|
994
994
|
return to;
|
|
995
995
|
if (to === undefined)
|
|
@@ -2693,7 +2693,7 @@ var ts;
|
|
|
2693
2693
|
if (typeof func !== "function") {
|
|
2694
2694
|
return "";
|
|
2695
2695
|
}
|
|
2696
|
-
else if (
|
|
2696
|
+
else if (ts.hasProperty(func, "name")) {
|
|
2697
2697
|
return func.name;
|
|
2698
2698
|
}
|
|
2699
2699
|
else {
|
|
@@ -3018,7 +3018,7 @@ var ts;
|
|
|
3018
3018
|
];
|
|
3019
3019
|
for (var _i = 0, nodeConstructors_1 = nodeConstructors; _i < nodeConstructors_1.length; _i++) {
|
|
3020
3020
|
var ctor = nodeConstructors_1[_i];
|
|
3021
|
-
if (!
|
|
3021
|
+
if (!ts.hasProperty(ctor, "__debugKind")) {
|
|
3022
3022
|
Object.defineProperties(ctor.prototype, {
|
|
3023
3023
|
// for use with vscode-js-debug's new customDescriptionGenerator in launch.json
|
|
3024
3024
|
__tsDebuggerDisplay: {
|
|
@@ -3873,7 +3873,6 @@ var ts;
|
|
|
3873
3873
|
var typeCatalog = []; // NB: id is index + 1
|
|
3874
3874
|
var legendPath;
|
|
3875
3875
|
var legend = [];
|
|
3876
|
-
;
|
|
3877
3876
|
/** Starts tracing for the given project. */
|
|
3878
3877
|
function startTracing(tracingMode, traceDir, configFilePath) {
|
|
3879
3878
|
ts.Debug.assert(!ts.tracing, "Tracing already started");
|
|
@@ -8705,8 +8704,6 @@ var ts;
|
|
|
8705
8704
|
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."),
|
|
8706
8705
|
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."),
|
|
8707
8706
|
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."),
|
|
8708
|
-
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'."),
|
|
8709
|
-
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."),
|
|
8710
8707
|
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."),
|
|
8711
8708
|
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."),
|
|
8712
8709
|
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."),
|
|
@@ -8955,6 +8952,7 @@ var ts;
|
|
|
8955
8952
|
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."),
|
|
8956
8953
|
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."),
|
|
8957
8954
|
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."),
|
|
8955
|
+
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."),
|
|
8958
8956
|
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."),
|
|
8959
8957
|
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."),
|
|
8960
8958
|
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."),
|
|
@@ -10338,7 +10336,7 @@ var ts;
|
|
|
10338
10336
|
ts.stringToToken = stringToToken;
|
|
10339
10337
|
/* @internal */
|
|
10340
10338
|
function computeLineStarts(text) {
|
|
10341
|
-
var result =
|
|
10339
|
+
var result = [];
|
|
10342
10340
|
var pos = 0;
|
|
10343
10341
|
var lineStart = 0;
|
|
10344
10342
|
while (pos < text.length) {
|
|
@@ -10815,7 +10813,9 @@ var ts;
|
|
|
10815
10813
|
}
|
|
10816
10814
|
ts.reduceEachTrailingCommentRange = reduceEachTrailingCommentRange;
|
|
10817
10815
|
function appendCommentRange(pos, end, kind, hasTrailingNewLine, _state, comments) {
|
|
10818
|
-
if (comments
|
|
10816
|
+
if (!comments) {
|
|
10817
|
+
comments = [];
|
|
10818
|
+
}
|
|
10819
10819
|
comments.push({ kind: kind, pos: pos, end: end, hasTrailingNewLine: hasTrailingNewLine });
|
|
10820
10820
|
return comments;
|
|
10821
10821
|
}
|
|
@@ -11897,12 +11897,36 @@ var ts;
|
|
|
11897
11897
|
pos++;
|
|
11898
11898
|
return token = 0 /* SyntaxKind.Unknown */;
|
|
11899
11899
|
}
|
|
11900
|
-
|
|
11900
|
+
var charAfterHash = codePointAt(text, pos + 1);
|
|
11901
|
+
if (charAfterHash === 92 /* CharacterCodes.backslash */) {
|
|
11902
|
+
pos++;
|
|
11903
|
+
var extendedCookedChar_1 = peekExtendedUnicodeEscape();
|
|
11904
|
+
if (extendedCookedChar_1 >= 0 && isIdentifierStart(extendedCookedChar_1, languageVersion)) {
|
|
11905
|
+
pos += 3;
|
|
11906
|
+
tokenFlags |= 8 /* TokenFlags.ExtendedUnicodeEscape */;
|
|
11907
|
+
tokenValue = "#" + scanExtendedUnicodeEscape() + scanIdentifierParts();
|
|
11908
|
+
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
11909
|
+
}
|
|
11910
|
+
var cookedChar_1 = peekUnicodeEscape();
|
|
11911
|
+
if (cookedChar_1 >= 0 && isIdentifierStart(cookedChar_1, languageVersion)) {
|
|
11912
|
+
pos += 6;
|
|
11913
|
+
tokenFlags |= 1024 /* TokenFlags.UnicodeEscape */;
|
|
11914
|
+
tokenValue = "#" + String.fromCharCode(cookedChar_1) + scanIdentifierParts();
|
|
11915
|
+
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
11916
|
+
}
|
|
11917
|
+
pos--;
|
|
11918
|
+
}
|
|
11919
|
+
if (isIdentifierStart(charAfterHash, languageVersion)) {
|
|
11901
11920
|
pos++;
|
|
11902
|
-
scanIdentifier
|
|
11921
|
+
// We're relying on scanIdentifier's behavior and adjusting the token kind after the fact.
|
|
11922
|
+
// Notably absent from this block is the fact that calling a function named "scanIdentifier",
|
|
11923
|
+
// but identifiers don't include '#', and that function doesn't deal with it at all.
|
|
11924
|
+
// This works because 'scanIdentifier' tries to reuse source characters and builds up substrings;
|
|
11925
|
+
// however, it starts at the 'tokenPos' which includes the '#', and will "accidentally" prepend the '#' for us.
|
|
11926
|
+
scanIdentifier(charAfterHash, languageVersion);
|
|
11903
11927
|
}
|
|
11904
11928
|
else {
|
|
11905
|
-
tokenValue =
|
|
11929
|
+
tokenValue = "#";
|
|
11906
11930
|
error(ts.Diagnostics.Invalid_character, pos++, charSize(ch));
|
|
11907
11931
|
}
|
|
11908
11932
|
return token = 80 /* SyntaxKind.PrivateIdentifier */;
|
|
@@ -12673,8 +12697,6 @@ var ts;
|
|
|
12673
12697
|
return false;
|
|
12674
12698
|
}
|
|
12675
12699
|
ts.isEmptyBindingPattern = isEmptyBindingPattern;
|
|
12676
|
-
// TODO(jakebailey): It is very weird that we have BindingElement and ArrayBindingElement;
|
|
12677
|
-
// we should have ObjectBindingElement and ArrayBindingElement, which are both BindingElement.
|
|
12678
12700
|
function isEmptyBindingElement(node) {
|
|
12679
12701
|
if (ts.isOmittedExpression(node)) {
|
|
12680
12702
|
return true;
|
|
@@ -12793,10 +12815,7 @@ var ts;
|
|
|
12793
12815
|
node = node.original;
|
|
12794
12816
|
}
|
|
12795
12817
|
}
|
|
12796
|
-
|
|
12797
|
-
return node;
|
|
12798
|
-
}
|
|
12799
|
-
return nodeTest(node) ? node : undefined;
|
|
12818
|
+
return !nodeTest || nodeTest(node) ? node : undefined;
|
|
12800
12819
|
}
|
|
12801
12820
|
ts.getOriginalNode = getOriginalNode;
|
|
12802
12821
|
function findAncestor(node, callback) {
|
|
@@ -13474,7 +13493,7 @@ var ts;
|
|
|
13474
13493
|
// Node Arrays
|
|
13475
13494
|
/* @internal */
|
|
13476
13495
|
function isNodeArray(array) {
|
|
13477
|
-
return
|
|
13496
|
+
return ts.hasProperty(array, "pos") && ts.hasProperty(array, "end");
|
|
13478
13497
|
}
|
|
13479
13498
|
ts.isNodeArray = isNodeArray;
|
|
13480
13499
|
// Literals
|
|
@@ -13822,13 +13841,6 @@ var ts;
|
|
|
13822
13841
|
return false;
|
|
13823
13842
|
}
|
|
13824
13843
|
ts.isDeclarationBindingElement = isDeclarationBindingElement;
|
|
13825
|
-
function isBindingOrAssignmentElement(node) {
|
|
13826
|
-
return ts.isVariableDeclaration(node)
|
|
13827
|
-
|| ts.isParameter(node)
|
|
13828
|
-
|| isObjectBindingOrAssignmentElement(node)
|
|
13829
|
-
|| isArrayBindingOrAssignmentElement(node);
|
|
13830
|
-
}
|
|
13831
|
-
ts.isBindingOrAssignmentElement = isBindingOrAssignmentElement;
|
|
13832
13844
|
/**
|
|
13833
13845
|
* Determines whether a node is a BindingOrAssignmentPattern
|
|
13834
13846
|
*/
|
|
@@ -13877,22 +13889,6 @@ var ts;
|
|
|
13877
13889
|
}
|
|
13878
13890
|
ts.isArrayBindingOrAssignmentPattern = isArrayBindingOrAssignmentPattern;
|
|
13879
13891
|
/* @internal */
|
|
13880
|
-
function isArrayBindingOrAssignmentElement(node) {
|
|
13881
|
-
switch (node.kind) {
|
|
13882
|
-
case 205 /* SyntaxKind.BindingElement */:
|
|
13883
|
-
case 229 /* SyntaxKind.OmittedExpression */: // Elision
|
|
13884
|
-
case 227 /* SyntaxKind.SpreadElement */: // AssignmentRestElement
|
|
13885
|
-
case 206 /* SyntaxKind.ArrayLiteralExpression */: // ArrayAssignmentPattern
|
|
13886
|
-
case 207 /* SyntaxKind.ObjectLiteralExpression */: // ObjectAssignmentPattern
|
|
13887
|
-
case 79 /* SyntaxKind.Identifier */: // DestructuringAssignmentTarget
|
|
13888
|
-
case 208 /* SyntaxKind.PropertyAccessExpression */: // DestructuringAssignmentTarget
|
|
13889
|
-
case 209 /* SyntaxKind.ElementAccessExpression */: // DestructuringAssignmentTarget
|
|
13890
|
-
return true;
|
|
13891
|
-
}
|
|
13892
|
-
return ts.isAssignmentExpression(node, /*excludeCompoundAssignment*/ true); // AssignmentElement
|
|
13893
|
-
}
|
|
13894
|
-
ts.isArrayBindingOrAssignmentElement = isArrayBindingOrAssignmentElement;
|
|
13895
|
-
/* @internal */
|
|
13896
13892
|
function isPropertyAccessOrQualifiedNameOrImportTypeNode(node) {
|
|
13897
13893
|
var kind = node.kind;
|
|
13898
13894
|
return kind === 208 /* SyntaxKind.PropertyAccessExpression */
|
|
@@ -14005,23 +14001,6 @@ var ts;
|
|
|
14005
14001
|
}
|
|
14006
14002
|
}
|
|
14007
14003
|
ts.isUnaryExpressionWithWrite = isUnaryExpressionWithWrite;
|
|
14008
|
-
/**
|
|
14009
|
-
* See isExpression; not for use in transforms.
|
|
14010
|
-
* @internal
|
|
14011
|
-
*/
|
|
14012
|
-
function isLiteralTypeLiteral(node) {
|
|
14013
|
-
node = skipPartiallyEmittedExpressions(node);
|
|
14014
|
-
switch (skipPartiallyEmittedExpressions(node).kind) {
|
|
14015
|
-
case 104 /* SyntaxKind.NullKeyword */:
|
|
14016
|
-
case 110 /* SyntaxKind.TrueKeyword */:
|
|
14017
|
-
case 95 /* SyntaxKind.FalseKeyword */:
|
|
14018
|
-
case 221 /* SyntaxKind.PrefixUnaryExpression */:
|
|
14019
|
-
return true;
|
|
14020
|
-
default:
|
|
14021
|
-
return isLiteralExpression(node);
|
|
14022
|
-
}
|
|
14023
|
-
}
|
|
14024
|
-
ts.isLiteralTypeLiteral = isLiteralTypeLiteral;
|
|
14025
14004
|
/* @internal */
|
|
14026
14005
|
/**
|
|
14027
14006
|
* Determines whether a node is an expression based only on its kind.
|
|
@@ -14986,7 +14965,6 @@ var ts;
|
|
|
14986
14965
|
return emitNode && emitNode.flags || 0;
|
|
14987
14966
|
}
|
|
14988
14967
|
ts.getEmitFlags = getEmitFlags;
|
|
14989
|
-
;
|
|
14990
14968
|
function getScriptTargetFeatures() {
|
|
14991
14969
|
return {
|
|
14992
14970
|
es2015: {
|
|
@@ -15301,7 +15279,6 @@ var ts;
|
|
|
15301
15279
|
}
|
|
15302
15280
|
ts.isBlockScope = isBlockScope;
|
|
15303
15281
|
function isDeclarationWithTypeParameters(node) {
|
|
15304
|
-
ts.Debug.type(node);
|
|
15305
15282
|
switch (node.kind) {
|
|
15306
15283
|
case 341 /* SyntaxKind.JSDocCallbackTag */:
|
|
15307
15284
|
case 348 /* SyntaxKind.JSDocTypedefTag */:
|
|
@@ -15314,7 +15291,6 @@ var ts;
|
|
|
15314
15291
|
}
|
|
15315
15292
|
ts.isDeclarationWithTypeParameters = isDeclarationWithTypeParameters;
|
|
15316
15293
|
function isDeclarationWithTypeParameterChildren(node) {
|
|
15317
|
-
ts.Debug.type(node);
|
|
15318
15294
|
switch (node.kind) {
|
|
15319
15295
|
case 176 /* SyntaxKind.CallSignature */:
|
|
15320
15296
|
case 177 /* SyntaxKind.ConstructSignature */:
|
|
@@ -17773,10 +17749,6 @@ var ts;
|
|
|
17773
17749
|
return node.escapedText === "push" || node.escapedText === "unshift";
|
|
17774
17750
|
}
|
|
17775
17751
|
ts.isPushOrUnshiftIdentifier = isPushOrUnshiftIdentifier;
|
|
17776
|
-
// TODO(jakebailey): this function should not be named this. While it does technically
|
|
17777
|
-
// return true if the argument is a ParameterDeclaration, it also returns true for nodes
|
|
17778
|
-
// that are children of ParameterDeclarations inside binding elements.
|
|
17779
|
-
// Probably, this should be called `rootDeclarationIsParameter`.
|
|
17780
17752
|
function isParameterDeclaration(node) {
|
|
17781
17753
|
var root = getRootDeclaration(node);
|
|
17782
17754
|
return root.kind === 166 /* SyntaxKind.Parameter */;
|
|
@@ -19718,7 +19690,7 @@ var ts;
|
|
|
19718
19690
|
}
|
|
19719
19691
|
function isWatchSet(options) {
|
|
19720
19692
|
// Firefox has Object.prototype.watch
|
|
19721
|
-
return options.watch &&
|
|
19693
|
+
return options.watch && ts.hasProperty(options, "watch");
|
|
19722
19694
|
}
|
|
19723
19695
|
ts.isWatchSet = isWatchSet;
|
|
19724
19696
|
function closeFileWatcher(watcher) {
|
|
@@ -19966,7 +19938,6 @@ var ts;
|
|
|
19966
19938
|
|| kind === 114 /* SyntaxKind.VoidKeyword */
|
|
19967
19939
|
|| kind === 155 /* SyntaxKind.UndefinedKeyword */
|
|
19968
19940
|
|| kind === 144 /* SyntaxKind.NeverKeyword */
|
|
19969
|
-
|| kind === 139 /* SyntaxKind.IntrinsicKeyword */
|
|
19970
19941
|
|| kind === 230 /* SyntaxKind.ExpressionWithTypeArguments */
|
|
19971
19942
|
|| kind === 315 /* SyntaxKind.JSDocAllType */
|
|
19972
19943
|
|| kind === 316 /* SyntaxKind.JSDocUnknownType */
|
|
@@ -22278,11 +22249,6 @@ var ts;
|
|
|
22278
22249
|
}
|
|
22279
22250
|
}
|
|
22280
22251
|
ts.createParenthesizerRules = createParenthesizerRules;
|
|
22281
|
-
function castToNodeArray(nodes) {
|
|
22282
|
-
// TODO(jakebailey): Why do we need this helper? GH#49924?
|
|
22283
|
-
// Also, why can't I write `isNodeArray<T>` as an expression?
|
|
22284
|
-
return ts.cast(nodes, ts.isNodeArray);
|
|
22285
|
-
}
|
|
22286
22252
|
ts.nullParenthesizerRules = {
|
|
22287
22253
|
getParenthesizeLeftSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
22288
22254
|
getParenthesizeRightSideOfBinaryForOperator: function (_) { return ts.identity; },
|
|
@@ -22296,23 +22262,23 @@ var ts;
|
|
|
22296
22262
|
parenthesizeLeftSideOfAccess: function (expression) { return ts.cast(expression, ts.isLeftHandSideExpression); },
|
|
22297
22263
|
parenthesizeOperandOfPostfixUnary: function (operand) { return ts.cast(operand, ts.isLeftHandSideExpression); },
|
|
22298
22264
|
parenthesizeOperandOfPrefixUnary: function (operand) { return ts.cast(operand, ts.isUnaryExpression); },
|
|
22299
|
-
parenthesizeExpressionsOfCommaDelimitedList:
|
|
22265
|
+
parenthesizeExpressionsOfCommaDelimitedList: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
22300
22266
|
parenthesizeExpressionForDisallowedComma: ts.identity,
|
|
22301
22267
|
parenthesizeExpressionOfExpressionStatement: ts.identity,
|
|
22302
22268
|
parenthesizeConciseBodyOfArrowFunction: ts.identity,
|
|
22303
22269
|
parenthesizeCheckTypeOfConditionalType: ts.identity,
|
|
22304
22270
|
parenthesizeExtendsTypeOfConditionalType: ts.identity,
|
|
22305
|
-
parenthesizeConstituentTypesOfUnionType:
|
|
22271
|
+
parenthesizeConstituentTypesOfUnionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
22306
22272
|
parenthesizeConstituentTypeOfUnionType: ts.identity,
|
|
22307
|
-
parenthesizeConstituentTypesOfIntersectionType:
|
|
22273
|
+
parenthesizeConstituentTypesOfIntersectionType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
22308
22274
|
parenthesizeConstituentTypeOfIntersectionType: ts.identity,
|
|
22309
22275
|
parenthesizeOperandOfTypeOperator: ts.identity,
|
|
22310
22276
|
parenthesizeOperandOfReadonlyTypeOperator: ts.identity,
|
|
22311
22277
|
parenthesizeNonArrayTypeOfPostfixType: ts.identity,
|
|
22312
|
-
parenthesizeElementTypesOfTupleType:
|
|
22278
|
+
parenthesizeElementTypesOfTupleType: function (nodes) { return ts.cast(nodes, ts.isNodeArray); },
|
|
22313
22279
|
parenthesizeElementTypeOfTupleType: ts.identity,
|
|
22314
22280
|
parenthesizeTypeOfOptionalType: ts.identity,
|
|
22315
|
-
parenthesizeTypeArguments: function (nodes) { return nodes &&
|
|
22281
|
+
parenthesizeTypeArguments: function (nodes) { return nodes && ts.cast(nodes, ts.isNodeArray); },
|
|
22316
22282
|
parenthesizeLeadingTypeArgument: ts.identity,
|
|
22317
22283
|
};
|
|
22318
22284
|
})(ts || (ts = {}));
|
|
@@ -27009,7 +26975,7 @@ var ts;
|
|
|
27009
26975
|
clone.transformFlags = node.transformFlags;
|
|
27010
26976
|
setOriginalNode(clone, node);
|
|
27011
26977
|
for (var key in node) {
|
|
27012
|
-
if (
|
|
26978
|
+
if (ts.hasProperty(clone, key) || !ts.hasProperty(node, key)) {
|
|
27013
26979
|
continue;
|
|
27014
26980
|
}
|
|
27015
26981
|
clone[key] = node[key];
|
|
@@ -31897,7 +31863,6 @@ var ts;
|
|
|
31897
31863
|
visitNodes(cbNode, cbNodes, node.parameters) ||
|
|
31898
31864
|
visitNode(cbNode, node.type);
|
|
31899
31865
|
}
|
|
31900
|
-
;
|
|
31901
31866
|
function forEachChildInUnionOrIntersectionType(node, cbNode, cbNodes) {
|
|
31902
31867
|
return visitNodes(cbNode, cbNodes, node.types);
|
|
31903
31868
|
}
|
|
@@ -33199,7 +33164,7 @@ var ts;
|
|
|
33199
33164
|
}
|
|
33200
33165
|
function parsePrivateIdentifier() {
|
|
33201
33166
|
var pos = getNodePos();
|
|
33202
|
-
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.
|
|
33167
|
+
var node = factory.createPrivateIdentifier(internPrivateIdentifier(scanner.getTokenValue()));
|
|
33203
33168
|
nextToken();
|
|
33204
33169
|
return finishNode(node, pos);
|
|
33205
33170
|
}
|
|
@@ -39297,8 +39262,8 @@ var ts;
|
|
|
39297
39262
|
}
|
|
39298
39263
|
}
|
|
39299
39264
|
}
|
|
39300
|
-
function moveElementEntirelyPastChangeRange(element, delta, oldText, newText, aggressiveChecks) {
|
|
39301
|
-
if (
|
|
39265
|
+
function moveElementEntirelyPastChangeRange(element, isArray, delta, oldText, newText, aggressiveChecks) {
|
|
39266
|
+
if (isArray) {
|
|
39302
39267
|
visitArray(element);
|
|
39303
39268
|
}
|
|
39304
39269
|
else {
|
|
@@ -39306,7 +39271,6 @@ var ts;
|
|
|
39306
39271
|
}
|
|
39307
39272
|
return;
|
|
39308
39273
|
function visitNode(node) {
|
|
39309
|
-
ts.Debug.type(node);
|
|
39310
39274
|
var text = "";
|
|
39311
39275
|
if (aggressiveChecks && shouldCheckNode(node)) {
|
|
39312
39276
|
text = oldText.substring(node.pos, node.end);
|
|
@@ -39330,7 +39294,6 @@ var ts;
|
|
|
39330
39294
|
checkNodePositions(node, aggressiveChecks);
|
|
39331
39295
|
}
|
|
39332
39296
|
function visitArray(array) {
|
|
39333
|
-
ts.Debug.type(array);
|
|
39334
39297
|
array._children = undefined;
|
|
39335
39298
|
ts.setTextRangePosEnd(array, array.pos + delta, array.end + delta);
|
|
39336
39299
|
for (var _i = 0, array_9 = array; _i < array_9.length; _i++) {
|
|
@@ -39436,12 +39399,11 @@ var ts;
|
|
|
39436
39399
|
visitNode(sourceFile);
|
|
39437
39400
|
return;
|
|
39438
39401
|
function visitNode(child) {
|
|
39439
|
-
ts.Debug.type(child);
|
|
39440
39402
|
ts.Debug.assert(child.pos <= child.end);
|
|
39441
39403
|
if (child.pos > changeRangeOldEnd) {
|
|
39442
39404
|
// Node is entirely past the change range. We need to move both its pos and
|
|
39443
39405
|
// end, forward or backward appropriately.
|
|
39444
|
-
moveElementEntirelyPastChangeRange(child, delta, oldText, newText, aggressiveChecks);
|
|
39406
|
+
moveElementEntirelyPastChangeRange(child, /*isArray*/ false, delta, oldText, newText, aggressiveChecks);
|
|
39445
39407
|
return;
|
|
39446
39408
|
}
|
|
39447
39409
|
// Check if the element intersects the change range. If it does, then it is not
|
|
@@ -39467,12 +39429,11 @@ var ts;
|
|
|
39467
39429
|
ts.Debug.assert(fullEnd < changeStart);
|
|
39468
39430
|
}
|
|
39469
39431
|
function visitArray(array) {
|
|
39470
|
-
ts.Debug.type(array);
|
|
39471
39432
|
ts.Debug.assert(array.pos <= array.end);
|
|
39472
39433
|
if (array.pos > changeRangeOldEnd) {
|
|
39473
39434
|
// Array is entirely after the change range. We need to move it, and move any of
|
|
39474
39435
|
// its children.
|
|
39475
|
-
moveElementEntirelyPastChangeRange(array, delta, oldText, newText, aggressiveChecks);
|
|
39436
|
+
moveElementEntirelyPastChangeRange(array, /*isArray*/ true, delta, oldText, newText, aggressiveChecks);
|
|
39476
39437
|
return;
|
|
39477
39438
|
}
|
|
39478
39439
|
// Check if the element intersects the change range. If it does, then it is not
|
|
@@ -43074,7 +43035,6 @@ var ts;
|
|
|
43074
43035
|
}
|
|
43075
43036
|
}
|
|
43076
43037
|
function specToDiagnostic(spec, disallowTrailingRecursion) {
|
|
43077
|
-
ts.Debug.assert(typeof spec === "string");
|
|
43078
43038
|
if (disallowTrailingRecursion && invalidTrailingRecursionPattern.test(spec)) {
|
|
43079
43039
|
return [ts.Diagnostics.File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0, spec];
|
|
43080
43040
|
}
|
|
@@ -43218,7 +43178,7 @@ var ts;
|
|
|
43218
43178
|
function convertCompilerOptionsForTelemetry(opts) {
|
|
43219
43179
|
var out = {};
|
|
43220
43180
|
for (var key in opts) {
|
|
43221
|
-
if (
|
|
43181
|
+
if (ts.hasProperty(opts, key)) {
|
|
43222
43182
|
var type = getOptionFromName(key);
|
|
43223
43183
|
if (type !== undefined) { // Ignore unknown options
|
|
43224
43184
|
out[key] = getOptionValueWithEmptyStrings(opts[key], type);
|
|
@@ -49722,7 +49682,8 @@ var ts;
|
|
|
49722
49682
|
var emptyTypeLiteralSymbol = createSymbol(2048 /* SymbolFlags.TypeLiteral */, "__type" /* InternalSymbolName.Type */);
|
|
49723
49683
|
emptyTypeLiteralSymbol.members = ts.createSymbolTable();
|
|
49724
49684
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
49725
|
-
var
|
|
49685
|
+
var unknownEmptyObjectType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
49686
|
+
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
49726
49687
|
var emptyGenericType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
49727
49688
|
emptyGenericType.instantiations = new ts.Map();
|
|
49728
49689
|
var anyFunctionType = createAnonymousType(undefined, emptySymbols, ts.emptyArray, ts.emptyArray, ts.emptyArray);
|
|
@@ -49836,6 +49797,7 @@ var ts;
|
|
|
49836
49797
|
var deferredGlobalOmitSymbol;
|
|
49837
49798
|
var deferredGlobalAwaitedSymbol;
|
|
49838
49799
|
var deferredGlobalBigIntType;
|
|
49800
|
+
var deferredGlobalRecordSymbol;
|
|
49839
49801
|
var allPotentiallyUnusedIdentifiers = new ts.Map(); // key is file name
|
|
49840
49802
|
var flowLoopStart = 0;
|
|
49841
49803
|
var flowLoopCount = 0;
|
|
@@ -49920,7 +49882,7 @@ var ts;
|
|
|
49920
49882
|
if (jsxFragmentPragma) {
|
|
49921
49883
|
var chosenPragma = ts.isArray(jsxFragmentPragma) ? jsxFragmentPragma[0] : jsxFragmentPragma;
|
|
49922
49884
|
file.localJsxFragmentFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
49923
|
-
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic
|
|
49885
|
+
ts.visitNode(file.localJsxFragmentFactory, markAsSynthetic);
|
|
49924
49886
|
if (file.localJsxFragmentFactory) {
|
|
49925
49887
|
return file.localJsxFragmentNamespace = ts.getFirstIdentifier(file.localJsxFragmentFactory).escapedText;
|
|
49926
49888
|
}
|
|
@@ -49965,7 +49927,7 @@ var ts;
|
|
|
49965
49927
|
if (jsxPragma) {
|
|
49966
49928
|
var chosenPragma = ts.isArray(jsxPragma) ? jsxPragma[0] : jsxPragma;
|
|
49967
49929
|
file.localJsxFactory = ts.parseIsolatedEntityName(chosenPragma.arguments.factory, languageVersion);
|
|
49968
|
-
ts.visitNode(file.localJsxFactory, markAsSynthetic
|
|
49930
|
+
ts.visitNode(file.localJsxFactory, markAsSynthetic);
|
|
49969
49931
|
if (file.localJsxFactory) {
|
|
49970
49932
|
return file.localJsxNamespace = ts.getFirstIdentifier(file.localJsxFactory).escapedText;
|
|
49971
49933
|
}
|
|
@@ -51624,7 +51586,6 @@ var ts;
|
|
|
51624
51586
|
return valueSymbol;
|
|
51625
51587
|
}
|
|
51626
51588
|
var result = createSymbol(valueSymbol.flags | typeSymbol.flags, valueSymbol.escapedName);
|
|
51627
|
-
ts.Debug.assert(valueSymbol.declarations || typeSymbol.declarations);
|
|
51628
51589
|
result.declarations = ts.deduplicate(ts.concatenate(valueSymbol.declarations, typeSymbol.declarations), ts.equateValues);
|
|
51629
51590
|
result.parent = valueSymbol.parent || typeSymbol.parent;
|
|
51630
51591
|
if (valueSymbol.valueDeclaration)
|
|
@@ -53677,7 +53638,6 @@ var ts;
|
|
|
53677
53638
|
var objectFlags = ts.getObjectFlags(type);
|
|
53678
53639
|
if (objectFlags & 4 /* ObjectFlags.Reference */) {
|
|
53679
53640
|
ts.Debug.assert(!!(type.flags & 524288 /* TypeFlags.Object */));
|
|
53680
|
-
ts.Debug.type(type);
|
|
53681
53641
|
return type.node ? visitAndTransformType(type, typeReferenceToTypeNode) : typeReferenceToTypeNode(type);
|
|
53682
53642
|
}
|
|
53683
53643
|
if (type.flags & 262144 /* TypeFlags.TypeParameter */ || objectFlags & 3 /* ObjectFlags.ClassOrInterface */) {
|
|
@@ -55136,7 +55096,7 @@ var ts;
|
|
|
55136
55096
|
}
|
|
55137
55097
|
var hadError = false;
|
|
55138
55098
|
var file = ts.getSourceFileOfNode(existing);
|
|
55139
|
-
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols
|
|
55099
|
+
var transformed = ts.visitNode(existing, visitExistingNodeTreeSymbols);
|
|
55140
55100
|
if (hadError) {
|
|
55141
55101
|
return undefined;
|
|
55142
55102
|
}
|
|
@@ -55167,7 +55127,7 @@ var ts;
|
|
|
55167
55127
|
var typeViaParent = getTypeOfPropertyOfType(getTypeFromTypeNode(node), name.escapedText);
|
|
55168
55128
|
var overrideTypeNode = typeViaParent && t.typeExpression && getTypeFromTypeNode(t.typeExpression.type) !== typeViaParent ? typeToTypeNodeHelper(typeViaParent, context) : undefined;
|
|
55169
55129
|
return ts.factory.createPropertySignature(
|
|
55170
|
-
/*modifiers*/ undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols
|
|
55130
|
+
/*modifiers*/ undefined, name, t.isBracketed || t.typeExpression && ts.isJSDocOptionalType(t.typeExpression.type) ? ts.factory.createToken(57 /* SyntaxKind.QuestionToken */) : undefined, overrideTypeNode || (t.typeExpression && ts.visitNode(t.typeExpression.type, visitExistingNodeTreeSymbols)) || ts.factory.createKeywordTypeNode(131 /* SyntaxKind.AnyKeyword */));
|
|
55171
55131
|
}));
|
|
55172
55132
|
}
|
|
55173
55133
|
if (ts.isTypeReferenceNode(node) && ts.isIdentifier(node.typeName) && node.typeName.escapedText === "") {
|
|
@@ -55178,18 +55138,18 @@ var ts;
|
|
|
55178
55138
|
/*modifiers*/ undefined, [ts.factory.createParameterDeclaration(
|
|
55179
55139
|
/*modifiers*/ undefined,
|
|
55180
55140
|
/*dotdotdotToken*/ undefined, "x",
|
|
55181
|
-
/*questionToken*/ undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols
|
|
55141
|
+
/*questionToken*/ undefined, ts.visitNode(node.typeArguments[0], visitExistingNodeTreeSymbols))], ts.visitNode(node.typeArguments[1], visitExistingNodeTreeSymbols))]);
|
|
55182
55142
|
}
|
|
55183
55143
|
if (ts.isJSDocFunctionType(node)) {
|
|
55184
55144
|
if (ts.isJSDocConstructSignature(node)) {
|
|
55185
55145
|
var newTypeNode_1;
|
|
55186
55146
|
return ts.factory.createConstructorTypeNode(
|
|
55187
|
-
/*modifiers*/ undefined, ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
55147
|
+
/*modifiers*/ 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(
|
|
55188
55148
|
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
55189
55149
|
/*initializer*/ undefined); }), ts.visitNode(newTypeNode_1 || node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(131 /* SyntaxKind.AnyKeyword */));
|
|
55190
55150
|
}
|
|
55191
55151
|
else {
|
|
55192
|
-
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols
|
|
55152
|
+
return ts.factory.createFunctionTypeNode(ts.visitNodes(node.typeParameters, visitExistingNodeTreeSymbols), ts.map(node.parameters, function (p, i) { return ts.factory.createParameterDeclaration(
|
|
55193
55153
|
/*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), getNameForJSDocFunctionParameter(p, i), p.questionToken, ts.visitNode(p.type, visitExistingNodeTreeSymbols),
|
|
55194
55154
|
/*initializer*/ undefined); }), ts.visitNode(node.type, visitExistingNodeTreeSymbols) || ts.factory.createKeywordTypeNode(131 /* SyntaxKind.AnyKeyword */));
|
|
55195
55155
|
}
|
|
@@ -55644,7 +55604,7 @@ var ts;
|
|
|
55644
55604
|
}
|
|
55645
55605
|
}
|
|
55646
55606
|
function includePrivateSymbol(symbol) {
|
|
55647
|
-
if (ts.some(symbol.declarations, ts.
|
|
55607
|
+
if (ts.some(symbol.declarations, ts.isParameterDeclaration))
|
|
55648
55608
|
return;
|
|
55649
55609
|
ts.Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]);
|
|
55650
55610
|
getUnusedName(ts.unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol
|
|
@@ -56031,7 +55991,7 @@ var ts;
|
|
|
56031
55991
|
case 268 /* SyntaxKind.ImportEqualsDeclaration */:
|
|
56032
55992
|
// This _specifically_ only exists to handle json declarations - where we make aliases, but since
|
|
56033
55993
|
// we emit no declarations for the json document, must not refer to it in the declarations
|
|
56034
|
-
if (target.escapedName === "export=" /* InternalSymbolName.ExportEquals */ && ts.some(target.declarations,
|
|
55994
|
+
if (target.escapedName === "export=" /* InternalSymbolName.ExportEquals */ && ts.some(target.declarations, ts.isJsonSourceFile)) {
|
|
56035
55995
|
serializeMaybeAliasAssignment(symbol);
|
|
56036
55996
|
break;
|
|
56037
55997
|
}
|
|
@@ -57196,7 +57156,6 @@ var ts;
|
|
|
57196
57156
|
return container;
|
|
57197
57157
|
}
|
|
57198
57158
|
}
|
|
57199
|
-
;
|
|
57200
57159
|
}
|
|
57201
57160
|
/** Create a synthetic property access flow node after the last statement of the file */
|
|
57202
57161
|
function getFlowTypeFromCommonJSExport(symbol) {
|
|
@@ -61942,6 +61901,10 @@ var ts;
|
|
|
61942
61901
|
function getGlobalBigIntType() {
|
|
61943
61902
|
return (deferredGlobalBigIntType || (deferredGlobalBigIntType = getGlobalType("BigInt", /*arity*/ 0, /*reportErrors*/ false))) || emptyObjectType;
|
|
61944
61903
|
}
|
|
61904
|
+
function getGlobalRecordSymbol() {
|
|
61905
|
+
deferredGlobalRecordSymbol || (deferredGlobalRecordSymbol = getGlobalTypeAliasSymbol("Record", /*arity*/ 2, /*reportErrors*/ true) || unknownSymbol);
|
|
61906
|
+
return deferredGlobalRecordSymbol === unknownSymbol ? undefined : deferredGlobalRecordSymbol;
|
|
61907
|
+
}
|
|
61945
61908
|
/**
|
|
61946
61909
|
* Instantiates a global type that is generic with some element type, and returns that instantiation.
|
|
61947
61910
|
*/
|
|
@@ -72258,18 +72221,26 @@ var ts;
|
|
|
72258
72221
|
}
|
|
72259
72222
|
function isTypePresencePossible(type, propName, assumeTrue) {
|
|
72260
72223
|
var prop = getPropertyOfType(type, propName);
|
|
72261
|
-
|
|
72262
|
-
|
|
72263
|
-
|
|
72264
|
-
|
|
72265
|
-
|
|
72266
|
-
|
|
72267
|
-
|
|
72268
|
-
|
|
72269
|
-
|
|
72270
|
-
|
|
72224
|
+
return prop ?
|
|
72225
|
+
!!(prop.flags & 16777216 /* SymbolFlags.Optional */) || assumeTrue :
|
|
72226
|
+
!!getApplicableIndexInfoForName(type, propName) || !assumeTrue;
|
|
72227
|
+
}
|
|
72228
|
+
function narrowByInKeyword(type, nameType, assumeTrue) {
|
|
72229
|
+
var name = getPropertyNameFromType(nameType);
|
|
72230
|
+
var isKnownProperty = someType(type, function (t) { return isTypePresencePossible(t, name, /*assumeTrue*/ true); });
|
|
72231
|
+
if (isKnownProperty) {
|
|
72232
|
+
// If the check is for a known property (i.e. a property declared in some constituent of
|
|
72233
|
+
// the target type), we filter the target type by presence of absence of the property.
|
|
72271
72234
|
return filterType(type, function (t) { return isTypePresencePossible(t, name, assumeTrue); });
|
|
72272
72235
|
}
|
|
72236
|
+
if (assumeTrue) {
|
|
72237
|
+
// If the check is for an unknown property, we intersect the target type with `Record<X, unknown>`,
|
|
72238
|
+
// where X is the name of the property.
|
|
72239
|
+
var recordSymbol = getGlobalRecordSymbol();
|
|
72240
|
+
if (recordSymbol) {
|
|
72241
|
+
return getIntersectionType([type, getTypeAliasInstantiation(recordSymbol, [nameType, unknownType])]);
|
|
72242
|
+
}
|
|
72243
|
+
}
|
|
72273
72244
|
return type;
|
|
72274
72245
|
}
|
|
72275
72246
|
function narrowTypeByBinaryExpression(type, expr, assumeTrue) {
|
|
@@ -72328,15 +72299,14 @@ var ts;
|
|
|
72328
72299
|
return narrowTypeByPrivateIdentifierInInExpression(type, expr, assumeTrue);
|
|
72329
72300
|
}
|
|
72330
72301
|
var target = getReferenceCandidate(expr.right);
|
|
72331
|
-
var leftType =
|
|
72332
|
-
if (leftType.flags &
|
|
72333
|
-
var name = ts.escapeLeadingUnderscores(leftType.value);
|
|
72302
|
+
var leftType = getTypeOfExpression(expr.left);
|
|
72303
|
+
if (leftType.flags & 8576 /* TypeFlags.StringOrNumberLiteralOrUnique */) {
|
|
72334
72304
|
if (containsMissingType(type) && ts.isAccessExpression(reference) && isMatchingReference(reference.expression, target) &&
|
|
72335
|
-
getAccessedPropertyName(reference) ===
|
|
72305
|
+
getAccessedPropertyName(reference) === getPropertyNameFromType(leftType)) {
|
|
72336
72306
|
return getTypeWithFacts(type, assumeTrue ? 524288 /* TypeFacts.NEUndefined */ : 65536 /* TypeFacts.EQUndefined */);
|
|
72337
72307
|
}
|
|
72338
72308
|
if (isMatchingReference(reference, target)) {
|
|
72339
|
-
return narrowByInKeyword(type,
|
|
72309
|
+
return narrowByInKeyword(type, leftType, assumeTrue);
|
|
72340
72310
|
}
|
|
72341
72311
|
}
|
|
72342
72312
|
break;
|
|
@@ -74598,7 +74568,7 @@ var ts;
|
|
|
74598
74568
|
return left === right || !left ? left
|
|
74599
74569
|
: compareTypeParametersIdentical(left.typeParameters, right.typeParameters) ? combineSignaturesOfIntersectionMembers(left, right)
|
|
74600
74570
|
: undefined;
|
|
74601
|
-
})
|
|
74571
|
+
})
|
|
74602
74572
|
: undefined;
|
|
74603
74573
|
}
|
|
74604
74574
|
function combineIntersectionThisParam(left, right, mapper) {
|
|
@@ -76506,7 +76476,6 @@ var ts;
|
|
|
76506
76476
|
}
|
|
76507
76477
|
return false;
|
|
76508
76478
|
}
|
|
76509
|
-
;
|
|
76510
76479
|
var suggestedMethod = ts.isAssignmentTarget(expr) ? "set" : "get";
|
|
76511
76480
|
if (!hasProp(suggestedMethod)) {
|
|
76512
76481
|
return undefined;
|
|
@@ -80077,6 +80046,9 @@ var ts;
|
|
|
80077
80046
|
}
|
|
80078
80047
|
return booleanType;
|
|
80079
80048
|
}
|
|
80049
|
+
function hasEmptyObjectIntersection(type) {
|
|
80050
|
+
return someType(type, function (t) { return t === unknownEmptyObjectType || !!(t.flags & 2097152 /* TypeFlags.Intersection */) && ts.some(t.types, isEmptyAnonymousObjectType); });
|
|
80051
|
+
}
|
|
80080
80052
|
function checkInExpression(left, right, leftType, rightType) {
|
|
80081
80053
|
if (leftType === silentNeverType || rightType === silentNeverType) {
|
|
80082
80054
|
return silentNeverType;
|
|
@@ -80093,40 +80065,20 @@ var ts;
|
|
|
80093
80065
|
}
|
|
80094
80066
|
}
|
|
80095
80067
|
else {
|
|
80096
|
-
|
|
80097
|
-
|
|
80098
|
-
|
|
80099
|
-
|
|
80100
|
-
|
|
80101
|
-
|
|
80068
|
+
// The type of the lef operand must be assignable to string, number, or symbol.
|
|
80069
|
+
checkTypeAssignableTo(checkNonNullType(leftType, left), stringNumberSymbolType, left);
|
|
80070
|
+
}
|
|
80071
|
+
// The type of the right operand must be assignable to 'object'.
|
|
80072
|
+
if (checkTypeAssignableTo(checkNonNullType(rightType, right), nonPrimitiveType, right)) {
|
|
80073
|
+
// The {} type is assignable to the object type, yet {} might represent a primitive type. Here we
|
|
80074
|
+
// detect and error on {} that results from narrowing the unknown type, as well as intersections
|
|
80075
|
+
// that include {} (we know that the other types in such intersections are assignable to object
|
|
80076
|
+
// since we already checked for that).
|
|
80077
|
+
if (hasEmptyObjectIntersection(rightType)) {
|
|
80078
|
+
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));
|
|
80102
80079
|
}
|
|
80103
80080
|
}
|
|
80104
|
-
rightType = checkNonNullType(rightType, right);
|
|
80105
|
-
// TypeScript 1.0 spec (April 2014): 4.15.5
|
|
80106
|
-
// The in operator requires the right operand to be
|
|
80107
|
-
//
|
|
80108
|
-
// 1. assignable to the non-primitive type,
|
|
80109
|
-
// 2. an unconstrained type parameter,
|
|
80110
|
-
// 3. a union or intersection including one or more type parameters, whose constituents are all assignable to the
|
|
80111
|
-
// the non-primitive type, or are unconstrainted type parameters, or have constraints assignable to the
|
|
80112
|
-
// non-primitive type, or
|
|
80113
|
-
// 4. a type parameter whose constraint is
|
|
80114
|
-
// i. an object type,
|
|
80115
|
-
// ii. the non-primitive type, or
|
|
80116
|
-
// iii. a union or intersection with at least one constituent assignable to an object or non-primitive type.
|
|
80117
|
-
//
|
|
80118
|
-
// The divergent behavior for type parameters and unions containing type parameters is a workaround for type
|
|
80119
|
-
// parameters not being narrowable. If the right operand is a concrete type, we can error if there is any chance
|
|
80120
|
-
// it is a primitive. But if the operand is a type parameter, it cannot be narrowed, so we don't issue an error
|
|
80121
|
-
// unless *all* instantiations would result in an error.
|
|
80122
|
-
//
|
|
80123
80081
|
// The result is always of the Boolean primitive type.
|
|
80124
|
-
var rightTypeConstraint = getConstraintOfType(rightType);
|
|
80125
|
-
if (!allTypesAssignableToKind(rightType, 67108864 /* TypeFlags.NonPrimitive */ | 58982400 /* TypeFlags.InstantiableNonPrimitive */) ||
|
|
80126
|
-
rightTypeConstraint && (isTypeAssignableToKind(rightType, 3145728 /* TypeFlags.UnionOrIntersection */) && !allTypesAssignableToKind(rightTypeConstraint, 67108864 /* TypeFlags.NonPrimitive */ | 58982400 /* TypeFlags.InstantiableNonPrimitive */) ||
|
|
80127
|
-
!maybeTypeOfKind(rightTypeConstraint, 67108864 /* TypeFlags.NonPrimitive */ | 58982400 /* TypeFlags.InstantiableNonPrimitive */ | 524288 /* TypeFlags.Object */))) {
|
|
80128
|
-
error(right, ts.Diagnostics.The_right_hand_side_of_an_in_expression_must_not_be_a_primitive);
|
|
80129
|
-
}
|
|
80130
80082
|
return booleanType;
|
|
80131
80083
|
}
|
|
80132
80084
|
function checkObjectLiteralAssignment(node, sourceType, rightIsThis) {
|
|
@@ -91136,27 +91088,17 @@ var ts;
|
|
|
91136
91088
|
})(ts || (ts = {}));
|
|
91137
91089
|
var ts;
|
|
91138
91090
|
(function (ts) {
|
|
91139
|
-
// TODO(jakebailey): include type guard and non-type guard variants on visitNode and visitNodes
|
|
91140
91091
|
var _a;
|
|
91141
|
-
/**
|
|
91142
|
-
* Visits a Node using the supplied visitor, possibly returning a new Node in its place.
|
|
91143
|
-
*
|
|
91144
|
-
* @param node The Node to visit.
|
|
91145
|
-
* @param visitor The callback used to visit the Node.
|
|
91146
|
-
* @param test A callback to execute to verify the Node is valid.
|
|
91147
|
-
* @param lift An optional callback to execute to lift a NodeArray into a valid Node.
|
|
91148
|
-
*/
|
|
91149
91092
|
function visitNode(node, visitor, test, lift) {
|
|
91150
|
-
if (node === undefined) {
|
|
91151
|
-
|
|
91093
|
+
if (node === undefined || visitor === undefined) {
|
|
91094
|
+
return node;
|
|
91095
|
+
}
|
|
91096
|
+
var visited = visitor(node);
|
|
91097
|
+
if (visited === node) {
|
|
91152
91098
|
return node;
|
|
91153
91099
|
}
|
|
91154
|
-
var visited = visitor ? visitor(node) : node;
|
|
91155
91100
|
var visitedNode;
|
|
91156
91101
|
if (visited === undefined) {
|
|
91157
|
-
// If the visited node is undefined, then the visitor must have returned undefined,
|
|
91158
|
-
// so the visitor must have been declared as able to return undefined, so TOut must be
|
|
91159
|
-
// potentially undefined.
|
|
91160
91102
|
return undefined;
|
|
91161
91103
|
}
|
|
91162
91104
|
else if (ts.isArray(visited)) {
|
|
@@ -91169,7 +91111,6 @@ var ts;
|
|
|
91169
91111
|
return visitedNode;
|
|
91170
91112
|
}
|
|
91171
91113
|
ts.visitNode = visitNode;
|
|
91172
|
-
(function (_) { })(visitNode); // Check that visitNode is a NodeVisitor.
|
|
91173
91114
|
/**
|
|
91174
91115
|
* Visits a NodeArray using the supplied visitor, possibly returning a new NodeArray in its place.
|
|
91175
91116
|
*
|
|
@@ -91180,8 +91121,7 @@ var ts;
|
|
|
91180
91121
|
* @param count An optional value indicating the maximum number of nodes to visit.
|
|
91181
91122
|
*/
|
|
91182
91123
|
function visitNodes(nodes, visitor, test, start, count) {
|
|
91183
|
-
if (nodes === undefined) {
|
|
91184
|
-
// If the input type is undefined, then the output type can be undefined.
|
|
91124
|
+
if (nodes === undefined || visitor === undefined) {
|
|
91185
91125
|
return nodes;
|
|
91186
91126
|
}
|
|
91187
91127
|
// Ensure start and count have valid values
|
|
@@ -91212,17 +91152,11 @@ var ts;
|
|
|
91212
91152
|
ts.setTextRangePosEnd(updatedArray, pos, end);
|
|
91213
91153
|
return updatedArray;
|
|
91214
91154
|
}
|
|
91215
|
-
// If we are here, updated === nodes. This means that it's still a NodeArray,
|
|
91216
|
-
// and also that its contents passed the tests in visitArrayWorker, so has contents
|
|
91217
|
-
// of type TOut.
|
|
91218
91155
|
return nodes;
|
|
91219
91156
|
}
|
|
91220
91157
|
ts.visitNodes = visitNodes;
|
|
91221
|
-
(function (_) { })(visitNodes); // Check that visitNode is a NodeVisitor.
|
|
91222
|
-
/* @internal */
|
|
91223
91158
|
function visitArray(nodes, visitor, test, start, count) {
|
|
91224
91159
|
if (nodes === undefined) {
|
|
91225
|
-
// If the input type is undefined, then the output type can be undefined.
|
|
91226
91160
|
return nodes;
|
|
91227
91161
|
}
|
|
91228
91162
|
// Ensure start and count have valid values
|
|
@@ -91247,7 +91181,7 @@ var ts;
|
|
|
91247
91181
|
// Visit each original node.
|
|
91248
91182
|
for (var i = 0; i < count; i++) {
|
|
91249
91183
|
var node = nodes[i + start];
|
|
91250
|
-
var visited = node !== undefined ?
|
|
91184
|
+
var visited = node !== undefined ? visitor(node) : undefined;
|
|
91251
91185
|
if (updated !== undefined || visited === undefined || visited !== node) {
|
|
91252
91186
|
if (updated === undefined) {
|
|
91253
91187
|
// Ensure we have a copy of `nodes`, up to the current index.
|
|
@@ -91257,20 +91191,18 @@ var ts;
|
|
|
91257
91191
|
if (ts.isArray(visited)) {
|
|
91258
91192
|
for (var _i = 0, visited_1 = visited; _i < visited_1.length; _i++) {
|
|
91259
91193
|
var visitedNode = visited_1[_i];
|
|
91260
|
-
|
|
91194
|
+
void ts.Debug.assertNode(visitedNode, test);
|
|
91261
91195
|
updated.push(visitedNode);
|
|
91262
91196
|
}
|
|
91263
91197
|
}
|
|
91264
91198
|
else {
|
|
91265
|
-
|
|
91199
|
+
void ts.Debug.assertNode(visited, test);
|
|
91266
91200
|
updated.push(visited);
|
|
91267
91201
|
}
|
|
91268
91202
|
}
|
|
91269
91203
|
}
|
|
91270
91204
|
}
|
|
91271
|
-
|
|
91272
|
-
ts.Debug.assertEachNode(result, test);
|
|
91273
|
-
return result;
|
|
91205
|
+
return updated !== null && updated !== void 0 ? updated : nodes;
|
|
91274
91206
|
}
|
|
91275
91207
|
/**
|
|
91276
91208
|
* Starts a new lexical environment and visits a statement list, ending the lexical environment
|
|
@@ -91291,7 +91223,7 @@ var ts;
|
|
|
91291
91223
|
context.startLexicalEnvironment();
|
|
91292
91224
|
if (nodes) {
|
|
91293
91225
|
context.setLexicalEnvironmentFlags(1 /* LexicalEnvironmentFlags.InParameters */, true);
|
|
91294
|
-
updated = nodesVisitor(nodes, visitor, ts.
|
|
91226
|
+
updated = nodesVisitor(nodes, visitor, ts.isParameterDeclaration);
|
|
91295
91227
|
// As of ES2015, any runtime execution of that occurs in for a parameter (such as evaluating an
|
|
91296
91228
|
// initializer or a binding pattern), occurs in its own lexical scope. As a result, any expression
|
|
91297
91229
|
// that we might transform that introduces a temporary variable would fail as the temporary variable
|
|
@@ -91374,7 +91306,6 @@ var ts;
|
|
|
91374
91306
|
if (nodeVisitor === void 0) { nodeVisitor = visitNode; }
|
|
91375
91307
|
context.startBlockScope();
|
|
91376
91308
|
var updated = nodeVisitor(body, visitor, ts.isStatement, context.factory.liftToBlock);
|
|
91377
|
-
ts.Debug.assert(updated);
|
|
91378
91309
|
var declarations = context.endBlockScope();
|
|
91379
91310
|
if (ts.some(declarations)) {
|
|
91380
91311
|
if (ts.isBlock(updated)) {
|
|
@@ -91414,23 +91345,23 @@ var ts;
|
|
|
91414
91345
|
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));
|
|
91415
91346
|
},
|
|
91416
91347
|
_a[166 /* SyntaxKind.Parameter */] = function visitEachChildOfParameterDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
91417
|
-
return context.factory.updateParameterDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.dotDotDotToken, tokenVisitor, ts.isDotDotDotToken),
|
|
91348
|
+
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));
|
|
91418
91349
|
},
|
|
91419
91350
|
_a[167 /* SyntaxKind.Decorator */] = function visitEachChildOfDecorator(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91420
91351
|
return context.factory.updateDecorator(node, nodeVisitor(node.expression, visitor, ts.isExpression));
|
|
91421
91352
|
},
|
|
91422
91353
|
// Type elements
|
|
91423
91354
|
_a[168 /* SyntaxKind.PropertySignature */] = function visitEachChildOfPropertySignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
91424
|
-
return context.factory.updatePropertySignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodeVisitor(node.name, visitor, ts.isPropertyName), nodeVisitor(node.questionToken, tokenVisitor, ts.
|
|
91355
|
+
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));
|
|
91425
91356
|
},
|
|
91426
91357
|
_a[169 /* SyntaxKind.PropertyDeclaration */] = function visitEachChildOfPropertyDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
91427
91358
|
var _a;
|
|
91428
|
-
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike),
|
|
91359
|
+
return context.factory.updatePropertyDeclaration(node, nodesVisitor(node.modifiers, visitor, ts.isModifierLike), nodeVisitor(node.name, visitor, ts.isPropertyName),
|
|
91429
91360
|
// QuestionToken and ExclamationToken are mutually exclusive in PropertyDeclaration
|
|
91430
91361
|
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));
|
|
91431
91362
|
},
|
|
91432
91363
|
_a[170 /* SyntaxKind.MethodSignature */] = function visitEachChildOfMethodSignature(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
91433
|
-
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.
|
|
91364
|
+
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));
|
|
91434
91365
|
},
|
|
91435
91366
|
_a[171 /* SyntaxKind.MethodDeclaration */] = function visitEachChildOfMethodDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, tokenVisitor) {
|
|
91436
91367
|
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));
|
|
@@ -91450,13 +91381,13 @@ var ts;
|
|
|
91450
91381
|
return context.factory.updateClassStaticBlockDeclaration(node, visitFunctionBody(node.body, visitor, context, nodeVisitor));
|
|
91451
91382
|
},
|
|
91452
91383
|
_a[176 /* SyntaxKind.CallSignature */] = function visitEachChildOfCallSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91453
|
-
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
91384
|
+
return context.factory.updateCallSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
91454
91385
|
},
|
|
91455
91386
|
_a[177 /* SyntaxKind.ConstructSignature */] = function visitEachChildOfConstructSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91456
|
-
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
91387
|
+
return context.factory.updateConstructSignature(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
91457
91388
|
},
|
|
91458
91389
|
_a[178 /* SyntaxKind.IndexSignature */] = function visitEachChildOfIndexSignatureDeclaration(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91459
|
-
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.
|
|
91390
|
+
return context.factory.updateIndexSignature(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
91460
91391
|
},
|
|
91461
91392
|
// Types
|
|
91462
91393
|
_a[179 /* SyntaxKind.TypePredicate */] = function visitEachChildOfTypePredicateNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
@@ -91466,10 +91397,10 @@ var ts;
|
|
|
91466
91397
|
return context.factory.updateTypeReferenceNode(node, nodeVisitor(node.typeName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
91467
91398
|
},
|
|
91468
91399
|
_a[181 /* SyntaxKind.FunctionType */] = function visitEachChildOfFunctionTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91469
|
-
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
91400
|
+
return context.factory.updateFunctionTypeNode(node, nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.isParameterDeclaration), nodeVisitor(node.type, visitor, ts.isTypeNode));
|
|
91470
91401
|
},
|
|
91471
91402
|
_a[182 /* SyntaxKind.ConstructorType */] = function visitEachChildOfConstructorTypeNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91472
|
-
return context.factory.updateConstructorTypeNode(node, nodesVisitor(node.modifiers, visitor, ts.isModifier), nodesVisitor(node.typeParameters, visitor, ts.isTypeParameterDeclaration), nodesVisitor(node.parameters, visitor, ts.
|
|
91403
|
+
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));
|
|
91473
91404
|
},
|
|
91474
91405
|
_a[183 /* SyntaxKind.TypeQuery */] = function visitEachChildOfTypeQueryNode(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91475
91406
|
return context.factory.updateTypeQueryNode(node, nodeVisitor(node.exprName, visitor, ts.isEntityName), nodesVisitor(node.typeArguments, visitor, ts.isTypeNode));
|
|
@@ -91523,7 +91454,7 @@ var ts;
|
|
|
91523
91454
|
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));
|
|
91524
91455
|
},
|
|
91525
91456
|
_a[198 /* SyntaxKind.LiteralType */] = function visitEachChildOfLiteralTypeNode(node, visitor, context, _nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91526
|
-
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.
|
|
91457
|
+
return context.factory.updateLiteralTypeNode(node, nodeVisitor(node.literal, visitor, ts.isExpression));
|
|
91527
91458
|
},
|
|
91528
91459
|
_a[200 /* SyntaxKind.TemplateLiteralType */] = function visitEachChildOfTemplateLiteralType(node, visitor, context, nodesVisitor, nodeVisitor, _tokenVisitor) {
|
|
91529
91460
|
return context.factory.updateTemplateLiteralType(node, nodeVisitor(node.head, visitor, ts.isTemplateHead), nodesVisitor(node.templateSpans, visitor, ts.isTemplateLiteralTypeSpan));
|
|
@@ -93013,7 +92944,6 @@ var ts;
|
|
|
93013
92944
|
};
|
|
93014
92945
|
if (value) {
|
|
93015
92946
|
value = ts.visitNode(value, visitor, ts.isExpression);
|
|
93016
|
-
ts.Debug.assert(value);
|
|
93017
92947
|
if (ts.isIdentifier(value) && bindingOrAssignmentElementAssignsToName(node, value.escapedText) ||
|
|
93018
92948
|
bindingOrAssignmentElementContainsNonLiteralComputedName(node)) {
|
|
93019
92949
|
// If the right-hand value of the assignment is also an assignment target then
|
|
@@ -93240,7 +93170,7 @@ var ts;
|
|
|
93240
93170
|
&& !(element.transformFlags & (32768 /* TransformFlags.ContainsRestOrSpread */ | 65536 /* TransformFlags.ContainsObjectRestOrSpread */))
|
|
93241
93171
|
&& !(ts.getTargetOfBindingOrAssignmentElement(element).transformFlags & (32768 /* TransformFlags.ContainsRestOrSpread */ | 65536 /* TransformFlags.ContainsObjectRestOrSpread */))
|
|
93242
93172
|
&& !ts.isComputedPropertyName(propertyName)) {
|
|
93243
|
-
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor
|
|
93173
|
+
bindingElements = ts.append(bindingElements, ts.visitNode(element, flattenContext.visitor));
|
|
93244
93174
|
}
|
|
93245
93175
|
else {
|
|
93246
93176
|
if (bindingElements) {
|
|
@@ -93421,7 +93351,6 @@ var ts;
|
|
|
93421
93351
|
return factory.createArrayBindingPattern(elements);
|
|
93422
93352
|
}
|
|
93423
93353
|
function makeArrayAssignmentPattern(factory, elements) {
|
|
93424
|
-
ts.Debug.assertEachNode(elements, ts.isArrayBindingOrAssignmentElement);
|
|
93425
93354
|
return factory.createArrayLiteralExpression(ts.map(elements, factory.converters.convertToArrayAssignmentElement));
|
|
93426
93355
|
}
|
|
93427
93356
|
function makeObjectBindingPattern(factory, elements) {
|
|
@@ -93429,7 +93358,6 @@ var ts;
|
|
|
93429
93358
|
return factory.createObjectBindingPattern(elements);
|
|
93430
93359
|
}
|
|
93431
93360
|
function makeObjectAssignmentPattern(factory, elements) {
|
|
93432
|
-
ts.Debug.assertEachNode(elements, ts.isObjectBindingOrAssignmentElement);
|
|
93433
93361
|
return factory.createObjectLiteralExpression(ts.map(elements, factory.converters.convertToObjectAssignmentElement));
|
|
93434
93362
|
}
|
|
93435
93363
|
function makeBindingElement(factory, name) {
|
|
@@ -93450,7 +93378,6 @@ var ts;
|
|
|
93450
93378
|
function processTaggedTemplateExpression(context, node, visitor, currentSourceFile, recordTaggedTemplateString, level) {
|
|
93451
93379
|
// Visit the tag expression
|
|
93452
93380
|
var tag = ts.visitNode(node.tag, visitor, ts.isExpression);
|
|
93453
|
-
ts.Debug.assert(tag);
|
|
93454
93381
|
// Build up the template arguments and the raw and cooked strings for the template.
|
|
93455
93382
|
// We start out with 'undefined' for the first argument and revisit later
|
|
93456
93383
|
// to avoid walking over the template string twice and shifting all our arguments over after the fact.
|
|
@@ -94016,7 +93943,7 @@ var ts;
|
|
|
94016
93943
|
return factory.updateSourceFile(node, ts.visitLexicalEnvironment(node.statements, sourceElementVisitor, context, /*start*/ 0, alwaysStrict));
|
|
94017
93944
|
}
|
|
94018
93945
|
function visitObjectLiteralExpression(node) {
|
|
94019
|
-
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.
|
|
93946
|
+
return factory.updateObjectLiteralExpression(node, ts.visitNodes(node.properties, getObjectLiteralElementVisitor(node), ts.isObjectLiteralElement));
|
|
94020
93947
|
}
|
|
94021
93948
|
function getClassFacts(node, staticProperties) {
|
|
94022
93949
|
var facts = 0 /* ClassFacts.None */;
|
|
@@ -94202,7 +94129,6 @@ var ts;
|
|
|
94202
94129
|
for (var _i = 0, parameterDecorators_1 = parameterDecorators; _i < parameterDecorators_1.length; _i++) {
|
|
94203
94130
|
var parameterDecorator = parameterDecorators_1[_i];
|
|
94204
94131
|
var expression = ts.visitNode(parameterDecorator.expression, visitor, ts.isExpression);
|
|
94205
|
-
ts.Debug.assert(expression);
|
|
94206
94132
|
var helper = emitHelpers().createParamHelper(expression, parameterOffset);
|
|
94207
94133
|
ts.setTextRange(helper, parameterDecorator.expression);
|
|
94208
94134
|
ts.setEmitFlags(helper, 1536 /* EmitFlags.NoComments */);
|
|
@@ -94345,7 +94271,6 @@ var ts;
|
|
|
94345
94271
|
// - the property has a decorator.
|
|
94346
94272
|
if (ts.isComputedPropertyName(name) && ((!ts.hasStaticModifier(member) && currentClassHasParameterProperties) || ts.hasDecorators(member))) {
|
|
94347
94273
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
94348
|
-
ts.Debug.assert(expression);
|
|
94349
94274
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
94350
94275
|
if (!ts.isSimpleInlineableExpression(innerExpression)) {
|
|
94351
94276
|
var generatedName = factory.getGeneratedNameForNode(name);
|
|
@@ -94380,7 +94305,7 @@ var ts;
|
|
|
94380
94305
|
* @param node The ExpressionWithTypeArguments to transform.
|
|
94381
94306
|
*/
|
|
94382
94307
|
function visitExpressionWithTypeArguments(node) {
|
|
94383
|
-
return factory.updateExpressionWithTypeArguments(node, ts.
|
|
94308
|
+
return factory.updateExpressionWithTypeArguments(node, ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression),
|
|
94384
94309
|
/*typeArguments*/ undefined);
|
|
94385
94310
|
}
|
|
94386
94311
|
/**
|
|
@@ -94401,7 +94326,7 @@ var ts;
|
|
|
94401
94326
|
var decorators = transformAllDecoratorsOfDeclaration(node, parent, allDecorators);
|
|
94402
94327
|
// Preserve a `declare x` property with decorators to be handled by the decorators transform
|
|
94403
94328
|
if (isAmbient) {
|
|
94404
|
-
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2 /* ModifierFlags.Ambient */)), ts.
|
|
94329
|
+
return factory.updatePropertyDeclaration(node, ts.concatenate(decorators, factory.createModifiersFromModifierFlags(2 /* ModifierFlags.Ambient */)), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
94405
94330
|
/*questionOrExclamationToken*/ undefined,
|
|
94406
94331
|
/*type*/ undefined,
|
|
94407
94332
|
/*initializer*/ undefined);
|
|
@@ -94562,7 +94487,7 @@ var ts;
|
|
|
94562
94487
|
return undefined;
|
|
94563
94488
|
}
|
|
94564
94489
|
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), // preserve positions, if available
|
|
94565
|
-
node.dotDotDotToken, ts.
|
|
94490
|
+
node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
94566
94491
|
/*questionToken*/ undefined,
|
|
94567
94492
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
94568
94493
|
if (updated !== node) {
|
|
@@ -94614,7 +94539,6 @@ var ts;
|
|
|
94614
94539
|
// Make sure we consider all nested cast expressions, e.g.:
|
|
94615
94540
|
// (<any><number><any>-A).x;
|
|
94616
94541
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
94617
|
-
ts.Debug.assert(expression);
|
|
94618
94542
|
// We have an expression of the form: (<Type>SubExpr). Emitting this as (SubExpr)
|
|
94619
94543
|
// is really not desirable. We would like to emit the subexpression as-is. Omitting
|
|
94620
94544
|
// the parentheses, however, could cause change in the semantics of the generated
|
|
@@ -94638,17 +94562,14 @@ var ts;
|
|
|
94638
94562
|
}
|
|
94639
94563
|
function visitAssertionExpression(node) {
|
|
94640
94564
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
94641
|
-
ts.Debug.assert(expression);
|
|
94642
94565
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
94643
94566
|
}
|
|
94644
94567
|
function visitNonNullExpression(node) {
|
|
94645
94568
|
var expression = ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression);
|
|
94646
|
-
ts.Debug.assert(expression);
|
|
94647
94569
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
94648
94570
|
}
|
|
94649
94571
|
function visitSatisfiesExpression(node) {
|
|
94650
94572
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
94651
|
-
ts.Debug.assert(expression);
|
|
94652
94573
|
return factory.createPartiallyEmittedExpression(expression, node);
|
|
94653
94574
|
}
|
|
94654
94575
|
function visitCallExpression(node) {
|
|
@@ -94661,7 +94582,7 @@ var ts;
|
|
|
94661
94582
|
}
|
|
94662
94583
|
function visitTaggedTemplateExpression(node) {
|
|
94663
94584
|
return factory.updateTaggedTemplateExpression(node, ts.visitNode(node.tag, visitor, ts.isExpression),
|
|
94664
|
-
/*typeArguments*/ undefined, ts.visitNode(node.template, visitor, ts.
|
|
94585
|
+
/*typeArguments*/ undefined, ts.visitNode(node.template, visitor, ts.isExpression));
|
|
94665
94586
|
}
|
|
94666
94587
|
function visitJsxSelfClosingElement(node) {
|
|
94667
94588
|
return factory.updateJsxSelfClosingElement(node, ts.visitNode(node.tagName, visitor, ts.isJsxTagNameExpression),
|
|
@@ -95691,7 +95612,6 @@ var ts;
|
|
|
95691
95612
|
var info = accessPrivateIdentifier(node.left);
|
|
95692
95613
|
if (info) {
|
|
95693
95614
|
var receiver = ts.visitNode(node.right, visitor, ts.isExpression);
|
|
95694
|
-
ts.Debug.assert(receiver);
|
|
95695
95615
|
return ts.setOriginalNode(context.getEmitHelperFactory().createClassPrivateFieldInHelper(info.brandCheckIdentifier, receiver), node);
|
|
95696
95616
|
}
|
|
95697
95617
|
// Private name has not been declared. Subsequent transformers will handle this error
|
|
@@ -95708,7 +95628,6 @@ var ts;
|
|
|
95708
95628
|
}
|
|
95709
95629
|
function visitComputedPropertyName(node) {
|
|
95710
95630
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
95711
|
-
ts.Debug.assert(expression);
|
|
95712
95631
|
if (ts.some(pendingExpressions)) {
|
|
95713
95632
|
if (ts.isParenthesizedExpression(expression)) {
|
|
95714
95633
|
expression = factory.updateParenthesizedExpression(expression, factory.inlineExpressions(__spreadArray(__spreadArray([], pendingExpressions, true), [expression.expression], false)));
|
|
@@ -95788,7 +95707,6 @@ var ts;
|
|
|
95788
95707
|
var temp = factory.createTempVariable(hoistVariableDeclaration);
|
|
95789
95708
|
ts.setSourceMapRange(temp, name.expression);
|
|
95790
95709
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
95791
|
-
ts.Debug.assert(expression);
|
|
95792
95710
|
var assignment = factory.createAssignment(temp, expression);
|
|
95793
95711
|
ts.setSourceMapRange(assignment, name.expression);
|
|
95794
95712
|
getterName = factory.updateComputedPropertyName(name, factory.inlineExpressions([assignment, temp]));
|
|
@@ -95939,7 +95857,6 @@ var ts;
|
|
|
95939
95857
|
var info = void 0;
|
|
95940
95858
|
if (info = accessPrivateIdentifier(operand.name)) {
|
|
95941
95859
|
var receiver = ts.visitNode(operand.expression, visitor, ts.isExpression);
|
|
95942
|
-
ts.Debug.assert(receiver);
|
|
95943
95860
|
var _a = createCopiableReceiverExpr(receiver), readExpression = _a.readExpression, initializeExpression = _a.initializeExpression;
|
|
95944
95861
|
var expression = createPrivateIdentifierAccess(info, readExpression);
|
|
95945
95862
|
var temp = ts.isPrefixUnaryExpression(node) || valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
@@ -96143,17 +96060,14 @@ var ts;
|
|
|
96143
96060
|
var superPropertyGet = factory.createReflectGetCall(superClassReference, getterName, classConstructor);
|
|
96144
96061
|
ts.setOriginalNode(superPropertyGet, node.left);
|
|
96145
96062
|
ts.setTextRange(superPropertyGet, node.left);
|
|
96146
|
-
ts.Debug.assert(expression);
|
|
96147
96063
|
expression = factory.createBinaryExpression(superPropertyGet, ts.getNonAssignmentOperatorForCompoundAssignment(node.operatorToken.kind), expression);
|
|
96148
96064
|
ts.setTextRange(expression, node);
|
|
96149
96065
|
}
|
|
96150
96066
|
var temp = valueIsDiscarded ? undefined : factory.createTempVariable(hoistVariableDeclaration);
|
|
96151
96067
|
if (temp) {
|
|
96152
|
-
ts.Debug.assert(expression);
|
|
96153
96068
|
expression = factory.createAssignment(temp, expression);
|
|
96154
96069
|
ts.setTextRange(temp, node);
|
|
96155
96070
|
}
|
|
96156
|
-
ts.Debug.assert(expression);
|
|
96157
96071
|
expression = factory.createReflectSetCall(superClassReference, setterName, expression, classConstructor);
|
|
96158
96072
|
ts.setOriginalNode(expression, node);
|
|
96159
96073
|
ts.setTextRange(expression, node);
|
|
@@ -96913,7 +96827,6 @@ var ts;
|
|
|
96913
96827
|
function getPropertyNameExpressionIfNeeded(name, shouldHoist) {
|
|
96914
96828
|
if (ts.isComputedPropertyName(name)) {
|
|
96915
96829
|
var expression = ts.visitNode(name.expression, visitor, ts.isExpression);
|
|
96916
|
-
ts.Debug.assert(expression);
|
|
96917
96830
|
var innerExpression = ts.skipPartiallyEmittedExpressions(expression);
|
|
96918
96831
|
var inlinable = ts.isSimpleInlineableExpression(innerExpression);
|
|
96919
96832
|
var alreadyTransformed = ts.isAssignmentExpression(innerExpression) && ts.isGeneratedIdentifier(innerExpression.left);
|
|
@@ -97237,8 +97150,7 @@ var ts;
|
|
|
97237
97150
|
//
|
|
97238
97151
|
// Transformation:
|
|
97239
97152
|
// [ { set value(x) { this.#myProp = x; } }.value ] = [ "hello" ];
|
|
97240
|
-
return factory.updateArrayLiteralExpression(node, ts.visitNodes(node.elements, visitArrayAssignmentTarget, ts.isExpression)
|
|
97241
|
-
);
|
|
97153
|
+
return factory.updateArrayLiteralExpression(node, ts.visitNodes(node.elements, visitArrayAssignmentTarget, ts.isExpression));
|
|
97242
97154
|
}
|
|
97243
97155
|
else {
|
|
97244
97156
|
// Transforms private names in destructuring assignment object bindings.
|
|
@@ -97958,7 +97870,7 @@ var ts;
|
|
|
97958
97870
|
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor, ts.isHeritageClause), ts.visitNodes(node.members, visitor, ts.isClassElement));
|
|
97959
97871
|
}
|
|
97960
97872
|
function visitConstructorDeclaration(node) {
|
|
97961
|
-
return factory.updateConstructorDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNodes(node.parameters, visitor, ts.
|
|
97873
|
+
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));
|
|
97962
97874
|
}
|
|
97963
97875
|
function finishClassElement(updated, original) {
|
|
97964
97876
|
if (updated !== original) {
|
|
@@ -97972,26 +97884,26 @@ var ts;
|
|
|
97972
97884
|
function visitMethodDeclaration(node) {
|
|
97973
97885
|
return finishClassElement(factory.updateMethodDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97974
97886
|
/*questionToken*/ undefined,
|
|
97975
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.
|
|
97887
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
97976
97888
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
97977
97889
|
}
|
|
97978
97890
|
function visitGetAccessorDeclaration(node) {
|
|
97979
|
-
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.
|
|
97891
|
+
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),
|
|
97980
97892
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)), node);
|
|
97981
97893
|
}
|
|
97982
97894
|
function visitSetAccessorDeclaration(node) {
|
|
97983
|
-
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.
|
|
97895
|
+
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);
|
|
97984
97896
|
}
|
|
97985
97897
|
function visitPropertyDeclaration(node) {
|
|
97986
97898
|
if (node.flags & 16777216 /* NodeFlags.Ambient */ || ts.hasSyntacticModifier(node, 2 /* ModifierFlags.Ambient */)) {
|
|
97987
97899
|
return undefined;
|
|
97988
97900
|
}
|
|
97989
|
-
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.
|
|
97901
|
+
return finishClassElement(factory.updatePropertyDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), ts.visitNode(node.name, visitor, ts.isPropertyName),
|
|
97990
97902
|
/*questionOrExclamationToken*/ undefined,
|
|
97991
97903
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression)), node);
|
|
97992
97904
|
}
|
|
97993
97905
|
function visitParameterDeclaration(node) {
|
|
97994
|
-
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.
|
|
97906
|
+
var updated = factory.updateParameterDeclaration(node, ts.elideNodes(factory, node.modifiers), node.dotDotDotToken, ts.visitNode(node.name, visitor, ts.isBindingName),
|
|
97995
97907
|
/*questionToken*/ undefined,
|
|
97996
97908
|
/*type*/ undefined, ts.visitNode(node.initializer, visitor, ts.isExpression));
|
|
97997
97909
|
if (updated !== node) {
|
|
@@ -98165,7 +98077,7 @@ var ts;
|
|
|
98165
98077
|
* @param decorator The decorator node.
|
|
98166
98078
|
*/
|
|
98167
98079
|
function transformDecorator(decorator) {
|
|
98168
|
-
return ts.
|
|
98080
|
+
return ts.visitNode(decorator.expression, visitor, ts.isExpression);
|
|
98169
98081
|
}
|
|
98170
98082
|
/**
|
|
98171
98083
|
* Transforms the decorators of a parameter.
|
|
@@ -98476,7 +98388,7 @@ var ts;
|
|
|
98476
98388
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
98477
98389
|
}
|
|
98478
98390
|
function visitForOfStatementInAsyncBody(node) {
|
|
98479
|
-
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.
|
|
98391
|
+
return factory.updateForOfStatement(node, ts.visitNode(node.awaitModifier, visitor, ts.isToken), isVariableDeclarationListWithCollidingName(node.initializer)
|
|
98480
98392
|
? visitVariableDeclarationListWithCollidingNames(node.initializer, /*hasReceiver*/ true)
|
|
98481
98393
|
: ts.visitNode(node.initializer, visitor, ts.isForInitializer), ts.visitNode(node.expression, visitor, ts.isExpression), ts.visitIterationBody(node.statement, asyncBodyVisitor, context));
|
|
98482
98394
|
}
|
|
@@ -98541,7 +98453,7 @@ var ts;
|
|
|
98541
98453
|
* @param node The node to visit.
|
|
98542
98454
|
*/
|
|
98543
98455
|
function visitFunctionExpression(node) {
|
|
98544
|
-
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
98456
|
+
return factory.updateFunctionExpression(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike), node.asteriskToken, node.name,
|
|
98545
98457
|
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
98546
98458
|
/*type*/ undefined, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
98547
98459
|
? transformAsyncFunctionBody(node)
|
|
@@ -98556,7 +98468,7 @@ var ts;
|
|
|
98556
98468
|
* @param node The node to visit.
|
|
98557
98469
|
*/
|
|
98558
98470
|
function visitArrowFunction(node) {
|
|
98559
|
-
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.
|
|
98471
|
+
return factory.updateArrowFunction(node, ts.visitNodes(node.modifiers, visitor, ts.isModifierLike),
|
|
98560
98472
|
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, visitor, context),
|
|
98561
98473
|
/*type*/ undefined, node.equalsGreaterThanToken, ts.getFunctionFlags(node) & 2 /* FunctionFlags.Async */
|
|
98562
98474
|
? transformAsyncFunctionBody(node)
|
|
@@ -98612,7 +98524,7 @@ var ts;
|
|
|
98612
98524
|
}
|
|
98613
98525
|
function transformInitializedVariable(node) {
|
|
98614
98526
|
var converted = ts.setSourceMapRange(factory.createAssignment(factory.converters.convertToAssignmentElementTarget(node.name), node.initializer), node);
|
|
98615
|
-
return ts.
|
|
98527
|
+
return ts.visitNode(converted, visitor, ts.isExpression);
|
|
98616
98528
|
}
|
|
98617
98529
|
function collidesWithParameterName(_a) {
|
|
98618
98530
|
var name = _a.name;
|
|
@@ -99476,7 +99388,7 @@ var ts;
|
|
|
99476
99388
|
? ts.visitNodes(node.modifiers, visitorNoAsyncModifier, ts.isModifierLike)
|
|
99477
99389
|
: node.modifiers, enclosingFunctionFlags & 2 /* FunctionFlags.Async */
|
|
99478
99390
|
? undefined
|
|
99479
|
-
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.
|
|
99391
|
+
: node.asteriskToken, ts.visitNode(node.name, visitor, ts.isPropertyName), ts.visitNode(/*questionToken*/ undefined, visitor, ts.isToken),
|
|
99480
99392
|
/*typeParameters*/ undefined, ts.visitParameterList(node.parameters, parameterVisitor, context),
|
|
99481
99393
|
/*type*/ undefined, enclosingFunctionFlags & 2 /* FunctionFlags.Async */ && enclosingFunctionFlags & 1 /* FunctionFlags.Generator */
|
|
99482
99394
|
? transformAsyncGeneratorFunctionBody(node)
|
|
@@ -100365,7 +100277,7 @@ var ts;
|
|
|
100365
100277
|
return ts.singleOrUndefined(expressions) || emitHelpers().createAssignHelper(expressions);
|
|
100366
100278
|
}
|
|
100367
100279
|
function transformJsxSpreadAttributeToExpression(node) {
|
|
100368
|
-
return ts.
|
|
100280
|
+
return ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
100369
100281
|
}
|
|
100370
100282
|
function transformJsxAttributeToObjectLiteralElement(node) {
|
|
100371
100283
|
var name = getAttributeName(node);
|
|
@@ -102033,7 +101945,6 @@ var ts;
|
|
|
102033
101945
|
var sourceMapRange = ts.getSourceMapRange(member);
|
|
102034
101946
|
var memberFunction = transformFunctionLikeToExpression(member, /*location*/ member, /*name*/ undefined, container);
|
|
102035
101947
|
var propertyName = ts.visitNode(member.name, visitor, ts.isPropertyName);
|
|
102036
|
-
ts.Debug.assert(propertyName);
|
|
102037
101948
|
var e;
|
|
102038
101949
|
if (!ts.isPrivateIdentifier(propertyName) && ts.getUseDefineForClassFields(context.getCompilerOptions())) {
|
|
102039
101950
|
var name = ts.isComputedPropertyName(propertyName) ? propertyName.expression
|
|
@@ -102086,7 +101997,6 @@ var ts;
|
|
|
102086
101997
|
ts.setEmitFlags(target, 1536 /* EmitFlags.NoComments */ | 32 /* EmitFlags.NoTrailingSourceMap */);
|
|
102087
101998
|
ts.setSourceMapRange(target, firstAccessor.name);
|
|
102088
101999
|
var visitedAccessorName = ts.visitNode(firstAccessor.name, visitor, ts.isPropertyName);
|
|
102089
|
-
ts.Debug.assert(visitedAccessorName);
|
|
102090
102000
|
if (ts.isPrivateIdentifier(visitedAccessorName)) {
|
|
102091
102001
|
return ts.Debug.failBadSyntaxKind(visitedAccessorName, "Encountered unhandled private identifier while transforming ES2015.");
|
|
102092
102002
|
}
|
|
@@ -102361,7 +102271,6 @@ var ts;
|
|
|
102361
102271
|
var visited = ts.visitNode(element, i < node.elements.length - 1 ? visitorWithUnusedExpressionResult : visitor, ts.isExpression);
|
|
102362
102272
|
if (result || visited !== element) {
|
|
102363
102273
|
result || (result = node.elements.slice(0, i));
|
|
102364
|
-
ts.Debug.assert(visited);
|
|
102365
102274
|
result.push(visited);
|
|
102366
102275
|
}
|
|
102367
102276
|
}
|
|
@@ -102421,7 +102330,6 @@ var ts;
|
|
|
102421
102330
|
var declarations = ts.flatMap(node.declarations, node.flags & 1 /* NodeFlags.Let */
|
|
102422
102331
|
? visitVariableDeclarationInLetDeclarationList
|
|
102423
102332
|
: visitVariableDeclaration);
|
|
102424
|
-
ts.Debug.assertEachNode(declarations, ts.isVariableDeclaration); // TODO(jakebailey): side effect of VisitResult.
|
|
102425
102333
|
var declarationList = factory.createVariableDeclarationList(declarations);
|
|
102426
102334
|
ts.setOriginalNode(declarationList, node);
|
|
102427
102335
|
ts.setTextRange(declarationList, node);
|
|
@@ -102641,7 +102549,6 @@ var ts;
|
|
|
102641
102549
|
}
|
|
102642
102550
|
else {
|
|
102643
102551
|
var statement = ts.visitNode(node.statement, visitor, ts.isStatement, factory.liftToBlock);
|
|
102644
|
-
ts.Debug.assert(statement);
|
|
102645
102552
|
if (ts.isBlock(statement)) {
|
|
102646
102553
|
return factory.updateBlock(statement, ts.setTextRange(factory.createNodeArray(ts.concatenate(statements, statement.statements)), statement.statements));
|
|
102647
102554
|
}
|
|
@@ -102677,7 +102584,6 @@ var ts;
|
|
|
102677
102584
|
// Note also that because an extra statement is needed to assign to the LHS,
|
|
102678
102585
|
// for-of bodies are always emitted as blocks.
|
|
102679
102586
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
102680
|
-
ts.Debug.assert(expression);
|
|
102681
102587
|
// In the case where the user wrote an identifier as the RHS, like this:
|
|
102682
102588
|
//
|
|
102683
102589
|
// for (let v of arr) { }
|
|
@@ -102703,7 +102609,6 @@ var ts;
|
|
|
102703
102609
|
}
|
|
102704
102610
|
function convertForOfStatementForIterable(node, outermostLabeledStatement, convertedLoopBodyStatements, ancestorFacts) {
|
|
102705
102611
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
102706
|
-
ts.Debug.assert(expression);
|
|
102707
102612
|
var iterator = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(expression) : factory.createTempVariable(/*recordTempVariable*/ undefined);
|
|
102708
102613
|
var result = ts.isIdentifier(expression) ? factory.getGeneratedNameForNode(iterator) : factory.createTempVariable(/*recordTempVariable*/ undefined);
|
|
102709
102614
|
var errorRecord = factory.createUniqueName("e");
|
|
@@ -103132,7 +103037,6 @@ var ts;
|
|
|
103132
103037
|
statements.push(factory.createIfStatement(factory.createPrefixUnaryExpression(53 /* SyntaxKind.ExclamationToken */, ts.visitNode(node.condition, visitor, ts.isExpression)), ts.visitNode(factory.createBreakStatement(), visitor, ts.isStatement)));
|
|
103133
103038
|
}
|
|
103134
103039
|
}
|
|
103135
|
-
ts.Debug.assert(statement);
|
|
103136
103040
|
if (ts.isBlock(statement)) {
|
|
103137
103041
|
ts.addRange(statements, statement.statements);
|
|
103138
103042
|
}
|
|
@@ -103773,9 +103677,7 @@ var ts;
|
|
|
103773
103677
|
return ts.map(chunk, visitExpressionOfSpread);
|
|
103774
103678
|
}
|
|
103775
103679
|
function visitExpressionOfSpread(node) {
|
|
103776
|
-
ts.Debug.assertNode(node, ts.isSpreadElement);
|
|
103777
103680
|
var expression = ts.visitNode(node.expression, visitor, ts.isExpression);
|
|
103778
|
-
ts.Debug.assert(expression);
|
|
103779
103681
|
// We don't need to pack already packed array literals, or existing calls to the `__read` helper.
|
|
103780
103682
|
var isCallToReadHelper = ts.isCallToHelper(expression, "___read");
|
|
103781
103683
|
var kind = isCallToReadHelper || ts.isPackedArrayLiteral(expression) ? 2 /* SpreadSegmentKind.PackedSpread */ : 1 /* SpreadSegmentKind.UnpackedSpread */;
|
|
@@ -103843,7 +103745,7 @@ var ts;
|
|
|
103843
103745
|
var expression = factory.createStringLiteral(node.head.text);
|
|
103844
103746
|
for (var _i = 0, _a = node.templateSpans; _i < _a.length; _i++) {
|
|
103845
103747
|
var span = _a[_i];
|
|
103846
|
-
var args = [ts.
|
|
103748
|
+
var args = [ts.visitNode(span.expression, visitor, ts.isExpression)];
|
|
103847
103749
|
if (span.literal.text.length > 0) {
|
|
103848
103750
|
args.push(factory.createStringLiteral(span.literal.text));
|
|
103849
103751
|
}
|
|
@@ -104744,7 +104646,7 @@ var ts;
|
|
|
104744
104646
|
// .yield resumeLabel
|
|
104745
104647
|
// .mark resumeLabel
|
|
104746
104648
|
// _a.b = %sent%;
|
|
104747
|
-
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.
|
|
104649
|
+
target = factory.updatePropertyAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), left.name);
|
|
104748
104650
|
break;
|
|
104749
104651
|
case 209 /* SyntaxKind.ElementAccessExpression */:
|
|
104750
104652
|
// [source]
|
|
@@ -104757,7 +104659,7 @@ var ts;
|
|
|
104757
104659
|
// .yield resumeLabel
|
|
104758
104660
|
// .mark resumeLabel
|
|
104759
104661
|
// _a[_b] = %sent%;
|
|
104760
|
-
target = factory.updateElementAccessExpression(left, cacheExpression(ts.
|
|
104662
|
+
target = factory.updateElementAccessExpression(left, cacheExpression(ts.visitNode(left.expression, visitor, ts.isLeftHandSideExpression)), cacheExpression(ts.visitNode(left.argumentExpression, visitor, ts.isExpression)));
|
|
104761
104663
|
break;
|
|
104762
104664
|
default:
|
|
104763
104665
|
target = ts.visitNode(left, visitor, ts.isExpression);
|
|
@@ -105075,7 +104977,7 @@ var ts;
|
|
|
105075
104977
|
// .yield resumeLabel
|
|
105076
104978
|
// .mark resumeLabel
|
|
105077
104979
|
// a = _a[%sent%]
|
|
105078
|
-
return factory.updateElementAccessExpression(node, cacheExpression(ts.
|
|
104980
|
+
return factory.updateElementAccessExpression(node, cacheExpression(ts.visitNode(node.expression, visitor, ts.isLeftHandSideExpression)), ts.visitNode(node.argumentExpression, visitor, ts.isExpression));
|
|
105079
104981
|
}
|
|
105080
104982
|
return ts.visitEachChild(node, visitor, context);
|
|
105081
104983
|
}
|
|
@@ -105092,7 +104994,7 @@ var ts;
|
|
|
105092
104994
|
// .mark resumeLabel
|
|
105093
104995
|
// _b.apply(_a, _c.concat([%sent%, 2]));
|
|
105094
104996
|
var _a = factory.createCallBinding(node.expression, hoistVariableDeclaration, languageVersion, /*cacheIdentifiers*/ true), target = _a.target, thisArg = _a.thisArg;
|
|
105095
|
-
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionApplyCall(cacheExpression(ts.
|
|
104997
|
+
return ts.setOriginalNode(ts.setTextRange(factory.createFunctionApplyCall(cacheExpression(ts.visitNode(target, visitor, ts.isLeftHandSideExpression)), thisArg, visitElements(node.arguments)), node), node);
|
|
105096
104998
|
}
|
|
105097
104999
|
return ts.visitEachChild(node, visitor, context);
|
|
105098
105000
|
}
|
|
@@ -107077,7 +106979,7 @@ var ts;
|
|
|
107077
106979
|
*/
|
|
107078
106980
|
function addExportEqualsIfNeeded(statements, emitAsReturn) {
|
|
107079
106981
|
if (currentModuleInfo.exportEquals) {
|
|
107080
|
-
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor
|
|
106982
|
+
var expressionResult = ts.visitNode(currentModuleInfo.exportEquals.expression, visitor);
|
|
107081
106983
|
if (expressionResult) {
|
|
107082
106984
|
if (emitAsReturn) {
|
|
107083
106985
|
var statement = factory.createReturnStatement(expressionResult);
|
|
@@ -107277,7 +107179,7 @@ var ts;
|
|
|
107277
107179
|
}
|
|
107278
107180
|
function visitImportCallExpression(node) {
|
|
107279
107181
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
107280
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
107182
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
107281
107183
|
// Only use the external module name if it differs from the first argument. This allows us to preserve the quote style of the argument on output.
|
|
107282
107184
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
107283
107185
|
var containsLexicalThis = !!(node.transformFlags & 16384 /* TransformFlags.ContainsLexicalThis */);
|
|
@@ -107625,7 +107527,7 @@ var ts;
|
|
|
107625
107527
|
var statements;
|
|
107626
107528
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
107627
107529
|
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createFunctionDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifier), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
107628
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor
|
|
107530
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor),
|
|
107629
107531
|
/*type*/ undefined, ts.visitEachChild(node.body, visitor, context)),
|
|
107630
107532
|
/*location*/ node),
|
|
107631
107533
|
/*original*/ node));
|
|
@@ -107652,7 +107554,7 @@ var ts;
|
|
|
107652
107554
|
var statements;
|
|
107653
107555
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
107654
107556
|
statements = ts.append(statements, ts.setOriginalNode(ts.setTextRange(factory.createClassDeclaration(ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
107655
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor
|
|
107557
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.heritageClauses, visitor), ts.visitNodes(node.members, visitor)), node), node));
|
|
107656
107558
|
}
|
|
107657
107559
|
else {
|
|
107658
107560
|
statements = ts.append(statements, ts.visitEachChild(node, visitor, context));
|
|
@@ -107692,7 +107594,7 @@ var ts;
|
|
|
107692
107594
|
if (!ts.isBindingPattern(variable.name) && (ts.isArrowFunction(variable.initializer) || ts.isFunctionExpression(variable.initializer) || ts.isClassExpression(variable.initializer))) {
|
|
107693
107595
|
var expression = factory.createAssignment(ts.setTextRange(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), variable.name),
|
|
107694
107596
|
/*location*/ variable.name), factory.createIdentifier(ts.getTextOfIdentifierOrLiteral(variable.name)));
|
|
107695
|
-
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor
|
|
107597
|
+
var updatedVariable = factory.createVariableDeclaration(variable.name, variable.exclamationToken, variable.type, ts.visitNode(variable.initializer, visitor));
|
|
107696
107598
|
variables = ts.append(variables, updatedVariable);
|
|
107697
107599
|
expressions = ts.append(expressions, expression);
|
|
107698
107600
|
removeCommentsOnExpressions = true;
|
|
@@ -108720,7 +108622,7 @@ var ts;
|
|
|
108720
108622
|
function visitFunctionDeclaration(node) {
|
|
108721
108623
|
if (ts.hasSyntacticModifier(node, 1 /* ModifierFlags.Export */)) {
|
|
108722
108624
|
hoistedStatements = ts.append(hoistedStatements, factory.updateFunctionDeclaration(node, ts.visitNodes(node.modifiers, modifierVisitor, ts.isModifierLike), node.asteriskToken, factory.getDeclarationName(node, /*allowComments*/ true, /*allowSourceMaps*/ true),
|
|
108723
|
-
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.
|
|
108625
|
+
/*typeParameters*/ undefined, ts.visitNodes(node.parameters, visitor, ts.isParameterDeclaration),
|
|
108724
108626
|
/*type*/ undefined, ts.visitNode(node.body, visitor, ts.isBlock)));
|
|
108725
108627
|
}
|
|
108726
108628
|
else {
|
|
@@ -109236,7 +109138,7 @@ var ts;
|
|
|
109236
109138
|
return expressions ? factory.inlineExpressions(expressions) : factory.createOmittedExpression();
|
|
109237
109139
|
}
|
|
109238
109140
|
else {
|
|
109239
|
-
return ts.visitNode(node, discardedValueVisitor, ts.
|
|
109141
|
+
return ts.visitNode(node, discardedValueVisitor, ts.isExpression);
|
|
109240
109142
|
}
|
|
109241
109143
|
}
|
|
109242
109144
|
/**
|
|
@@ -109408,7 +109310,7 @@ var ts;
|
|
|
109408
109310
|
// };
|
|
109409
109311
|
// });
|
|
109410
109312
|
var externalModuleName = ts.getExternalModuleNameLiteral(factory, node, currentSourceFile, host, resolver, compilerOptions);
|
|
109411
|
-
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor
|
|
109313
|
+
var firstArgument = ts.visitNode(ts.firstOrUndefined(node.arguments), visitor);
|
|
109412
109314
|
// Only use the external module name if it differs from the first argument. This allows us to preserve the quote style of the argument on output.
|
|
109413
109315
|
var argument = externalModuleName && (!firstArgument || !ts.isStringLiteral(firstArgument) || firstArgument.text !== externalModuleName.text) ? externalModuleName : firstArgument;
|
|
109414
109316
|
return factory.createCallExpression(factory.createPropertyAccessExpression(contextObject, factory.createIdentifier("import")),
|
|
@@ -110628,7 +110530,7 @@ var ts;
|
|
|
110628
110530
|
var _a;
|
|
110629
110531
|
var primaryDeclaration = (_a = parentSymbol.declarations) === null || _a === void 0 ? void 0 : _a.find(function (d) { return ts.getSourceFileOfNode(d) === containingFile; });
|
|
110630
110532
|
var augmentingDeclarations = ts.filter(symbol.declarations, function (d) { return ts.getSourceFileOfNode(d) !== containingFile; });
|
|
110631
|
-
if (augmentingDeclarations) {
|
|
110533
|
+
if (primaryDeclaration && augmentingDeclarations) {
|
|
110632
110534
|
for (var _i = 0, augmentingDeclarations_1 = augmentingDeclarations; _i < augmentingDeclarations_1.length; _i++) {
|
|
110633
110535
|
var augmentations = augmentingDeclarations_1[_i];
|
|
110634
110536
|
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)));
|
|
@@ -110683,12 +110585,12 @@ var ts;
|
|
|
110683
110585
|
if (ts.isExternalOrCommonJsModule(sourceFile) || ts.isJsonSourceFile(sourceFile)) {
|
|
110684
110586
|
resultHasExternalModuleIndicator = false; // unused in external module bundle emit (all external modules are within module blocks, therefore are known to be modules)
|
|
110685
110587
|
needsDeclare = false;
|
|
110686
|
-
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, /*bundled*/ true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
110588
|
+
var statements = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile, /*bundled*/ true)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
110687
110589
|
var newFile = factory.updateSourceFile(sourceFile, [factory.createModuleDeclaration([factory.createModifier(136 /* SyntaxKind.DeclareKeyword */)], factory.createStringLiteral(ts.getResolvedExternalModuleName(context.getEmitHost(), sourceFile)), factory.createModuleBlock(ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), sourceFile.statements)))], /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []);
|
|
110688
110590
|
return newFile;
|
|
110689
110591
|
}
|
|
110690
110592
|
needsDeclare = true;
|
|
110691
|
-
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements
|
|
110593
|
+
var updated = ts.isSourceFileJS(sourceFile) ? factory.createNodeArray(transformDeclarationsForJS(sourceFile)) : ts.visitNodes(sourceFile.statements, visitDeclarationStatements);
|
|
110692
110594
|
return factory.updateSourceFile(sourceFile, transformAndReplaceLatePaintedStatements(updated), /*isDeclarationFile*/ true, /*referencedFiles*/ [], /*typeReferences*/ [], /*hasNoDefaultLib*/ false, /*libReferences*/ []);
|
|
110693
110595
|
}), ts.mapDefined(node.prepends, function (prepend) {
|
|
110694
110596
|
if (prepend.kind === 311 /* SyntaxKind.InputFiles */) {
|
|
@@ -110735,7 +110637,7 @@ var ts;
|
|
|
110735
110637
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
110736
110638
|
}
|
|
110737
110639
|
else {
|
|
110738
|
-
var statements = ts.visitNodes(node.statements, visitDeclarationStatements
|
|
110640
|
+
var statements = ts.visitNodes(node.statements, visitDeclarationStatements);
|
|
110739
110641
|
combinedStatements = ts.setTextRange(factory.createNodeArray(transformAndReplaceLatePaintedStatements(statements)), node.statements);
|
|
110740
110642
|
refs.forEach(referenceVisitor);
|
|
110741
110643
|
emittedImports = ts.filter(combinedStatements, ts.isAnyImportSyntax);
|
|
@@ -110833,10 +110735,10 @@ var ts;
|
|
|
110833
110735
|
}
|
|
110834
110736
|
else {
|
|
110835
110737
|
if (name.kind === 204 /* SyntaxKind.ArrayBindingPattern */) {
|
|
110836
|
-
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
110738
|
+
return factory.updateArrayBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
110837
110739
|
}
|
|
110838
110740
|
else {
|
|
110839
|
-
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement
|
|
110741
|
+
return factory.updateObjectBindingPattern(name, ts.visitNodes(name.elements, visitBindingElement));
|
|
110840
110742
|
}
|
|
110841
110743
|
}
|
|
110842
110744
|
function visitBindingElement(elem) {
|
|
@@ -110886,10 +110788,10 @@ var ts;
|
|
|
110886
110788
|
(resolver.isRequiredInitializedParameter(node) ||
|
|
110887
110789
|
resolver.isOptionalUninitializedParameterProperty(node));
|
|
110888
110790
|
if (type && !shouldUseResolverType) {
|
|
110889
|
-
return ts.visitNode(type, visitDeclarationSubtree
|
|
110791
|
+
return ts.visitNode(type, visitDeclarationSubtree);
|
|
110890
110792
|
}
|
|
110891
110793
|
if (!ts.getParseTreeNode(node)) {
|
|
110892
|
-
return type ? ts.visitNode(type, visitDeclarationSubtree
|
|
110794
|
+
return type ? ts.visitNode(type, visitDeclarationSubtree) : factory.createKeywordTypeNode(131 /* SyntaxKind.AnyKeyword */);
|
|
110893
110795
|
}
|
|
110894
110796
|
if (node.kind === 175 /* SyntaxKind.SetAccessor */) {
|
|
110895
110797
|
// Set accessors with no associated type node (from it's param or get accessor return) are `any` since they are never contextually typed right now
|
|
@@ -111002,7 +110904,7 @@ var ts;
|
|
|
111002
110904
|
return factory.createNodeArray(newParams || ts.emptyArray);
|
|
111003
110905
|
}
|
|
111004
110906
|
function ensureTypeParams(node, params) {
|
|
111005
|
-
return ts.hasEffectiveModifier(node, 8 /* ModifierFlags.Private */) ? undefined : ts.visitNodes(params, visitDeclarationSubtree
|
|
110907
|
+
return ts.hasEffectiveModifier(node, 8 /* ModifierFlags.Private */) ? undefined : ts.visitNodes(params, visitDeclarationSubtree);
|
|
111006
110908
|
}
|
|
111007
110909
|
function isEnclosingDeclaration(node) {
|
|
111008
110910
|
return ts.isSourceFile(node)
|
|
@@ -111134,7 +111036,6 @@ var ts;
|
|
|
111134
111036
|
var key = ts.getOriginalNodeId(statement);
|
|
111135
111037
|
if (lateStatementReplacementMap.has(key)) {
|
|
111136
111038
|
var result = lateStatementReplacementMap.get(key);
|
|
111137
|
-
ts.Debug.type(result);
|
|
111138
111039
|
lateStatementReplacementMap.delete(key);
|
|
111139
111040
|
if (result) {
|
|
111140
111041
|
if (ts.isArray(result) ? ts.some(result, ts.needsScopeMarker) : ts.needsScopeMarker(result)) {
|
|
@@ -111282,17 +111183,13 @@ var ts;
|
|
|
111282
111183
|
case 191 /* SyntaxKind.ConditionalType */: {
|
|
111283
111184
|
// We have to process conditional types in a special way because for visibility purposes we need to push a new enclosingDeclaration
|
|
111284
111185
|
// just for the `infer` types in the true branch. It's an implicit declaration scope that only applies to _part_ of the type.
|
|
111285
|
-
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree
|
|
111286
|
-
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree
|
|
111186
|
+
var checkType = ts.visitNode(input.checkType, visitDeclarationSubtree);
|
|
111187
|
+
var extendsType = ts.visitNode(input.extendsType, visitDeclarationSubtree);
|
|
111287
111188
|
var oldEnclosingDecl = enclosingDeclaration;
|
|
111288
111189
|
enclosingDeclaration = input.trueType;
|
|
111289
|
-
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree
|
|
111190
|
+
var trueType = ts.visitNode(input.trueType, visitDeclarationSubtree);
|
|
111290
111191
|
enclosingDeclaration = oldEnclosingDecl;
|
|
111291
|
-
var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree
|
|
111292
|
-
ts.Debug.assert(checkType);
|
|
111293
|
-
ts.Debug.assert(extendsType);
|
|
111294
|
-
ts.Debug.assert(trueType);
|
|
111295
|
-
ts.Debug.assert(falseType);
|
|
111192
|
+
var falseType = ts.visitNode(input.falseType, visitDeclarationSubtree);
|
|
111296
111193
|
return cleanup(factory.updateConditionalTypeNode(input, checkType, extendsType, trueType, falseType));
|
|
111297
111194
|
}
|
|
111298
111195
|
case 181 /* SyntaxKind.FunctionType */: {
|
|
@@ -111430,7 +111327,7 @@ var ts;
|
|
|
111430
111327
|
return clean;
|
|
111431
111328
|
}
|
|
111432
111329
|
case 261 /* SyntaxKind.InterfaceDeclaration */: {
|
|
111433
|
-
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
111330
|
+
return cleanup(factory.updateInterfaceDeclaration(input, ensureModifiers(input), input.name, ensureTypeParams(input, input.typeParameters), transformHeritageClauses(input.heritageClauses), ts.visitNodes(input.members, visitDeclarationSubtree)));
|
|
111434
111331
|
}
|
|
111435
111332
|
case 259 /* SyntaxKind.FunctionDeclaration */: {
|
|
111436
111333
|
// Generators lose their generator-ness, excepting their return type
|
|
@@ -111502,7 +111399,7 @@ var ts;
|
|
|
111502
111399
|
var oldHasScopeFix = resultHasScopeMarker;
|
|
111503
111400
|
resultHasScopeMarker = false;
|
|
111504
111401
|
needsScopeFixMarker = false;
|
|
111505
|
-
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements
|
|
111402
|
+
var statements = ts.visitNodes(inner.statements, visitDeclarationStatements);
|
|
111506
111403
|
var lateStatements = transformAndReplaceLatePaintedStatements(statements);
|
|
111507
111404
|
if (input.flags & 16777216 /* NodeFlags.Ambient */) {
|
|
111508
111405
|
needsScopeFixMarker = false; // If it was `declare`'d everything is implicitly exported already, ignore late printed "privates"
|
|
@@ -111587,7 +111484,7 @@ var ts;
|
|
|
111587
111484
|
/*type*/ undefined,
|
|
111588
111485
|
/*initializer*/ undefined)
|
|
111589
111486
|
] : undefined;
|
|
111590
|
-
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree
|
|
111487
|
+
var memberNodes = ts.concatenate(ts.concatenate(privateIdentifier, parameterProperties), ts.visitNodes(input.members, visitDeclarationSubtree));
|
|
111591
111488
|
var members = factory.createNodeArray(memberNodes);
|
|
111592
111489
|
var extendsClause_1 = ts.getEffectiveBaseTypeNode(input);
|
|
111593
111490
|
if (extendsClause_1 && !ts.isEntityNameExpression(extendsClause_1.expression) && extendsClause_1.expression.kind !== 104 /* SyntaxKind.NullKeyword */) {
|
|
@@ -111605,11 +111502,11 @@ var ts;
|
|
|
111605
111502
|
if (clause.token === 94 /* SyntaxKind.ExtendsKeyword */) {
|
|
111606
111503
|
var oldDiag_2 = getSymbolAccessibilityDiagnostic;
|
|
111607
111504
|
getSymbolAccessibilityDiagnostic = ts.createGetSymbolAccessibilityDiagnosticForNode(clause.types[0]);
|
|
111608
|
-
var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree
|
|
111505
|
+
var newClause = factory.updateHeritageClause(clause, ts.map(clause.types, function (t) { return factory.updateExpressionWithTypeArguments(t, newId_1, ts.visitNodes(t.typeArguments, visitDeclarationSubtree)); }));
|
|
111609
111506
|
getSymbolAccessibilityDiagnostic = oldDiag_2;
|
|
111610
111507
|
return newClause;
|
|
111611
111508
|
}
|
|
111612
|
-
return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104 /* SyntaxKind.NullKeyword */; })), visitDeclarationSubtree
|
|
111509
|
+
return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) { return ts.isEntityNameExpression(t.expression) || t.expression.kind === 104 /* SyntaxKind.NullKeyword */; })), visitDeclarationSubtree));
|
|
111613
111510
|
}));
|
|
111614
111511
|
return [statement, cleanup(factory.updateClassDeclaration(input, modifiers, input.name, typeParameters, heritageClauses, members))]; // TODO: GH#18217
|
|
111615
111512
|
}
|
|
@@ -111654,7 +111551,7 @@ var ts;
|
|
|
111654
111551
|
function transformVariableStatement(input) {
|
|
111655
111552
|
if (!ts.forEach(input.declarationList.declarations, getBindingNameVisible))
|
|
111656
111553
|
return;
|
|
111657
|
-
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree
|
|
111554
|
+
var nodes = ts.visitNodes(input.declarationList.declarations, visitDeclarationSubtree);
|
|
111658
111555
|
if (!ts.length(nodes))
|
|
111659
111556
|
return;
|
|
111660
111557
|
return factory.updateVariableStatement(input, factory.createNodeArray(ensureModifiers(input)), factory.updateVariableDeclarationList(input.declarationList, nodes));
|
|
@@ -111737,7 +111634,7 @@ var ts;
|
|
|
111737
111634
|
function transformHeritageClauses(nodes) {
|
|
111738
111635
|
return factory.createNodeArray(ts.filter(ts.map(nodes, function (clause) { return factory.updateHeritageClause(clause, ts.visitNodes(factory.createNodeArray(ts.filter(clause.types, function (t) {
|
|
111739
111636
|
return ts.isEntityNameExpression(t.expression) || (clause.token === 94 /* SyntaxKind.ExtendsKeyword */ && t.expression.kind === 104 /* SyntaxKind.NullKeyword */);
|
|
111740
|
-
})), visitDeclarationSubtree
|
|
111637
|
+
})), visitDeclarationSubtree)); }), function (clause) { return clause.types && !!clause.types.length; }));
|
|
111741
111638
|
}
|
|
111742
111639
|
}
|
|
111743
111640
|
ts.transformDeclarations = transformDeclarations;
|
|
@@ -118682,7 +118579,6 @@ var ts;
|
|
|
118682
118579
|
return resolutions;
|
|
118683
118580
|
}
|
|
118684
118581
|
ts.loadWithTypeDirectiveCache = loadWithTypeDirectiveCache;
|
|
118685
|
-
;
|
|
118686
118582
|
/**
|
|
118687
118583
|
* Calculates the resulting resolution mode for some reference in some file - this is generally the explicitly
|
|
118688
118584
|
* provided resolution mode in the reference, unless one is not present, in which case it is the mode of the containing file.
|
|
@@ -125628,9 +125524,6 @@ var ts;
|
|
|
125628
125524
|
return "".concat(errorDiagnostic.file.fileName);
|
|
125629
125525
|
});
|
|
125630
125526
|
return filesInError.map(function (fileName) {
|
|
125631
|
-
if (fileName === undefined) {
|
|
125632
|
-
return undefined;
|
|
125633
|
-
}
|
|
125634
125527
|
var diagnosticForFileName = ts.find(diagnostics, function (diagnostic) {
|
|
125635
125528
|
return diagnostic.file !== undefined && diagnostic.file.fileName === fileName;
|
|
125636
125529
|
});
|
|
@@ -126267,8 +126160,6 @@ var ts;
|
|
|
126267
126160
|
parseConfigFile();
|
|
126268
126161
|
newLine = updateNewLine();
|
|
126269
126162
|
}
|
|
126270
|
-
ts.Debug.assert(compilerOptions);
|
|
126271
|
-
ts.Debug.assert(rootFileNames);
|
|
126272
126163
|
var _b = ts.createWatchFactory(host, compilerOptions), watchFile = _b.watchFile, watchDirectory = _b.watchDirectory, writeLog = _b.writeLog;
|
|
126273
126164
|
var getCanonicalFileName = ts.createGetCanonicalFileName(useCaseSensitiveFileNames);
|
|
126274
126165
|
writeLog("Current directory: ".concat(currentDirectory, " CaseSensitiveFileNames: ").concat(useCaseSensitiveFileNames));
|
|
@@ -126392,8 +126283,6 @@ var ts;
|
|
|
126392
126283
|
}
|
|
126393
126284
|
function synchronizeProgram() {
|
|
126394
126285
|
writeLog("Synchronizing program");
|
|
126395
|
-
ts.Debug.assert(compilerOptions);
|
|
126396
|
-
ts.Debug.assert(rootFileNames);
|
|
126397
126286
|
clearInvalidateResolutionsOfFailedLookupLocations();
|
|
126398
126287
|
var program = getCurrentBuilderProgram();
|
|
126399
126288
|
if (hasChangedCompilerOptions) {
|
|
@@ -126642,8 +126531,6 @@ var ts;
|
|
|
126642
126531
|
}
|
|
126643
126532
|
function reloadFileNamesFromConfigFile() {
|
|
126644
126533
|
writeLog("Reloading new file names and options");
|
|
126645
|
-
ts.Debug.assert(compilerOptions);
|
|
126646
|
-
ts.Debug.assert(configFileName);
|
|
126647
126534
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
126648
126535
|
rootFileNames = ts.getFileNamesFromConfigSpecs(compilerOptions.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost, extraFileExtensions);
|
|
126649
126536
|
if (ts.updateErrorForNoInputFiles(rootFileNames, ts.getNormalizedAbsolutePath(configFileName, currentDirectory), compilerOptions.configFile.configFileSpecs, configFileParsingDiagnostics, canConfigFileJsonReportNoInputFiles)) {
|
|
@@ -126653,7 +126540,6 @@ var ts;
|
|
|
126653
126540
|
synchronizeProgram();
|
|
126654
126541
|
}
|
|
126655
126542
|
function reloadConfigFile() {
|
|
126656
|
-
ts.Debug.assert(configFileName);
|
|
126657
126543
|
writeLog("Reloading config file: ".concat(configFileName));
|
|
126658
126544
|
reloadLevel = ts.ConfigFileProgramReloadLevel.None;
|
|
126659
126545
|
if (cachedDirectoryStructureHost) {
|
|
@@ -126668,7 +126554,6 @@ var ts;
|
|
|
126668
126554
|
updateExtendedConfigFilesWatches(toPath(configFileName), compilerOptions, watchOptions, ts.WatchType.ExtendedConfigFile);
|
|
126669
126555
|
}
|
|
126670
126556
|
function parseConfigFile() {
|
|
126671
|
-
ts.Debug.assert(configFileName);
|
|
126672
126557
|
setConfigFileParsingResult(ts.getParsedCommandLineOfConfigFile(configFileName, optionsToExtendForConfigFile, parseConfigFileHost, extendedConfigCache || (extendedConfigCache = new ts.Map()), watchOptionsToExtend, extraFileExtensions)); // TODO: GH#18217
|
|
126673
126558
|
}
|
|
126674
126559
|
function setConfigFileParsingResult(configFileParseResult) {
|
|
@@ -126690,7 +126575,6 @@ var ts;
|
|
|
126690
126575
|
// With host implementing getParsedCommandLine we cant just update file names
|
|
126691
126576
|
if (config.parsedCommandLine && config.reloadLevel === ts.ConfigFileProgramReloadLevel.Partial && !host.getParsedCommandLine) {
|
|
126692
126577
|
writeLog("Reloading new file names and options");
|
|
126693
|
-
ts.Debug.assert(compilerOptions);
|
|
126694
126578
|
var fileNames = ts.getFileNamesFromConfigSpecs(config.parsedCommandLine.options.configFile.configFileSpecs, ts.getNormalizedAbsolutePath(ts.getDirectoryPath(configFileName), currentDirectory), compilerOptions, parseConfigFileHost);
|
|
126695
126579
|
config.parsedCommandLine = __assign(__assign({}, config.parsedCommandLine), { fileNames: fileNames });
|
|
126696
126580
|
config.reloadLevel = undefined;
|
|
@@ -126777,8 +126661,7 @@ var ts;
|
|
|
126777
126661
|
}
|
|
126778
126662
|
function watchWildcardDirectory(directory, flags) {
|
|
126779
126663
|
return watchDirectory(directory, function (fileOrDirectory) {
|
|
126780
|
-
ts.Debug.assert(configFileName);
|
|
126781
|
-
ts.Debug.assert(compilerOptions);
|
|
126664
|
+
ts.Debug.assert(!!configFileName);
|
|
126782
126665
|
var fileOrDirectoryPath = toPath(fileOrDirectory);
|
|
126783
126666
|
// Since the file existence changed, update the sourceFiles cache
|
|
126784
126667
|
if (cachedDirectoryStructureHost) {
|
|
@@ -126808,7 +126691,6 @@ var ts;
|
|
|
126808
126691
|
}, flags, watchOptions, ts.WatchType.WildcardDirectory);
|
|
126809
126692
|
}
|
|
126810
126693
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions, watchType) {
|
|
126811
|
-
ts.Debug.assert(configFileName);
|
|
126812
126694
|
ts.updateSharedExtendedConfigFileWatcher(forProjectPath, options, sharedExtendedConfigFileWatchers || (sharedExtendedConfigFileWatchers = new ts.Map()), function (extendedConfigFileName, extendedConfigFilePath) { return watchFile(extendedConfigFileName, function (_fileName, eventKind) {
|
|
126813
126695
|
var _a;
|
|
126814
126696
|
updateCachedSystemWithFile(extendedConfigFileName, extendedConfigFilePath, eventKind);
|
|
@@ -131532,6 +131414,12 @@ var ts;
|
|
|
131532
131414
|
}
|
|
131533
131415
|
ts.getSynthesizedDeepCloneWithReplacements = getSynthesizedDeepCloneWithReplacements;
|
|
131534
131416
|
function getSynthesizedDeepCloneWorker(node, replaceNode) {
|
|
131417
|
+
var nodeClone = replaceNode
|
|
131418
|
+
? function (n) { return getSynthesizedDeepCloneWithReplacements(n, /*includeTrivia*/ true, replaceNode); }
|
|
131419
|
+
: getSynthesizedDeepClone;
|
|
131420
|
+
var nodesClone = replaceNode
|
|
131421
|
+
? function (ns) { return ns && getSynthesizedDeepClonesWithReplacements(ns, /*includeTrivia*/ true, replaceNode); }
|
|
131422
|
+
: function (ns) { return ns && getSynthesizedDeepClones(ns); };
|
|
131535
131423
|
var visited = ts.visitEachChild(node, nodeClone, ts.nullTransformationContext, nodesClone, nodeClone);
|
|
131536
131424
|
if (visited === node) {
|
|
131537
131425
|
// This only happens for leaf nodes - internal nodes always see their children change.
|
|
@@ -131545,16 +131433,6 @@ var ts;
|
|
|
131545
131433
|
// would have made.
|
|
131546
131434
|
visited.parent = undefined;
|
|
131547
131435
|
return visited;
|
|
131548
|
-
function nodeClone(node) {
|
|
131549
|
-
return replaceNode
|
|
131550
|
-
? getSynthesizedDeepCloneWithReplacements(node, /*includeTrivia*/ true, replaceNode)
|
|
131551
|
-
: getSynthesizedDeepClone(node);
|
|
131552
|
-
}
|
|
131553
|
-
function nodesClone(nodes) {
|
|
131554
|
-
return replaceNode
|
|
131555
|
-
? nodes && getSynthesizedDeepClonesWithReplacements(nodes, /*includeTrivia*/ true, replaceNode)
|
|
131556
|
-
: nodes && getSynthesizedDeepClones(nodes);
|
|
131557
|
-
}
|
|
131558
131436
|
}
|
|
131559
131437
|
function getSynthesizedDeepClones(nodes, includeTrivia) {
|
|
131560
131438
|
if (includeTrivia === void 0) { includeTrivia = true; }
|
|
@@ -132294,7 +132172,7 @@ var ts;
|
|
|
132294
132172
|
return false;
|
|
132295
132173
|
}
|
|
132296
132174
|
// If the file is a module written in TypeScript, it still might be in a `declare global` augmentation
|
|
132297
|
-
return ts.isInJSFile(declaration) || !ts.findAncestor(declaration,
|
|
132175
|
+
return ts.isInJSFile(declaration) || !ts.findAncestor(declaration, ts.isGlobalScopeAugmentation);
|
|
132298
132176
|
}
|
|
132299
132177
|
ts.isNonGlobalDeclaration = isNonGlobalDeclaration;
|
|
132300
132178
|
function isDeprecatedDeclaration(decl) {
|
|
@@ -134777,7 +134655,7 @@ var ts;
|
|
|
134777
134655
|
if (!dependencies)
|
|
134778
134656
|
continue;
|
|
134779
134657
|
for (var dep in dependencies) {
|
|
134780
|
-
if (
|
|
134658
|
+
if (ts.hasProperty(dependencies, dep) && !ts.startsWith(dep, "@types/")) {
|
|
134781
134659
|
result.push(dep);
|
|
134782
134660
|
}
|
|
134783
134661
|
}
|
|
@@ -135630,7 +135508,6 @@ var ts;
|
|
|
135630
135508
|
var labelDetails = { detail: signaturePrinter.printNode(4 /* EmitHint.Unspecified */, methodSignature, sourceFile) };
|
|
135631
135509
|
return { isSnippet: isSnippet, insertText: insertText, labelDetails: labelDetails };
|
|
135632
135510
|
}
|
|
135633
|
-
;
|
|
135634
135511
|
function createObjectLiteralMethod(symbol, enclosingDeclaration, sourceFile, program, host, preferences) {
|
|
135635
135512
|
var declarations = symbol.getDeclarations();
|
|
135636
135513
|
if (!(declarations && declarations.length)) {
|
|
@@ -138334,7 +138211,6 @@ var ts;
|
|
|
138334
138211
|
function isArrowFunctionBody(node) {
|
|
138335
138212
|
return node.parent && ts.isArrowFunction(node.parent) && node.parent.body === node;
|
|
138336
138213
|
}
|
|
138337
|
-
;
|
|
138338
138214
|
/** True if symbol is a type or a module containing at least one type. */
|
|
138339
138215
|
function symbolCanBeReferencedAtTypeLocation(symbol, checker, seenModules) {
|
|
138340
138216
|
if (seenModules === void 0) { seenModules = new ts.Map(); }
|
|
@@ -138618,7 +138494,7 @@ var ts;
|
|
|
138618
138494
|
// If we're an accessibility modifier, we're in an instance member and should search
|
|
138619
138495
|
// the constructor's parameter list for instance members as well.
|
|
138620
138496
|
if (modifierFlag & (28 /* ModifierFlags.AccessibilityModifier */ | 64 /* ModifierFlags.Readonly */)) {
|
|
138621
|
-
var constructor = ts.find(container.members, ts.isConstructorDeclaration);
|
|
138497
|
+
var constructor = ts.find(container.members, ts.isConstructorDeclaration);
|
|
138622
138498
|
if (constructor) {
|
|
138623
138499
|
return __spreadArray(__spreadArray([], nodes, true), constructor.parameters, true);
|
|
138624
138500
|
}
|
|
@@ -147502,7 +147378,7 @@ var ts;
|
|
|
147502
147378
|
return name === "undefined";
|
|
147503
147379
|
}
|
|
147504
147380
|
function isHintableDeclaration(node) {
|
|
147505
|
-
if ((ts.
|
|
147381
|
+
if ((ts.isParameterDeclaration(node) || ts.isVariableDeclaration(node) && ts.isVarConst(node)) && node.initializer) {
|
|
147506
147382
|
var initializer = ts.skipParentheses(node.initializer);
|
|
147507
147383
|
return !(isHintableLiteral(initializer) || ts.isNewExpression(initializer) || ts.isObjectLiteralExpression(initializer) || ts.isAssertionExpression(initializer));
|
|
147508
147384
|
}
|
|
@@ -149415,19 +149291,19 @@ var ts;
|
|
|
149415
149291
|
return function (context) { return context.options && context.options[optionName] === optionValue; };
|
|
149416
149292
|
}
|
|
149417
149293
|
function isOptionEnabled(optionName) {
|
|
149418
|
-
return function (context) { return context.options && context.options
|
|
149294
|
+
return function (context) { return context.options && ts.hasProperty(context.options, optionName) && !!context.options[optionName]; };
|
|
149419
149295
|
}
|
|
149420
149296
|
function isOptionDisabled(optionName) {
|
|
149421
|
-
return function (context) { return context.options && context.options
|
|
149297
|
+
return function (context) { return context.options && ts.hasProperty(context.options, optionName) && !context.options[optionName]; };
|
|
149422
149298
|
}
|
|
149423
149299
|
function isOptionDisabledOrUndefined(optionName) {
|
|
149424
|
-
return function (context) { return !context.options || !context.options
|
|
149300
|
+
return function (context) { return !context.options || !ts.hasProperty(context.options, optionName) || !context.options[optionName]; };
|
|
149425
149301
|
}
|
|
149426
149302
|
function isOptionDisabledOrUndefinedOrTokensOnSameLine(optionName) {
|
|
149427
|
-
return function (context) { return !context.options || !context.options
|
|
149303
|
+
return function (context) { return !context.options || !ts.hasProperty(context.options, optionName) || !context.options[optionName] || context.TokensAreOnSameLine(); };
|
|
149428
149304
|
}
|
|
149429
149305
|
function isOptionEnabledOrUndefined(optionName) {
|
|
149430
|
-
return function (context) { return !context.options || !context.options
|
|
149306
|
+
return function (context) { return !context.options || !ts.hasProperty(context.options, optionName) || !!context.options[optionName]; };
|
|
149431
149307
|
}
|
|
149432
149308
|
function isForContext(context) {
|
|
149433
149309
|
return context.contextNode.kind === 245 /* SyntaxKind.ForStatement */;
|
|
@@ -152743,7 +152619,6 @@ var ts;
|
|
|
152743
152619
|
if (!visited) {
|
|
152744
152620
|
return visited;
|
|
152745
152621
|
}
|
|
152746
|
-
ts.Debug.assert(nodes);
|
|
152747
152622
|
// clone nodearray if necessary
|
|
152748
152623
|
var nodeArray = visited === nodes ? ts.factory.createNodeArray(visited.slice(0)) : visited;
|
|
152749
152624
|
ts.setTextRangePosEnd(nodeArray, getPos(nodes), getEnd(nodes));
|
|
@@ -154032,31 +153907,22 @@ var ts;
|
|
|
154032
153907
|
var param = _a[_i];
|
|
154033
153908
|
if (!param.type) {
|
|
154034
153909
|
var paramType = ts.getJSDocType(param);
|
|
154035
|
-
if (paramType)
|
|
154036
|
-
|
|
154037
|
-
ts.Debug.assertNode(transformedType, ts.isTypeNode);
|
|
154038
|
-
changes.tryInsertTypeAnnotation(sourceFile, param, transformedType);
|
|
154039
|
-
}
|
|
153910
|
+
if (paramType)
|
|
153911
|
+
changes.tryInsertTypeAnnotation(sourceFile, param, transformJSDocType(paramType));
|
|
154040
153912
|
}
|
|
154041
153913
|
}
|
|
154042
153914
|
if (needParens)
|
|
154043
153915
|
changes.insertNodeAfter(sourceFile, ts.last(decl.parameters), ts.factory.createToken(21 /* SyntaxKind.CloseParenToken */));
|
|
154044
153916
|
if (!decl.type) {
|
|
154045
153917
|
var returnType = ts.getJSDocReturnType(decl);
|
|
154046
|
-
if (returnType)
|
|
154047
|
-
|
|
154048
|
-
ts.Debug.assertNode(transformedType, ts.isTypeNode);
|
|
154049
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl, transformedType);
|
|
154050
|
-
}
|
|
154051
|
-
;
|
|
153918
|
+
if (returnType)
|
|
153919
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(returnType));
|
|
154052
153920
|
}
|
|
154053
153921
|
}
|
|
154054
153922
|
else {
|
|
154055
153923
|
var jsdocType = ts.Debug.checkDefined(ts.getJSDocType(decl), "A JSDocType for this declaration should exist"); // If not defined, shouldn't have been an error to fix
|
|
154056
153924
|
ts.Debug.assert(!decl.type, "The JSDocType decl should have a type"); // If defined, shouldn't have been an error to fix.
|
|
154057
|
-
|
|
154058
|
-
ts.Debug.assertNode(transformedType, ts.isTypeNode);
|
|
154059
|
-
changes.tryInsertTypeAnnotation(sourceFile, decl, transformedType);
|
|
153925
|
+
changes.tryInsertTypeAnnotation(sourceFile, decl, transformJSDocType(jsdocType));
|
|
154060
153926
|
}
|
|
154061
153927
|
}
|
|
154062
153928
|
function isDeclarationWithType(node) {
|
|
@@ -161332,11 +161198,12 @@ var ts;
|
|
|
161332
161198
|
*/
|
|
161333
161199
|
function tryGetAutoImportableReferenceFromTypeNode(importTypeNode, scriptTarget) {
|
|
161334
161200
|
var symbols;
|
|
161335
|
-
var typeNode = ts.visitNode(importTypeNode, visit
|
|
161201
|
+
var typeNode = ts.visitNode(importTypeNode, visit);
|
|
161336
161202
|
if (symbols && typeNode) {
|
|
161337
161203
|
return { typeNode: typeNode, symbols: symbols };
|
|
161338
161204
|
}
|
|
161339
161205
|
function visit(node) {
|
|
161206
|
+
var _a;
|
|
161340
161207
|
if (ts.isLiteralImportTypeNode(node) && node.qualifier) {
|
|
161341
161208
|
// Symbol for the left-most thing after the dot
|
|
161342
161209
|
var firstIdentifier = ts.getFirstIdentifier(node.qualifier);
|
|
@@ -161345,7 +161212,7 @@ var ts;
|
|
|
161345
161212
|
? replaceFirstIdentifierOfEntityName(node.qualifier, ts.factory.createIdentifier(name))
|
|
161346
161213
|
: node.qualifier;
|
|
161347
161214
|
symbols = ts.append(symbols, firstIdentifier.symbol);
|
|
161348
|
-
var typeArguments =
|
|
161215
|
+
var typeArguments = (_a = node.typeArguments) === null || _a === void 0 ? void 0 : _a.map(visit);
|
|
161349
161216
|
return ts.factory.createTypeReferenceNode(qualifier, typeArguments);
|
|
161350
161217
|
}
|
|
161351
161218
|
return ts.visitEachChild(node, visit, ts.nullTransformationContext);
|
|
@@ -162420,7 +162287,6 @@ var ts;
|
|
|
162420
162287
|
return { edits: edits, renameFilename: undefined, renameLocation: undefined };
|
|
162421
162288
|
},
|
|
162422
162289
|
});
|
|
162423
|
-
;
|
|
162424
162290
|
function getInfo(context, considerPartialSpans) {
|
|
162425
162291
|
if (considerPartialSpans === void 0) { considerPartialSpans = true; }
|
|
162426
162292
|
var file = context.file, program = context.program;
|
|
@@ -162897,7 +162763,6 @@ var ts;
|
|
|
162897
162763
|
});
|
|
162898
162764
|
return { edits: edits, renameFilename: undefined, renameLocation: undefined };
|
|
162899
162765
|
}
|
|
162900
|
-
;
|
|
162901
162766
|
function isValidExpression(node) {
|
|
162902
162767
|
return ts.isBinaryExpression(node) || ts.isConditionalExpression(node);
|
|
162903
162768
|
}
|
|
@@ -162945,7 +162810,6 @@ var ts;
|
|
|
162945
162810
|
if (expression.operatorToken.kind !== 55 /* SyntaxKind.AmpersandAmpersandToken */) {
|
|
162946
162811
|
return { error: ts.getLocaleSpecificMessage(ts.Diagnostics.Can_only_convert_logical_AND_access_chains) };
|
|
162947
162812
|
}
|
|
162948
|
-
;
|
|
162949
162813
|
var finalExpression = getFinalExpressionInChain(expression.right);
|
|
162950
162814
|
if (!finalExpression)
|
|
162951
162815
|
return { error: ts.getLocaleSpecificMessage(ts.Diagnostics.Could_not_find_convertible_access_expression) };
|
|
@@ -164462,7 +164326,7 @@ var ts;
|
|
|
164462
164326
|
var statements = ts.factory.createNodeArray(ts.isBlock(body) ? body.statements.slice(0) : [ts.isStatement(body) ? body : ts.factory.createReturnStatement(ts.skipParentheses(body))]);
|
|
164463
164327
|
// rewrite body if either there are writes that should be propagated back via return statements or there are substitutions
|
|
164464
164328
|
if (hasWritesOrVariableDeclarations || substitutions.size) {
|
|
164465
|
-
var rewrittenStatements = ts.visitNodes(statements, visitor
|
|
164329
|
+
var rewrittenStatements = ts.visitNodes(statements, visitor).slice();
|
|
164466
164330
|
if (hasWritesOrVariableDeclarations && !hasReturn && ts.isStatement(body)) {
|
|
164467
164331
|
// add return at the end to propagate writes back in case if control flow falls out of the function body
|
|
164468
164332
|
// it is ok to know that range has at least one return since it we only allow unconditional returns
|
|
@@ -165289,7 +165153,6 @@ var ts;
|
|
|
165289
165153
|
(function (ts) {
|
|
165290
165154
|
var refactor;
|
|
165291
165155
|
(function (refactor) {
|
|
165292
|
-
;
|
|
165293
165156
|
/**
|
|
165294
165157
|
* Checks if some refactor info has refactor error info.
|
|
165295
165158
|
*/
|
|
@@ -165394,7 +165257,6 @@ var ts;
|
|
|
165394
165257
|
// Imports will be copied to the new file anyway, and may still be needed in the old file.
|
|
165395
165258
|
// Prologue directives will be copied to the new file and should be left in the old file.
|
|
165396
165259
|
return !isPureImport(statement) && !ts.isPrologueDirective(statement);
|
|
165397
|
-
;
|
|
165398
165260
|
}
|
|
165399
165261
|
function isPureImport(node) {
|
|
165400
165262
|
switch (node.kind) {
|
|
@@ -175449,7 +175311,7 @@ var ts;
|
|
|
175449
175311
|
// raw is now fixed and ready
|
|
175450
175312
|
this.safelist = raw.typesMap;
|
|
175451
175313
|
for (var key in raw.simpleMap) {
|
|
175452
|
-
if (raw.simpleMap
|
|
175314
|
+
if (ts.hasProperty(raw.simpleMap, key)) {
|
|
175453
175315
|
this.legacySafelist.set(key, raw.simpleMap[key].toLowerCase());
|
|
175454
175316
|
}
|
|
175455
175317
|
}
|
|
@@ -178863,7 +178725,6 @@ var ts;
|
|
|
178863
178725
|
}
|
|
178864
178726
|
return ts.deduplicate(outputs, ts.equateValues);
|
|
178865
178727
|
}
|
|
178866
|
-
;
|
|
178867
178728
|
function createDocumentSpanSet() {
|
|
178868
178729
|
return ts.createSet(function (_a) {
|
|
178869
178730
|
var textSpan = _a.textSpan;
|
|
@@ -183983,7 +183844,7 @@ var ts;
|
|
|
183983
183844
|
(name === undefined || typeof name === "string" || ts.isPropertyName(name)) &&
|
|
183984
183845
|
(questionToken === undefined || typeof questionToken === "object" && ts.isQuestionToken(questionToken)) &&
|
|
183985
183846
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
183986
|
-
(parameters === undefined || ts.
|
|
183847
|
+
(parameters === undefined || !ts.some(parameters, ts.isTypeParameterDeclaration)) &&
|
|
183987
183848
|
(type === undefined || !ts.isArray(type)) &&
|
|
183988
183849
|
(body === undefined || ts.isBlock(body));
|
|
183989
183850
|
},
|
|
@@ -183993,7 +183854,7 @@ var ts;
|
|
|
183993
183854
|
(asteriskToken === undefined || typeof asteriskToken === "object" && ts.isAsteriskToken(asteriskToken)) &&
|
|
183994
183855
|
(name === undefined || typeof name === "string" || ts.isPropertyName(name)) &&
|
|
183995
183856
|
(questionToken === undefined || !ts.isArray(questionToken)) &&
|
|
183996
|
-
(typeParameters === undefined || ts.
|
|
183857
|
+
(typeParameters === undefined || !ts.some(typeParameters, ts.isParameter)) &&
|
|
183997
183858
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
183998
183859
|
(type === undefined || ts.isTypeNode(type)) &&
|
|
183999
183860
|
(body === undefined || ts.isBlock(body));
|
|
@@ -184020,7 +183881,7 @@ var ts;
|
|
|
184020
183881
|
(name === undefined || typeof name === "string" || ts.isPropertyName(name)) &&
|
|
184021
183882
|
(questionToken === undefined || typeof questionToken === "object" && ts.isQuestionToken(questionToken)) &&
|
|
184022
183883
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184023
|
-
(parameters === undefined || ts.
|
|
183884
|
+
(parameters === undefined || !ts.some(parameters, ts.isTypeParameterDeclaration)) &&
|
|
184024
183885
|
(type === undefined || !ts.isArray(type)) &&
|
|
184025
183886
|
(body === undefined || ts.isBlock(body));
|
|
184026
183887
|
},
|
|
@@ -184030,7 +183891,7 @@ var ts;
|
|
|
184030
183891
|
(asteriskToken === undefined || typeof asteriskToken === "object" && ts.isAsteriskToken(asteriskToken)) &&
|
|
184031
183892
|
(name === undefined || typeof name === "string" || ts.isPropertyName(name)) &&
|
|
184032
183893
|
(questionToken === undefined || !ts.isArray(questionToken)) &&
|
|
184033
|
-
(typeParameters === undefined || ts.
|
|
183894
|
+
(typeParameters === undefined || !ts.some(typeParameters, ts.isParameter)) &&
|
|
184034
183895
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184035
183896
|
(type === undefined || ts.isTypeNode(type)) &&
|
|
184036
183897
|
(body === undefined || ts.isBlock(body));
|
|
@@ -184053,14 +183914,14 @@ var ts;
|
|
|
184053
183914
|
0: function (_a) {
|
|
184054
183915
|
var modifiers = _a[0], parameters = _a[1], body = _a[2], other = _a[3];
|
|
184055
183916
|
return (other === undefined) &&
|
|
184056
|
-
(modifiers === undefined || ts.
|
|
184057
|
-
(parameters === undefined || ts.
|
|
183917
|
+
(modifiers === undefined || !ts.some(modifiers, ts.isDecorator)) &&
|
|
183918
|
+
(parameters === undefined || !ts.some(parameters, ts.isModifier)) &&
|
|
184058
183919
|
(body === undefined || !ts.isArray(body));
|
|
184059
183920
|
},
|
|
184060
183921
|
1: function (_a) {
|
|
184061
183922
|
var decorators = _a[0], modifiers = _a[1], parameters = _a[2], body = _a[3];
|
|
184062
|
-
return (decorators === undefined || ts.
|
|
184063
|
-
(modifiers === undefined || ts.
|
|
183923
|
+
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
183924
|
+
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
184064
183925
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184065
183926
|
(body === undefined || ts.isBlock(body));
|
|
184066
183927
|
},
|
|
@@ -184082,14 +183943,14 @@ var ts;
|
|
|
184082
183943
|
0: function (_a) {
|
|
184083
183944
|
var modifiers = _a[1], parameters = _a[2], body = _a[3], other = _a[4];
|
|
184084
183945
|
return (other === undefined) &&
|
|
184085
|
-
(modifiers === undefined || ts.
|
|
184086
|
-
(parameters === undefined || ts.
|
|
183946
|
+
(modifiers === undefined || !ts.some(modifiers, ts.isDecorator)) &&
|
|
183947
|
+
(parameters === undefined || !ts.some(parameters, ts.isModifier)) &&
|
|
184087
183948
|
(body === undefined || !ts.isArray(body));
|
|
184088
183949
|
},
|
|
184089
183950
|
1: function (_a) {
|
|
184090
183951
|
var decorators = _a[1], modifiers = _a[2], parameters = _a[3], body = _a[4];
|
|
184091
|
-
return (decorators === undefined || ts.
|
|
184092
|
-
(modifiers === undefined || ts.
|
|
183952
|
+
return (decorators === undefined || !ts.some(decorators, ts.isModifier)) &&
|
|
183953
|
+
(modifiers === undefined || !ts.some(modifiers, ts.isParameter)) &&
|
|
184093
183954
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184094
183955
|
(body === undefined || ts.isBlock(body));
|
|
184095
183956
|
},
|
|
@@ -184231,14 +184092,14 @@ var ts;
|
|
|
184231
184092
|
0: function (_a) {
|
|
184232
184093
|
var modifiers = _a[0], parameters = _a[1], type = _a[2], other = _a[3];
|
|
184233
184094
|
return (other === undefined) &&
|
|
184234
|
-
(modifiers === undefined || ts.
|
|
184235
|
-
(parameters === undefined || ts.
|
|
184095
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184096
|
+
(parameters === undefined || ts.every(parameters, ts.isParameter)) &&
|
|
184236
184097
|
(type === undefined || !ts.isArray(type));
|
|
184237
184098
|
},
|
|
184238
184099
|
1: function (_a) {
|
|
184239
184100
|
var decorators = _a[0], modifiers = _a[1], parameters = _a[2], type = _a[3];
|
|
184240
|
-
return (decorators === undefined || ts.
|
|
184241
|
-
(modifiers === undefined || ts.
|
|
184101
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184102
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184242
184103
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184243
184104
|
(type === undefined || ts.isTypeNode(type));
|
|
184244
184105
|
},
|
|
@@ -184260,14 +184121,14 @@ var ts;
|
|
|
184260
184121
|
0: function (_a) {
|
|
184261
184122
|
var modifiers = _a[1], parameters = _a[2], type = _a[3], other = _a[4];
|
|
184262
184123
|
return (other === undefined) &&
|
|
184263
|
-
(modifiers === undefined || ts.
|
|
184264
|
-
(parameters === undefined || ts.
|
|
184124
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184125
|
+
(parameters === undefined || ts.every(parameters, ts.isParameter)) &&
|
|
184265
184126
|
(type === undefined || !ts.isArray(type));
|
|
184266
184127
|
},
|
|
184267
184128
|
1: function (_a) {
|
|
184268
184129
|
var decorators = _a[1], modifiers = _a[2], parameters = _a[3], type = _a[4];
|
|
184269
|
-
return (decorators === undefined || ts.
|
|
184270
|
-
(modifiers === undefined || ts.
|
|
184130
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184131
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184271
184132
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184272
184133
|
(type === undefined || ts.isTypeNode(type));
|
|
184273
184134
|
},
|
|
@@ -184345,15 +184206,15 @@ var ts;
|
|
|
184345
184206
|
return (other === undefined) &&
|
|
184346
184207
|
(name === undefined || !ts.isArray(name)) &&
|
|
184347
184208
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184348
|
-
(heritageClauses === undefined || ts.
|
|
184349
|
-
(members === undefined || ts.
|
|
184209
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184210
|
+
(members === undefined || ts.every(members, ts.isClassElement));
|
|
184350
184211
|
},
|
|
184351
184212
|
1: function (_a) {
|
|
184352
184213
|
var modifiers = _a[1], name = _a[2], typeParameters = _a[3], heritageClauses = _a[4], members = _a[5];
|
|
184353
184214
|
return (modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184354
184215
|
(name === undefined || !ts.isArray(name)) &&
|
|
184355
|
-
(typeParameters === undefined || ts.
|
|
184356
|
-
(heritageClauses === undefined || ts.
|
|
184216
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184217
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184357
184218
|
(members === undefined || ts.isArray(members));
|
|
184358
184219
|
},
|
|
184359
184220
|
})
|
|
@@ -184376,15 +184237,15 @@ var ts;
|
|
|
184376
184237
|
return (other === undefined) &&
|
|
184377
184238
|
(name === undefined || !ts.isArray(name)) &&
|
|
184378
184239
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184379
|
-
(heritageClauses === undefined || ts.
|
|
184380
|
-
(members === undefined || ts.
|
|
184240
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184241
|
+
(members === undefined || ts.every(members, ts.isClassElement));
|
|
184381
184242
|
},
|
|
184382
184243
|
1: function (_a) {
|
|
184383
184244
|
var modifiers = _a[2], name = _a[3], typeParameters = _a[4], heritageClauses = _a[5], members = _a[6];
|
|
184384
184245
|
return (modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184385
184246
|
(name === undefined || !ts.isArray(name)) &&
|
|
184386
|
-
(typeParameters === undefined || ts.
|
|
184387
|
-
(heritageClauses === undefined || ts.
|
|
184247
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184248
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184388
184249
|
(members === undefined || ts.isArray(members));
|
|
184389
184250
|
},
|
|
184390
184251
|
})
|
|
@@ -184408,7 +184269,7 @@ var ts;
|
|
|
184408
184269
|
(asteriskToken === undefined || !ts.isArray(asteriskToken)) &&
|
|
184409
184270
|
(name === undefined || typeof name === "string" || ts.isIdentifier(name)) &&
|
|
184410
184271
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184411
|
-
(parameters === undefined || ts.
|
|
184272
|
+
(parameters === undefined || ts.every(parameters, ts.isParameter)) &&
|
|
184412
184273
|
(type === undefined || !ts.isArray(type)) &&
|
|
184413
184274
|
(body === undefined || ts.isBlock(body));
|
|
184414
184275
|
},
|
|
@@ -184417,7 +184278,7 @@ var ts;
|
|
|
184417
184278
|
return (modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184418
184279
|
(asteriskToken === undefined || typeof asteriskToken !== "string" && ts.isAsteriskToken(asteriskToken)) &&
|
|
184419
184280
|
(name === undefined || !ts.isArray(name)) &&
|
|
184420
|
-
(typeParameters === undefined || ts.
|
|
184281
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184421
184282
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184422
184283
|
(type === undefined || ts.isTypeNode(type)) &&
|
|
184423
184284
|
(body === undefined || ts.isBlock(body));
|
|
@@ -184443,7 +184304,7 @@ var ts;
|
|
|
184443
184304
|
(asteriskToken === undefined || !ts.isArray(asteriskToken)) &&
|
|
184444
184305
|
(name === undefined || ts.isIdentifier(name)) &&
|
|
184445
184306
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184446
|
-
(parameters === undefined || ts.
|
|
184307
|
+
(parameters === undefined || ts.every(parameters, ts.isParameter)) &&
|
|
184447
184308
|
(type === undefined || !ts.isArray(type)) &&
|
|
184448
184309
|
(body === undefined || ts.isBlock(body));
|
|
184449
184310
|
},
|
|
@@ -184452,7 +184313,7 @@ var ts;
|
|
|
184452
184313
|
return (modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184453
184314
|
(asteriskToken === undefined || typeof asteriskToken !== "string" && ts.isAsteriskToken(asteriskToken)) &&
|
|
184454
184315
|
(name === undefined || !ts.isArray(name)) &&
|
|
184455
|
-
(typeParameters === undefined || ts.
|
|
184316
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184456
184317
|
(parameters === undefined || ts.isArray(parameters)) &&
|
|
184457
184318
|
(type === undefined || ts.isTypeNode(type)) &&
|
|
184458
184319
|
(body === undefined || ts.isBlock(body));
|
|
@@ -184477,8 +184338,8 @@ var ts;
|
|
|
184477
184338
|
return (other === undefined) &&
|
|
184478
184339
|
(name === undefined || !ts.isArray(name)) &&
|
|
184479
184340
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184480
|
-
(heritageClauses === undefined || ts.
|
|
184481
|
-
(members === undefined || ts.
|
|
184341
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184342
|
+
(members === undefined || ts.every(members, ts.isClassElement));
|
|
184482
184343
|
},
|
|
184483
184344
|
1: function () { return true; },
|
|
184484
184345
|
})
|
|
@@ -184501,15 +184362,15 @@ var ts;
|
|
|
184501
184362
|
return (other === undefined) &&
|
|
184502
184363
|
(name === undefined || !ts.isArray(name)) &&
|
|
184503
184364
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184504
|
-
(heritageClauses === undefined || ts.
|
|
184505
|
-
(members === undefined || ts.
|
|
184365
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184366
|
+
(members === undefined || ts.every(members, ts.isClassElement));
|
|
184506
184367
|
},
|
|
184507
184368
|
1: function (_a) {
|
|
184508
184369
|
var modifiers = _a[2], name = _a[3], typeParameters = _a[4], heritageClauses = _a[5], members = _a[6];
|
|
184509
184370
|
return (modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184510
184371
|
(name === undefined || !ts.isArray(name)) &&
|
|
184511
|
-
(typeParameters === undefined || ts.
|
|
184512
|
-
(heritageClauses === undefined || ts.
|
|
184372
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184373
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184513
184374
|
(members === undefined || ts.isArray(members));
|
|
184514
184375
|
},
|
|
184515
184376
|
})
|
|
@@ -184530,19 +184391,19 @@ var ts;
|
|
|
184530
184391
|
0: function (_a) {
|
|
184531
184392
|
var modifiers = _a[0], name = _a[1], typeParameters = _a[2], heritageClauses = _a[3], members = _a[4], other = _a[5];
|
|
184532
184393
|
return (other === undefined) &&
|
|
184533
|
-
(modifiers === undefined || ts.
|
|
184394
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184534
184395
|
(name === undefined || !ts.isArray(name)) &&
|
|
184535
184396
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184536
|
-
(heritageClauses === undefined || ts.
|
|
184537
|
-
(members === undefined || ts.
|
|
184397
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184398
|
+
(members === undefined || ts.every(members, ts.isTypeElement));
|
|
184538
184399
|
},
|
|
184539
184400
|
1: function (_a) {
|
|
184540
184401
|
var decorators = _a[0], modifiers = _a[1], name = _a[2], typeParameters = _a[3], heritageClauses = _a[4], members = _a[5];
|
|
184541
|
-
return (decorators === undefined || ts.
|
|
184402
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184542
184403
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184543
184404
|
(name === undefined || !ts.isArray(name)) &&
|
|
184544
|
-
(typeParameters === undefined || ts.
|
|
184545
|
-
(heritageClauses === undefined || ts.
|
|
184405
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184406
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184546
184407
|
(members === undefined || ts.every(members, ts.isTypeElement));
|
|
184547
184408
|
},
|
|
184548
184409
|
})
|
|
@@ -184563,19 +184424,19 @@ var ts;
|
|
|
184563
184424
|
0: function (_a) {
|
|
184564
184425
|
var modifiers = _a[1], name = _a[2], typeParameters = _a[3], heritageClauses = _a[4], members = _a[5], other = _a[6];
|
|
184565
184426
|
return (other === undefined) &&
|
|
184566
|
-
(modifiers === undefined || ts.
|
|
184427
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184567
184428
|
(name === undefined || !ts.isArray(name)) &&
|
|
184568
184429
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184569
|
-
(heritageClauses === undefined || ts.
|
|
184570
|
-
(members === undefined || ts.
|
|
184430
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184431
|
+
(members === undefined || ts.every(members, ts.isTypeElement));
|
|
184571
184432
|
},
|
|
184572
184433
|
1: function (_a) {
|
|
184573
184434
|
var decorators = _a[1], modifiers = _a[2], name = _a[3], typeParameters = _a[4], heritageClauses = _a[5], members = _a[6];
|
|
184574
|
-
return (decorators === undefined || ts.
|
|
184435
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184575
184436
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184576
184437
|
(name === undefined || !ts.isArray(name)) &&
|
|
184577
|
-
(typeParameters === undefined || ts.
|
|
184578
|
-
(heritageClauses === undefined || ts.
|
|
184438
|
+
(typeParameters === undefined || ts.every(typeParameters, ts.isTypeParameterDeclaration)) &&
|
|
184439
|
+
(heritageClauses === undefined || ts.every(heritageClauses, ts.isHeritageClause)) &&
|
|
184579
184440
|
(members === undefined || ts.every(members, ts.isTypeElement));
|
|
184580
184441
|
},
|
|
184581
184442
|
})
|
|
@@ -184596,14 +184457,14 @@ var ts;
|
|
|
184596
184457
|
0: function (_a) {
|
|
184597
184458
|
var modifiers = _a[0], name = _a[1], typeParameters = _a[2], type = _a[3], other = _a[4];
|
|
184598
184459
|
return (other === undefined) &&
|
|
184599
|
-
(modifiers === undefined || ts.
|
|
184460
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184600
184461
|
(name === undefined || !ts.isArray(name)) &&
|
|
184601
184462
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184602
184463
|
(type === undefined || !ts.isArray(type));
|
|
184603
184464
|
},
|
|
184604
184465
|
1: function (_a) {
|
|
184605
184466
|
var decorators = _a[0], modifiers = _a[1], name = _a[2], typeParameters = _a[3], type = _a[4];
|
|
184606
|
-
return (decorators === undefined || ts.
|
|
184467
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184607
184468
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184608
184469
|
(name === undefined || !ts.isArray(name)) &&
|
|
184609
184470
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
@@ -184627,14 +184488,14 @@ var ts;
|
|
|
184627
184488
|
0: function (_a) {
|
|
184628
184489
|
var modifiers = _a[1], name = _a[2], typeParameters = _a[3], type = _a[4], other = _a[5];
|
|
184629
184490
|
return (other === undefined) &&
|
|
184630
|
-
(modifiers === undefined || ts.
|
|
184491
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184631
184492
|
(name === undefined || !ts.isArray(name)) &&
|
|
184632
184493
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
184633
184494
|
(type === undefined || !ts.isArray(type));
|
|
184634
184495
|
},
|
|
184635
184496
|
1: function (_a) {
|
|
184636
184497
|
var decorators = _a[1], modifiers = _a[2], name = _a[3], typeParameters = _a[4], type = _a[5];
|
|
184637
|
-
return (decorators === undefined || ts.
|
|
184498
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184638
184499
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184639
184500
|
(name === undefined || !ts.isArray(name)) &&
|
|
184640
184501
|
(typeParameters === undefined || ts.isArray(typeParameters)) &&
|
|
@@ -184658,13 +184519,13 @@ var ts;
|
|
|
184658
184519
|
0: function (_a) {
|
|
184659
184520
|
var modifiers = _a[0], name = _a[1], members = _a[2], other = _a[3];
|
|
184660
184521
|
return (other === undefined) &&
|
|
184661
|
-
(modifiers === undefined || ts.
|
|
184522
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184662
184523
|
(name === undefined || !ts.isArray(name)) &&
|
|
184663
184524
|
(members === undefined || ts.isArray(members));
|
|
184664
184525
|
},
|
|
184665
184526
|
1: function (_a) {
|
|
184666
184527
|
var decorators = _a[0], modifiers = _a[1], name = _a[2], members = _a[3];
|
|
184667
|
-
return (decorators === undefined || ts.
|
|
184528
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184668
184529
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184669
184530
|
(name === undefined || !ts.isArray(name)) &&
|
|
184670
184531
|
(members === undefined || ts.isArray(members));
|
|
@@ -184687,13 +184548,13 @@ var ts;
|
|
|
184687
184548
|
0: function (_a) {
|
|
184688
184549
|
var modifiers = _a[1], name = _a[2], members = _a[3], other = _a[4];
|
|
184689
184550
|
return (other === undefined) &&
|
|
184690
|
-
(modifiers === undefined || ts.
|
|
184551
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184691
184552
|
(name === undefined || !ts.isArray(name)) &&
|
|
184692
184553
|
(members === undefined || ts.isArray(members));
|
|
184693
184554
|
},
|
|
184694
184555
|
1: function (_a) {
|
|
184695
184556
|
var decorators = _a[1], modifiers = _a[2], name = _a[3], members = _a[4];
|
|
184696
|
-
return (decorators === undefined || ts.
|
|
184557
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184697
184558
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184698
184559
|
(name === undefined || !ts.isArray(name)) &&
|
|
184699
184560
|
(members === undefined || ts.isArray(members));
|
|
@@ -184716,14 +184577,14 @@ var ts;
|
|
|
184716
184577
|
0: function (_a) {
|
|
184717
184578
|
var modifiers = _a[0], name = _a[1], body = _a[2], flags = _a[3], other = _a[4];
|
|
184718
184579
|
return (other === undefined) &&
|
|
184719
|
-
(modifiers === undefined || ts.
|
|
184580
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184720
184581
|
(name !== undefined && !ts.isArray(name)) &&
|
|
184721
184582
|
(body === undefined || ts.isModuleBody(body)) &&
|
|
184722
184583
|
(flags === undefined || typeof flags === "number");
|
|
184723
184584
|
},
|
|
184724
184585
|
1: function (_a) {
|
|
184725
184586
|
var decorators = _a[0], modifiers = _a[1], name = _a[2], body = _a[3], flags = _a[4];
|
|
184726
|
-
return (decorators === undefined || ts.
|
|
184587
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184727
184588
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184728
184589
|
(name !== undefined && ts.isModuleName(name)) &&
|
|
184729
184590
|
(body === undefined || typeof body === "object") &&
|
|
@@ -184747,13 +184608,13 @@ var ts;
|
|
|
184747
184608
|
0: function (_a) {
|
|
184748
184609
|
var modifiers = _a[1], name = _a[2], body = _a[3], other = _a[4];
|
|
184749
184610
|
return (other === undefined) &&
|
|
184750
|
-
(modifiers === undefined || ts.
|
|
184611
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184751
184612
|
(name === undefined || !ts.isArray(name)) &&
|
|
184752
184613
|
(body === undefined || ts.isModuleBody(body));
|
|
184753
184614
|
},
|
|
184754
184615
|
1: function (_a) {
|
|
184755
184616
|
var decorators = _a[1], modifiers = _a[2], name = _a[3], body = _a[4];
|
|
184756
|
-
return (decorators === undefined || ts.
|
|
184617
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184757
184618
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184758
184619
|
(name !== undefined && ts.isModuleName(name)) &&
|
|
184759
184620
|
(body === undefined || ts.isModuleBody(body));
|
|
@@ -184776,14 +184637,14 @@ var ts;
|
|
|
184776
184637
|
0: function (_a) {
|
|
184777
184638
|
var modifiers = _a[0], isTypeOnly = _a[1], name = _a[2], moduleReference = _a[3], other = _a[4];
|
|
184778
184639
|
return (other === undefined) &&
|
|
184779
|
-
(modifiers === undefined || ts.
|
|
184640
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184780
184641
|
(isTypeOnly === undefined || typeof isTypeOnly === "boolean") &&
|
|
184781
184642
|
(typeof name !== "boolean") &&
|
|
184782
184643
|
(typeof moduleReference !== "string");
|
|
184783
184644
|
},
|
|
184784
184645
|
1: function (_a) {
|
|
184785
184646
|
var decorators = _a[0], modifiers = _a[1], isTypeOnly = _a[2], name = _a[3], moduleReference = _a[4];
|
|
184786
|
-
return (decorators === undefined || ts.
|
|
184647
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184787
184648
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184788
184649
|
(isTypeOnly === undefined || typeof isTypeOnly === "boolean") &&
|
|
184789
184650
|
(typeof name === "string" || ts.isIdentifier(name)) &&
|
|
@@ -184807,14 +184668,14 @@ var ts;
|
|
|
184807
184668
|
0: function (_a) {
|
|
184808
184669
|
var modifiers = _a[1], isTypeOnly = _a[2], name = _a[3], moduleReference = _a[4], other = _a[5];
|
|
184809
184670
|
return (other === undefined) &&
|
|
184810
|
-
(modifiers === undefined || ts.
|
|
184671
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184811
184672
|
(isTypeOnly === undefined || typeof isTypeOnly === "boolean") &&
|
|
184812
184673
|
(typeof name !== "boolean") &&
|
|
184813
184674
|
(typeof moduleReference !== "string");
|
|
184814
184675
|
},
|
|
184815
184676
|
1: function (_a) {
|
|
184816
184677
|
var decorators = _a[1], modifiers = _a[2], isTypeOnly = _a[3], name = _a[4], moduleReference = _a[5];
|
|
184817
|
-
return (decorators === undefined || ts.
|
|
184678
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184818
184679
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184819
184680
|
(isTypeOnly === undefined || typeof isTypeOnly === "boolean") &&
|
|
184820
184681
|
(typeof name === "string" || ts.isIdentifier(name)) &&
|
|
@@ -184838,14 +184699,14 @@ var ts;
|
|
|
184838
184699
|
0: function (_a) {
|
|
184839
184700
|
var modifiers = _a[0], importClause = _a[1], moduleSpecifier = _a[2], assertClause = _a[3], other = _a[4];
|
|
184840
184701
|
return (other === undefined) &&
|
|
184841
|
-
(modifiers === undefined || ts.
|
|
184702
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184842
184703
|
(importClause === undefined || !ts.isArray(importClause)) &&
|
|
184843
184704
|
(moduleSpecifier !== undefined && ts.isExpression(moduleSpecifier)) &&
|
|
184844
184705
|
(assertClause === undefined || ts.isAssertClause(assertClause));
|
|
184845
184706
|
},
|
|
184846
184707
|
1: function (_a) {
|
|
184847
184708
|
var decorators = _a[0], modifiers = _a[1], importClause = _a[2], moduleSpecifier = _a[3], assertClause = _a[4];
|
|
184848
|
-
return (decorators === undefined || ts.
|
|
184709
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184849
184710
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184850
184711
|
(importClause === undefined || ts.isImportClause(importClause)) &&
|
|
184851
184712
|
(moduleSpecifier !== undefined && ts.isExpression(moduleSpecifier)) &&
|
|
@@ -184869,14 +184730,14 @@ var ts;
|
|
|
184869
184730
|
0: function (_a) {
|
|
184870
184731
|
var modifiers = _a[1], importClause = _a[2], moduleSpecifier = _a[3], assertClause = _a[4], other = _a[5];
|
|
184871
184732
|
return (other === undefined) &&
|
|
184872
|
-
(modifiers === undefined || ts.
|
|
184733
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184873
184734
|
(importClause === undefined || !ts.isArray(importClause)) &&
|
|
184874
184735
|
(moduleSpecifier === undefined || ts.isExpression(moduleSpecifier)) &&
|
|
184875
184736
|
(assertClause === undefined || ts.isAssertClause(assertClause));
|
|
184876
184737
|
},
|
|
184877
184738
|
1: function (_a) {
|
|
184878
184739
|
var decorators = _a[1], modifiers = _a[2], importClause = _a[3], moduleSpecifier = _a[4], assertClause = _a[5];
|
|
184879
|
-
return (decorators === undefined || ts.
|
|
184740
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184880
184741
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184881
184742
|
(importClause === undefined || ts.isImportClause(importClause)) &&
|
|
184882
184743
|
(moduleSpecifier !== undefined && ts.isExpression(moduleSpecifier)) &&
|
|
@@ -184900,13 +184761,13 @@ var ts;
|
|
|
184900
184761
|
0: function (_a) {
|
|
184901
184762
|
var modifiers = _a[0], isExportEquals = _a[1], expression = _a[2], other = _a[3];
|
|
184902
184763
|
return (other === undefined) &&
|
|
184903
|
-
(modifiers === undefined || ts.
|
|
184764
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184904
184765
|
(isExportEquals === undefined || typeof isExportEquals === "boolean") &&
|
|
184905
184766
|
(typeof expression === "object");
|
|
184906
184767
|
},
|
|
184907
184768
|
1: function (_a) {
|
|
184908
184769
|
var decorators = _a[0], modifiers = _a[1], isExportEquals = _a[2], expression = _a[3];
|
|
184909
|
-
return (decorators === undefined || ts.
|
|
184770
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184910
184771
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184911
184772
|
(isExportEquals === undefined || typeof isExportEquals === "boolean") &&
|
|
184912
184773
|
(expression !== undefined && ts.isExpression(expression));
|
|
@@ -184929,12 +184790,12 @@ var ts;
|
|
|
184929
184790
|
0: function (_a) {
|
|
184930
184791
|
var modifiers = _a[1], expression = _a[2], other = _a[3];
|
|
184931
184792
|
return (other === undefined) &&
|
|
184932
|
-
(modifiers === undefined || ts.
|
|
184793
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184933
184794
|
(expression !== undefined && !ts.isArray(expression));
|
|
184934
184795
|
},
|
|
184935
184796
|
1: function (_a) {
|
|
184936
184797
|
var decorators = _a[1], modifiers = _a[2], expression = _a[3];
|
|
184937
|
-
return (decorators === undefined || ts.
|
|
184798
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184938
184799
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184939
184800
|
(expression !== undefined && ts.isExpression(expression));
|
|
184940
184801
|
},
|
|
@@ -184956,7 +184817,7 @@ var ts;
|
|
|
184956
184817
|
0: function (_a) {
|
|
184957
184818
|
var modifiers = _a[0], isTypeOnly = _a[1], exportClause = _a[2], moduleSpecifier = _a[3], assertClause = _a[4], other = _a[5];
|
|
184958
184819
|
return (other === undefined) &&
|
|
184959
|
-
(modifiers === undefined || ts.
|
|
184820
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184960
184821
|
(typeof isTypeOnly === "boolean") &&
|
|
184961
184822
|
(typeof exportClause !== "boolean") &&
|
|
184962
184823
|
(moduleSpecifier === undefined || ts.isExpression(moduleSpecifier)) &&
|
|
@@ -184964,7 +184825,7 @@ var ts;
|
|
|
184964
184825
|
},
|
|
184965
184826
|
1: function (_a) {
|
|
184966
184827
|
var decorators = _a[0], modifiers = _a[1], isTypeOnly = _a[2], exportClause = _a[3], moduleSpecifier = _a[4], assertClause = _a[5];
|
|
184967
|
-
return (decorators === undefined || ts.
|
|
184828
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
184968
184829
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
184969
184830
|
(typeof isTypeOnly === "boolean") &&
|
|
184970
184831
|
(exportClause === undefined || ts.isNamedExportBindings(exportClause)) &&
|
|
@@ -184989,7 +184850,7 @@ var ts;
|
|
|
184989
184850
|
0: function (_a) {
|
|
184990
184851
|
var modifiers = _a[1], isTypeOnly = _a[2], exportClause = _a[3], moduleSpecifier = _a[4], assertClause = _a[5], other = _a[6];
|
|
184991
184852
|
return (other === undefined) &&
|
|
184992
|
-
(modifiers === undefined || ts.
|
|
184853
|
+
(modifiers === undefined || ts.every(modifiers, ts.isModifier)) &&
|
|
184993
184854
|
(typeof isTypeOnly === "boolean") &&
|
|
184994
184855
|
(typeof exportClause !== "boolean") &&
|
|
184995
184856
|
(moduleSpecifier === undefined || ts.isExpression(moduleSpecifier)) &&
|
|
@@ -184997,7 +184858,7 @@ var ts;
|
|
|
184997
184858
|
},
|
|
184998
184859
|
1: function (_a) {
|
|
184999
184860
|
var decorators = _a[1], modifiers = _a[2], isTypeOnly = _a[3], exportClause = _a[4], moduleSpecifier = _a[5], assertClause = _a[6];
|
|
185000
|
-
return (decorators === undefined || ts.
|
|
184861
|
+
return (decorators === undefined || ts.every(decorators, ts.isDecorator)) &&
|
|
185001
184862
|
(modifiers === undefined || ts.isArray(modifiers)) &&
|
|
185002
184863
|
(typeof isTypeOnly === "boolean") &&
|
|
185003
184864
|
(exportClause === undefined || ts.isNamedExportBindings(exportClause)) &&
|