typescript 5.1.0-dev.20230323 → 5.1.0-dev.20230325
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 +566 -369
- package/lib/tsserver.js +707 -489
- package/lib/tsserverlibrary.d.ts +2 -1
- package/lib/tsserverlibrary.js +707 -489
- package/lib/typescript.d.ts +2 -1
- package/lib/typescript.js +703 -485
- package/lib/typingsInstaller.js +177 -113
- package/package.json +2 -2
package/lib/tsc.js
CHANGED
|
@@ -18,7 +18,7 @@ and limitations under the License.
|
|
|
18
18
|
|
|
19
19
|
// src/compiler/corePublic.ts
|
|
20
20
|
var versionMajorMinor = "5.1";
|
|
21
|
-
var version = `${versionMajorMinor}.0-dev.
|
|
21
|
+
var version = `${versionMajorMinor}.0-dev.20230325`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -5746,7 +5746,6 @@ var Diagnostics = {
|
|
|
5746
5746
|
_0_modifier_cannot_appear_on_an_index_signature: diag(1071, 1 /* Error */, "_0_modifier_cannot_appear_on_an_index_signature_1071", "'{0}' modifier cannot appear on an index signature."),
|
|
5747
5747
|
A_0_modifier_cannot_be_used_with_an_import_declaration: diag(1079, 1 /* Error */, "A_0_modifier_cannot_be_used_with_an_import_declaration_1079", "A '{0}' modifier cannot be used with an import declaration."),
|
|
5748
5748
|
Invalid_reference_directive_syntax: diag(1084, 1 /* Error */, "Invalid_reference_directive_syntax_1084", "Invalid 'reference' directive syntax."),
|
|
5749
|
-
Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0: diag(1085, 1 /* Error */, "Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0_1085", "Octal literals are not available when targeting ECMAScript 5 and higher. Use the syntax '{0}'."),
|
|
5750
5749
|
_0_modifier_cannot_appear_on_a_constructor_declaration: diag(1089, 1 /* Error */, "_0_modifier_cannot_appear_on_a_constructor_declaration_1089", "'{0}' modifier cannot appear on a constructor declaration."),
|
|
5751
5750
|
_0_modifier_cannot_appear_on_a_parameter: diag(1090, 1 /* Error */, "_0_modifier_cannot_appear_on_a_parameter_1090", "'{0}' modifier cannot appear on a parameter."),
|
|
5752
5751
|
Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement: diag(1091, 1 /* Error */, "Only_a_single_variable_declaration_is_allowed_in_a_for_in_statement_1091", "Only a single variable declaration is allowed in a 'for...in' statement."),
|
|
@@ -5777,7 +5776,7 @@ var Diagnostics = {
|
|
|
5777
5776
|
An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name: diag(1118, 1 /* Error */, "An_object_literal_cannot_have_multiple_get_Slashset_accessors_with_the_same_name_1118", "An object literal cannot have multiple get/set accessors with the same name."),
|
|
5778
5777
|
An_object_literal_cannot_have_property_and_accessor_with_the_same_name: diag(1119, 1 /* Error */, "An_object_literal_cannot_have_property_and_accessor_with_the_same_name_1119", "An object literal cannot have property and accessor with the same name."),
|
|
5779
5778
|
An_export_assignment_cannot_have_modifiers: diag(1120, 1 /* Error */, "An_export_assignment_cannot_have_modifiers_1120", "An export assignment cannot have modifiers."),
|
|
5780
|
-
|
|
5779
|
+
Octal_literals_are_not_allowed_Use_the_syntax_0: diag(1121, 1 /* Error */, "Octal_literals_are_not_allowed_Use_the_syntax_0_1121", "Octal literals are not allowed. Use the syntax '{0}'."),
|
|
5781
5780
|
Variable_declaration_list_cannot_be_empty: diag(1123, 1 /* Error */, "Variable_declaration_list_cannot_be_empty_1123", "Variable declaration list cannot be empty."),
|
|
5782
5781
|
Digit_expected: diag(1124, 1 /* Error */, "Digit_expected_1124", "Digit expected."),
|
|
5783
5782
|
Hexadecimal_digit_expected: diag(1125, 1 /* Error */, "Hexadecimal_digit_expected_1125", "Hexadecimal digit expected."),
|
|
@@ -6088,6 +6087,9 @@ var Diagnostics = {
|
|
|
6088
6087
|
_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1484, 1 /* Error */, "_0_is_a_type_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled_1484", "'{0}' is a type and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
6089
6088
|
_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimModuleSyntax_is_enabled: diag(1485, 1 /* Error */, "_0_resolves_to_a_type_only_declaration_and_must_be_imported_using_a_type_only_import_when_verbatimMo_1485", "'{0}' resolves to a type-only declaration and must be imported using a type-only import when 'verbatimModuleSyntax' is enabled."),
|
|
6090
6089
|
Decorator_used_before_export_here: diag(1486, 1 /* Error */, "Decorator_used_before_export_here_1486", "Decorator used before 'export' here."),
|
|
6090
|
+
Octal_escape_sequences_are_not_allowed_Use_the_syntax_0: diag(1487, 1 /* Error */, "Octal_escape_sequences_are_not_allowed_Use_the_syntax_0_1487", "Octal escape sequences are not allowed. Use the syntax '{0}'."),
|
|
6091
|
+
Escape_sequence_0_is_not_allowed: diag(1488, 1 /* Error */, "Escape_sequence_0_is_not_allowed_1488", "Escape sequence '{0}' is not allowed."),
|
|
6092
|
+
Decimals_with_leading_zeros_are_not_allowed: diag(1489, 1 /* Error */, "Decimals_with_leading_zeros_are_not_allowed_1489", "Decimals with leading zeros are not allowed."),
|
|
6091
6093
|
The_types_of_0_are_incompatible_between_these_types: diag(2200, 1 /* Error */, "The_types_of_0_are_incompatible_between_these_types_2200", "The types of '{0}' are incompatible between these types."),
|
|
6092
6094
|
The_types_returned_by_0_are_incompatible_between_these_types: diag(2201, 1 /* Error */, "The_types_returned_by_0_are_incompatible_between_these_types_2201", "The types returned by '{0}' are incompatible between these types."),
|
|
6093
6095
|
Call_signature_return_types_0_and_1_are_incompatible: diag(
|
|
@@ -7428,8 +7430,6 @@ var Diagnostics = {
|
|
|
7428
7430
|
Parameter_modifiers_can_only_be_used_in_TypeScript_files: diag(8012, 1 /* Error */, "Parameter_modifiers_can_only_be_used_in_TypeScript_files_8012", "Parameter modifiers can only be used in TypeScript files."),
|
|
7429
7431
|
Non_null_assertions_can_only_be_used_in_TypeScript_files: diag(8013, 1 /* Error */, "Non_null_assertions_can_only_be_used_in_TypeScript_files_8013", "Non-null assertions can only be used in TypeScript files."),
|
|
7430
7432
|
Type_assertion_expressions_can_only_be_used_in_TypeScript_files: diag(8016, 1 /* Error */, "Type_assertion_expressions_can_only_be_used_in_TypeScript_files_8016", "Type assertion expressions can only be used in TypeScript files."),
|
|
7431
|
-
Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0: diag(8017, 1 /* Error */, "Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0_8017", "Octal literal types must use ES2015 syntax. Use the syntax '{0}'."),
|
|
7432
|
-
Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0: diag(8018, 1 /* Error */, "Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0_8018", "Octal literals are not allowed in enums members initializer. Use the syntax '{0}'."),
|
|
7433
7433
|
Report_errors_in_js_files: diag(8019, 3 /* Message */, "Report_errors_in_js_files_8019", "Report errors in .js files."),
|
|
7434
7434
|
JSDoc_types_can_only_be_used_inside_documentation_comments: diag(8020, 1 /* Error */, "JSDoc_types_can_only_be_used_inside_documentation_comments_8020", "JSDoc types can only be used inside documentation comments."),
|
|
7435
7435
|
JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags: diag(8021, 1 /* Error */, "JSDoc_typedef_tag_should_either_have_a_type_annotation_or_be_followed_by_property_or_member_tags_8021", "JSDoc '@typedef' tag should either have a type annotation or be followed by '@property' or '@member' tags."),
|
|
@@ -8411,7 +8411,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8411
8411
|
isReservedWord: () => token >= 82 /* FirstReservedWord */ && token <= 117 /* LastReservedWord */,
|
|
8412
8412
|
isUnterminated: () => (tokenFlags & 4 /* Unterminated */) !== 0,
|
|
8413
8413
|
getCommentDirectives: () => commentDirectives,
|
|
8414
|
-
getNumericLiteralFlags: () => tokenFlags &
|
|
8414
|
+
getNumericLiteralFlags: () => tokenFlags & 25584 /* NumericLiteralFlags */,
|
|
8415
8415
|
getTokenFlags: () => tokenFlags,
|
|
8416
8416
|
reScanGreaterToken,
|
|
8417
8417
|
reScanAsteriskEqualsToken,
|
|
@@ -8452,11 +8452,11 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8452
8452
|
});
|
|
8453
8453
|
}
|
|
8454
8454
|
return scanner;
|
|
8455
|
-
function error(message, errPos = pos, length3) {
|
|
8455
|
+
function error(message, errPos = pos, length3, arg0) {
|
|
8456
8456
|
if (onError) {
|
|
8457
8457
|
const oldPos = pos;
|
|
8458
8458
|
pos = errPos;
|
|
8459
|
-
onError(message, length3 || 0);
|
|
8459
|
+
onError(message, length3 || 0, arg0);
|
|
8460
8460
|
pos = oldPos;
|
|
8461
8461
|
}
|
|
8462
8462
|
}
|
|
@@ -8473,10 +8473,13 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8473
8473
|
allowSeparator = false;
|
|
8474
8474
|
isPreviousTokenSeparator = true;
|
|
8475
8475
|
result += text.substring(start2, pos);
|
|
8476
|
-
} else if (isPreviousTokenSeparator) {
|
|
8477
|
-
error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);
|
|
8478
8476
|
} else {
|
|
8479
|
-
|
|
8477
|
+
tokenFlags |= 16384 /* ContainsInvalidSeparator */;
|
|
8478
|
+
if (isPreviousTokenSeparator) {
|
|
8479
|
+
error(Diagnostics.Multiple_consecutive_numeric_separators_are_not_permitted, pos, 1);
|
|
8480
|
+
} else {
|
|
8481
|
+
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);
|
|
8482
|
+
}
|
|
8480
8483
|
}
|
|
8481
8484
|
pos++;
|
|
8482
8485
|
start2 = pos;
|
|
@@ -8491,13 +8494,39 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8491
8494
|
break;
|
|
8492
8495
|
}
|
|
8493
8496
|
if (text.charCodeAt(pos - 1) === 95 /* _ */) {
|
|
8497
|
+
tokenFlags |= 16384 /* ContainsInvalidSeparator */;
|
|
8494
8498
|
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos - 1, 1);
|
|
8495
8499
|
}
|
|
8496
8500
|
return result + text.substring(start2, pos);
|
|
8497
8501
|
}
|
|
8498
8502
|
function scanNumber() {
|
|
8499
|
-
|
|
8500
|
-
|
|
8503
|
+
let start2 = pos;
|
|
8504
|
+
let mainFragment;
|
|
8505
|
+
if (text.charCodeAt(pos) === 48 /* _0 */) {
|
|
8506
|
+
pos++;
|
|
8507
|
+
if (text.charCodeAt(pos) === 95 /* _ */) {
|
|
8508
|
+
tokenFlags |= 512 /* ContainsSeparator */ | 16384 /* ContainsInvalidSeparator */;
|
|
8509
|
+
error(Diagnostics.Numeric_separators_are_not_allowed_here, pos, 1);
|
|
8510
|
+
pos--;
|
|
8511
|
+
mainFragment = scanNumberFragment();
|
|
8512
|
+
} else if (!scanDigits()) {
|
|
8513
|
+
tokenFlags |= 8192 /* ContainsLeadingZero */;
|
|
8514
|
+
mainFragment = "" + +tokenValue;
|
|
8515
|
+
} else if (!tokenValue) {
|
|
8516
|
+
mainFragment = "0";
|
|
8517
|
+
} else {
|
|
8518
|
+
tokenValue = "" + parseInt(tokenValue, 8);
|
|
8519
|
+
tokenFlags |= 32 /* Octal */;
|
|
8520
|
+
const withMinus = token === 40 /* MinusToken */;
|
|
8521
|
+
const literal = (withMinus ? "-" : "") + "0o" + (+tokenValue).toString(8);
|
|
8522
|
+
if (withMinus)
|
|
8523
|
+
start2--;
|
|
8524
|
+
error(Diagnostics.Octal_literals_are_not_allowed_Use_the_syntax_0, start2, pos - start2, literal);
|
|
8525
|
+
return { type: 8 /* NumericLiteral */, value: tokenValue };
|
|
8526
|
+
}
|
|
8527
|
+
} else {
|
|
8528
|
+
mainFragment = scanNumberFragment();
|
|
8529
|
+
}
|
|
8501
8530
|
let decimalFragment;
|
|
8502
8531
|
let scientificFragment;
|
|
8503
8532
|
if (text.charCodeAt(pos) === 46 /* dot */) {
|
|
@@ -8531,6 +8560,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8531
8560
|
} else {
|
|
8532
8561
|
result = text.substring(start2, end2);
|
|
8533
8562
|
}
|
|
8563
|
+
if (tokenFlags & 8192 /* ContainsLeadingZero */) {
|
|
8564
|
+
error(Diagnostics.Decimals_with_leading_zeros_are_not_allowed, start2, end2 - start2);
|
|
8565
|
+
return { type: 8 /* NumericLiteral */, value: "" + +result };
|
|
8566
|
+
}
|
|
8534
8567
|
if (decimalFragment !== void 0 || tokenFlags & 16 /* Scientific */) {
|
|
8535
8568
|
checkForIdentifierStartAfterNumericLiteral(start2, decimalFragment === void 0 && !!(tokenFlags & 16 /* Scientific */));
|
|
8536
8569
|
return {
|
|
@@ -8562,12 +8595,17 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8562
8595
|
pos = identifierStart;
|
|
8563
8596
|
}
|
|
8564
8597
|
}
|
|
8565
|
-
function
|
|
8598
|
+
function scanDigits() {
|
|
8566
8599
|
const start2 = pos;
|
|
8567
|
-
|
|
8600
|
+
let isOctal = true;
|
|
8601
|
+
while (isDigit(text.charCodeAt(pos))) {
|
|
8602
|
+
if (!isOctalDigit(text.charCodeAt(pos))) {
|
|
8603
|
+
isOctal = false;
|
|
8604
|
+
}
|
|
8568
8605
|
pos++;
|
|
8569
8606
|
}
|
|
8570
|
-
|
|
8607
|
+
tokenValue = text.substring(start2, pos);
|
|
8608
|
+
return isOctal;
|
|
8571
8609
|
}
|
|
8572
8610
|
function scanExactNumberOfHexDigits(count, canHaveSeparators) {
|
|
8573
8611
|
const valueString = scanHexDigits(
|
|
@@ -8645,7 +8683,10 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8645
8683
|
}
|
|
8646
8684
|
if (ch === 92 /* backslash */ && !jsxAttributeString) {
|
|
8647
8685
|
result += text.substring(start2, pos);
|
|
8648
|
-
result += scanEscapeSequence(
|
|
8686
|
+
result += scanEscapeSequence(
|
|
8687
|
+
/*shouldEmitInvalidEscapeError*/
|
|
8688
|
+
true
|
|
8689
|
+
);
|
|
8649
8690
|
start2 = pos;
|
|
8650
8691
|
continue;
|
|
8651
8692
|
}
|
|
@@ -8659,7 +8700,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8659
8700
|
}
|
|
8660
8701
|
return result;
|
|
8661
8702
|
}
|
|
8662
|
-
function scanTemplateAndSetTokenValue(
|
|
8703
|
+
function scanTemplateAndSetTokenValue(shouldEmitInvalidEscapeError) {
|
|
8663
8704
|
const startedWithBacktick = text.charCodeAt(pos) === 96 /* backtick */;
|
|
8664
8705
|
pos++;
|
|
8665
8706
|
let start2 = pos;
|
|
@@ -8688,7 +8729,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8688
8729
|
}
|
|
8689
8730
|
if (currChar === 92 /* backslash */) {
|
|
8690
8731
|
contents += text.substring(start2, pos);
|
|
8691
|
-
contents += scanEscapeSequence(
|
|
8732
|
+
contents += scanEscapeSequence(shouldEmitInvalidEscapeError);
|
|
8692
8733
|
start2 = pos;
|
|
8693
8734
|
continue;
|
|
8694
8735
|
}
|
|
@@ -8708,7 +8749,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8708
8749
|
tokenValue = contents;
|
|
8709
8750
|
return resultingToken;
|
|
8710
8751
|
}
|
|
8711
|
-
function scanEscapeSequence(
|
|
8752
|
+
function scanEscapeSequence(shouldEmitInvalidEscapeError) {
|
|
8712
8753
|
const start2 = pos;
|
|
8713
8754
|
pos++;
|
|
8714
8755
|
if (pos >= end) {
|
|
@@ -8719,12 +8760,37 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8719
8760
|
pos++;
|
|
8720
8761
|
switch (ch) {
|
|
8721
8762
|
case 48 /* _0 */:
|
|
8722
|
-
if (
|
|
8763
|
+
if (pos >= end || !isDigit(text.charCodeAt(pos))) {
|
|
8764
|
+
return "\0";
|
|
8765
|
+
}
|
|
8766
|
+
case 49 /* _1 */:
|
|
8767
|
+
case 50 /* _2 */:
|
|
8768
|
+
case 51 /* _3 */:
|
|
8769
|
+
if (pos < end && isOctalDigit(text.charCodeAt(pos))) {
|
|
8770
|
+
pos++;
|
|
8771
|
+
}
|
|
8772
|
+
case 52 /* _4 */:
|
|
8773
|
+
case 53 /* _5 */:
|
|
8774
|
+
case 54 /* _6 */:
|
|
8775
|
+
case 55 /* _7 */:
|
|
8776
|
+
if (pos < end && isOctalDigit(text.charCodeAt(pos))) {
|
|
8723
8777
|
pos++;
|
|
8724
|
-
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8725
|
-
return text.substring(start2, pos);
|
|
8726
8778
|
}
|
|
8727
|
-
|
|
8779
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8780
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8781
|
+
const code = parseInt(text.substring(start2 + 1, pos), 8);
|
|
8782
|
+
error(Diagnostics.Octal_escape_sequences_are_not_allowed_Use_the_syntax_0, start2, pos - start2, "\\x" + padLeft(code.toString(16), 2, "0"));
|
|
8783
|
+
return String.fromCharCode(code);
|
|
8784
|
+
}
|
|
8785
|
+
return text.substring(start2, pos);
|
|
8786
|
+
case 56 /* _8 */:
|
|
8787
|
+
case 57 /* _9 */:
|
|
8788
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8789
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8790
|
+
error(Diagnostics.Escape_sequence_0_is_not_allowed, start2, pos - start2, text.substring(start2, pos));
|
|
8791
|
+
return String.fromCharCode(ch);
|
|
8792
|
+
}
|
|
8793
|
+
return text.substring(start2, pos);
|
|
8728
8794
|
case 98 /* b */:
|
|
8729
8795
|
return "\b";
|
|
8730
8796
|
case 116 /* t */:
|
|
@@ -8742,59 +8808,69 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8742
8808
|
case 34 /* doubleQuote */:
|
|
8743
8809
|
return '"';
|
|
8744
8810
|
case 117 /* u */:
|
|
8745
|
-
if (isTaggedTemplate) {
|
|
8746
|
-
for (let escapePos = pos; escapePos < pos + 4; escapePos++) {
|
|
8747
|
-
if (escapePos < end && !isHexDigit(text.charCodeAt(escapePos)) && text.charCodeAt(escapePos) !== 123 /* openBrace */) {
|
|
8748
|
-
pos = escapePos;
|
|
8749
|
-
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8750
|
-
return text.substring(start2, pos);
|
|
8751
|
-
}
|
|
8752
|
-
}
|
|
8753
|
-
}
|
|
8754
8811
|
if (pos < end && text.charCodeAt(pos) === 123 /* openBrace */) {
|
|
8755
8812
|
pos++;
|
|
8756
|
-
|
|
8813
|
+
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
8814
|
+
1,
|
|
8815
|
+
/*canHaveSeparators*/
|
|
8816
|
+
false
|
|
8817
|
+
);
|
|
8818
|
+
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
8819
|
+
if (escapedValue < 0) {
|
|
8757
8820
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8821
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8822
|
+
error(Diagnostics.Hexadecimal_digit_expected);
|
|
8823
|
+
}
|
|
8758
8824
|
return text.substring(start2, pos);
|
|
8759
8825
|
}
|
|
8760
|
-
if (
|
|
8761
|
-
|
|
8762
|
-
|
|
8763
|
-
|
|
8764
|
-
/*canHaveSeparators*/
|
|
8765
|
-
false
|
|
8766
|
-
);
|
|
8767
|
-
const escapedValue = escapedValueString ? parseInt(escapedValueString, 16) : -1;
|
|
8768
|
-
if (!isCodePoint(escapedValue) || text.charCodeAt(pos) !== 125 /* closeBrace */) {
|
|
8769
|
-
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8770
|
-
return text.substring(start2, pos);
|
|
8771
|
-
} else {
|
|
8772
|
-
pos = savePos;
|
|
8826
|
+
if (!isCodePoint(escapedValue)) {
|
|
8827
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8828
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8829
|
+
error(Diagnostics.An_extended_Unicode_escape_value_must_be_between_0x0_and_0x10FFFF_inclusive);
|
|
8773
8830
|
}
|
|
8831
|
+
return text.substring(start2, pos);
|
|
8832
|
+
}
|
|
8833
|
+
if (pos >= end) {
|
|
8834
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8835
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8836
|
+
error(Diagnostics.Unexpected_end_of_text);
|
|
8837
|
+
}
|
|
8838
|
+
return text.substring(start2, pos);
|
|
8774
8839
|
}
|
|
8840
|
+
if (text.charCodeAt(pos) !== 125 /* closeBrace */) {
|
|
8841
|
+
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8842
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8843
|
+
error(Diagnostics.Unterminated_Unicode_escape_sequence);
|
|
8844
|
+
}
|
|
8845
|
+
return text.substring(start2, pos);
|
|
8846
|
+
}
|
|
8847
|
+
pos++;
|
|
8775
8848
|
tokenFlags |= 8 /* ExtendedUnicodeEscape */;
|
|
8776
|
-
return
|
|
8849
|
+
return utf16EncodeAsString(escapedValue);
|
|
8777
8850
|
}
|
|
8778
|
-
|
|
8779
|
-
|
|
8780
|
-
/*numDigits*/
|
|
8781
|
-
4
|
|
8782
|
-
);
|
|
8783
|
-
case 120 /* x */:
|
|
8784
|
-
if (isTaggedTemplate) {
|
|
8785
|
-
if (!isHexDigit(text.charCodeAt(pos))) {
|
|
8851
|
+
for (; pos < start2 + 6; pos++) {
|
|
8852
|
+
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
8786
8853
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8854
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8855
|
+
error(Diagnostics.Hexadecimal_digit_expected);
|
|
8856
|
+
}
|
|
8787
8857
|
return text.substring(start2, pos);
|
|
8788
|
-
}
|
|
8789
|
-
|
|
8858
|
+
}
|
|
8859
|
+
}
|
|
8860
|
+
tokenFlags |= 1024 /* UnicodeEscape */;
|
|
8861
|
+
return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));
|
|
8862
|
+
case 120 /* x */:
|
|
8863
|
+
for (; pos < start2 + 4; pos++) {
|
|
8864
|
+
if (!(pos < end && isHexDigit(text.charCodeAt(pos)))) {
|
|
8790
8865
|
tokenFlags |= 2048 /* ContainsInvalidEscape */;
|
|
8866
|
+
if (shouldEmitInvalidEscapeError) {
|
|
8867
|
+
error(Diagnostics.Hexadecimal_digit_expected);
|
|
8868
|
+
}
|
|
8791
8869
|
return text.substring(start2, pos);
|
|
8792
8870
|
}
|
|
8793
8871
|
}
|
|
8794
|
-
|
|
8795
|
-
|
|
8796
|
-
2
|
|
8797
|
-
);
|
|
8872
|
+
tokenFlags |= 4096 /* HexEscape */;
|
|
8873
|
+
return String.fromCharCode(parseInt(text.substring(start2 + 2, pos), 16));
|
|
8798
8874
|
case 13 /* carriageReturn */:
|
|
8799
8875
|
if (pos < end && text.charCodeAt(pos) === 10 /* lineFeed */) {
|
|
8800
8876
|
pos++;
|
|
@@ -8807,19 +8883,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
8807
8883
|
return String.fromCharCode(ch);
|
|
8808
8884
|
}
|
|
8809
8885
|
}
|
|
8810
|
-
function scanHexadecimalEscape(numDigits) {
|
|
8811
|
-
const escapedValue = scanExactNumberOfHexDigits(
|
|
8812
|
-
numDigits,
|
|
8813
|
-
/*canHaveSeparators*/
|
|
8814
|
-
false
|
|
8815
|
-
);
|
|
8816
|
-
if (escapedValue >= 0) {
|
|
8817
|
-
return String.fromCharCode(escapedValue);
|
|
8818
|
-
} else {
|
|
8819
|
-
error(Diagnostics.Hexadecimal_digit_expected);
|
|
8820
|
-
return "";
|
|
8821
|
-
}
|
|
8822
|
-
}
|
|
8823
8886
|
function scanExtendedUnicodeEscape() {
|
|
8824
8887
|
const escapedValueString = scanMinimumNumberOfHexDigits(
|
|
8825
8888
|
1,
|
|
@@ -9048,7 +9111,7 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9048
9111
|
return token = 10 /* StringLiteral */;
|
|
9049
9112
|
case 96 /* backtick */:
|
|
9050
9113
|
return token = scanTemplateAndSetTokenValue(
|
|
9051
|
-
/*
|
|
9114
|
+
/*shouldEmitInvalidEscapeError*/
|
|
9052
9115
|
false
|
|
9053
9116
|
);
|
|
9054
9117
|
case 37 /* percent */:
|
|
@@ -9223,11 +9286,6 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9223
9286
|
tokenFlags |= 256 /* OctalSpecifier */;
|
|
9224
9287
|
return token = checkBigIntSuffix();
|
|
9225
9288
|
}
|
|
9226
|
-
if (pos + 1 < end && isOctalDigit(text.charCodeAt(pos + 1))) {
|
|
9227
|
-
tokenValue = "" + scanOctalDigits();
|
|
9228
|
-
tokenFlags |= 32 /* Octal */;
|
|
9229
|
-
return token = 8 /* NumericLiteral */;
|
|
9230
|
-
}
|
|
9231
9289
|
case 49 /* _1 */:
|
|
9232
9290
|
case 50 /* _2 */:
|
|
9233
9291
|
case 51 /* _3 */:
|
|
@@ -9544,14 +9602,13 @@ function createScanner(languageVersion, skipTrivia2, languageVariant = 0 /* Stan
|
|
|
9544
9602
|
return void 0;
|
|
9545
9603
|
}
|
|
9546
9604
|
function reScanTemplateToken(isTaggedTemplate) {
|
|
9547
|
-
Debug.assert(token === 19 /* CloseBraceToken */, "'reScanTemplateToken' should only be called on a '}'");
|
|
9548
9605
|
pos = tokenStart;
|
|
9549
|
-
return token = scanTemplateAndSetTokenValue(isTaggedTemplate);
|
|
9606
|
+
return token = scanTemplateAndSetTokenValue(!isTaggedTemplate);
|
|
9550
9607
|
}
|
|
9551
9608
|
function reScanTemplateHeadOrNoSubstitutionTemplate() {
|
|
9552
9609
|
pos = tokenStart;
|
|
9553
9610
|
return token = scanTemplateAndSetTokenValue(
|
|
9554
|
-
/*
|
|
9611
|
+
/*shouldEmitInvalidEscapeError*/
|
|
9555
9612
|
true
|
|
9556
9613
|
);
|
|
9557
9614
|
}
|
|
@@ -12041,8 +12098,13 @@ function canUseOriginalText(node, flags) {
|
|
|
12041
12098
|
if (nodeIsSynthesized(node) || !node.parent || flags & 4 /* TerminateUnterminatedLiterals */ && node.isUnterminated) {
|
|
12042
12099
|
return false;
|
|
12043
12100
|
}
|
|
12044
|
-
if (isNumericLiteral(node)
|
|
12045
|
-
|
|
12101
|
+
if (isNumericLiteral(node)) {
|
|
12102
|
+
if (node.numericLiteralFlags & 26656 /* IsInvalid */) {
|
|
12103
|
+
return false;
|
|
12104
|
+
}
|
|
12105
|
+
if (node.numericLiteralFlags & 512 /* ContainsSeparator */) {
|
|
12106
|
+
return !!(flags & 8 /* AllowNumericSeparator */);
|
|
12107
|
+
}
|
|
12046
12108
|
}
|
|
12047
12109
|
return !isBigIntLiteral(node);
|
|
12048
12110
|
}
|
|
@@ -12324,7 +12386,7 @@ function getSpanOfTokenAtPosition(sourceFile, pos) {
|
|
|
12324
12386
|
true,
|
|
12325
12387
|
sourceFile.languageVariant,
|
|
12326
12388
|
sourceFile.text,
|
|
12327
|
-
/*onError
|
|
12389
|
+
/*onError*/
|
|
12328
12390
|
void 0,
|
|
12329
12391
|
pos
|
|
12330
12392
|
);
|
|
@@ -12339,7 +12401,7 @@ function scanTokenAtPosition(sourceFile, pos) {
|
|
|
12339
12401
|
true,
|
|
12340
12402
|
sourceFile.languageVariant,
|
|
12341
12403
|
sourceFile.text,
|
|
12342
|
-
/*onError
|
|
12404
|
+
/*onError*/
|
|
12343
12405
|
void 0,
|
|
12344
12406
|
pos
|
|
12345
12407
|
);
|
|
@@ -12558,15 +12620,6 @@ function isPartOfTypeNode(node) {
|
|
|
12558
12620
|
}
|
|
12559
12621
|
return false;
|
|
12560
12622
|
}
|
|
12561
|
-
function isChildOfNodeWithKind(node, kind) {
|
|
12562
|
-
while (node) {
|
|
12563
|
-
if (node.kind === kind) {
|
|
12564
|
-
return true;
|
|
12565
|
-
}
|
|
12566
|
-
node = node.parent;
|
|
12567
|
-
}
|
|
12568
|
-
return false;
|
|
12569
|
-
}
|
|
12570
12623
|
function forEachReturnStatement(body, visitor) {
|
|
12571
12624
|
return traverse(body);
|
|
12572
12625
|
function traverse(node) {
|
|
@@ -13309,7 +13362,7 @@ function isSameEntityName(name, initializer) {
|
|
|
13309
13362
|
function getRightMostAssignedExpression(node) {
|
|
13310
13363
|
while (isAssignmentExpression(
|
|
13311
13364
|
node,
|
|
13312
|
-
/*
|
|
13365
|
+
/*excludeCompoundAssignment*/
|
|
13313
13366
|
true
|
|
13314
13367
|
)) {
|
|
13315
13368
|
node = node.right;
|
|
@@ -17429,7 +17482,7 @@ function createParenthesizerRules(factory2) {
|
|
|
17429
17482
|
if (!needsParens) {
|
|
17430
17483
|
switch (getLeftmostExpression(
|
|
17431
17484
|
check,
|
|
17432
|
-
/*
|
|
17485
|
+
/*stopAtCallExpressions*/
|
|
17433
17486
|
false
|
|
17434
17487
|
).kind) {
|
|
17435
17488
|
case 229 /* ClassExpression */:
|
|
@@ -19824,7 +19877,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19824
19877
|
return node.head !== head || node.templateSpans !== templateSpans ? update(createTemplateExpression(head, templateSpans), node) : node;
|
|
19825
19878
|
}
|
|
19826
19879
|
function checkTemplateLiteralLikeNode(kind, text, rawText, templateFlags = 0 /* None */) {
|
|
19827
|
-
Debug.assert(!(templateFlags & ~
|
|
19880
|
+
Debug.assert(!(templateFlags & ~7176 /* TemplateLiteralLikeFlags */), "Unsupported template flags.");
|
|
19828
19881
|
let cooked = void 0;
|
|
19829
19882
|
if (rawText !== void 0 && rawText !== text) {
|
|
19830
19883
|
cooked = getCookedText(kind, rawText);
|
|
@@ -19853,7 +19906,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19853
19906
|
const node = createBaseToken(kind);
|
|
19854
19907
|
node.text = text;
|
|
19855
19908
|
node.rawText = rawText;
|
|
19856
|
-
node.templateFlags = templateFlags &
|
|
19909
|
+
node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */;
|
|
19857
19910
|
node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);
|
|
19858
19911
|
return node;
|
|
19859
19912
|
}
|
|
@@ -19861,7 +19914,7 @@ function createNodeFactory(flags, baseFactory2) {
|
|
|
19861
19914
|
const node = createBaseDeclaration(kind);
|
|
19862
19915
|
node.text = text;
|
|
19863
19916
|
node.rawText = rawText;
|
|
19864
|
-
node.templateFlags = templateFlags &
|
|
19917
|
+
node.templateFlags = templateFlags & 7176 /* TemplateLiteralLikeFlags */;
|
|
19865
19918
|
node.transformFlags = getTransformFlagsOfTemplateLiteralLike(node.templateFlags);
|
|
19866
19919
|
return node;
|
|
19867
19920
|
}
|
|
@@ -23161,7 +23214,7 @@ function createEmitHelperFactory(context) {
|
|
|
23161
23214
|
context.requestEmitHelper(classPrivateFieldInHelper);
|
|
23162
23215
|
return factory2.createCallExpression(
|
|
23163
23216
|
getUnscopedHelperName("__classPrivateFieldIn"),
|
|
23164
|
-
/*
|
|
23217
|
+
/*typeArguments*/
|
|
23165
23218
|
void 0,
|
|
23166
23219
|
[state, receiver]
|
|
23167
23220
|
);
|
|
@@ -25226,7 +25279,7 @@ function createAccessorPropertySetRedirector(factory2, node, modifiers, name) {
|
|
|
25226
25279
|
[factory2.createParameterDeclaration(
|
|
25227
25280
|
/*modifiers*/
|
|
25228
25281
|
void 0,
|
|
25229
|
-
/*
|
|
25282
|
+
/*dotDotDotToken*/
|
|
25230
25283
|
void 0,
|
|
25231
25284
|
"value"
|
|
25232
25285
|
)],
|
|
@@ -26172,7 +26225,7 @@ var Parser;
|
|
|
26172
26225
|
fileName2,
|
|
26173
26226
|
2 /* ES2015 */,
|
|
26174
26227
|
6 /* JSON */,
|
|
26175
|
-
/*
|
|
26228
|
+
/*isDeclarationFile*/
|
|
26176
26229
|
false,
|
|
26177
26230
|
statements,
|
|
26178
26231
|
endOfFileToken,
|
|
@@ -26526,8 +26579,8 @@ var Parser;
|
|
|
26526
26579
|
function parseErrorAtRange(range, message, ...args) {
|
|
26527
26580
|
parseErrorAt(range.pos, range.end, message, ...args);
|
|
26528
26581
|
}
|
|
26529
|
-
function scanError(message, length2) {
|
|
26530
|
-
parseErrorAtPosition(scanner.getTokenEnd(), length2, message);
|
|
26582
|
+
function scanError(message, length2, arg0) {
|
|
26583
|
+
parseErrorAtPosition(scanner.getTokenEnd(), length2, message, arg0);
|
|
26531
26584
|
}
|
|
26532
26585
|
function getNodePos() {
|
|
26533
26586
|
return scanner.getTokenFullStart();
|
|
@@ -26566,9 +26619,6 @@ var Parser;
|
|
|
26566
26619
|
function reScanTemplateToken(isTaggedTemplate) {
|
|
26567
26620
|
return currentToken = scanner.reScanTemplateToken(isTaggedTemplate);
|
|
26568
26621
|
}
|
|
26569
|
-
function reScanTemplateHeadOrNoSubstitutionTemplate() {
|
|
26570
|
-
return currentToken = scanner.reScanTemplateHeadOrNoSubstitutionTemplate();
|
|
26571
|
-
}
|
|
26572
26622
|
function reScanLessThanToken() {
|
|
26573
26623
|
return currentToken = scanner.reScanLessThanToken();
|
|
26574
26624
|
}
|
|
@@ -27527,7 +27577,7 @@ var Parser;
|
|
|
27527
27577
|
entity,
|
|
27528
27578
|
parseRightSideOfDot(
|
|
27529
27579
|
allowReservedWords,
|
|
27530
|
-
/*
|
|
27580
|
+
/*allowPrivateIdentifiers*/
|
|
27531
27581
|
false
|
|
27532
27582
|
)
|
|
27533
27583
|
),
|
|
@@ -27640,8 +27690,11 @@ var Parser;
|
|
|
27640
27690
|
return parseLiteralLikeNode(token());
|
|
27641
27691
|
}
|
|
27642
27692
|
function parseTemplateHead(isTaggedTemplate) {
|
|
27643
|
-
if (isTaggedTemplate) {
|
|
27644
|
-
|
|
27693
|
+
if (!isTaggedTemplate && scanner.getTokenFlags() & 26656 /* IsInvalid */) {
|
|
27694
|
+
reScanTemplateToken(
|
|
27695
|
+
/*isTaggedTemplate*/
|
|
27696
|
+
false
|
|
27697
|
+
);
|
|
27645
27698
|
}
|
|
27646
27699
|
const fragment = parseLiteralLikeNode(token());
|
|
27647
27700
|
Debug.assert(fragment.kind === 15 /* TemplateHead */, "Template head has wrong token kind");
|
|
@@ -27659,8 +27712,7 @@ var Parser;
|
|
|
27659
27712
|
}
|
|
27660
27713
|
function parseLiteralLikeNode(kind) {
|
|
27661
27714
|
const pos = getNodePos();
|
|
27662
|
-
const node = isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, scanner.getTokenValue(), getTemplateLiteralRawText(kind), scanner.getTokenFlags() &
|
|
27663
|
-
// Octal literals are not allowed in strict mode or ES5
|
|
27715
|
+
const node = isTemplateLiteralKind(kind) ? factory2.createTemplateLiteralLikeNode(kind, scanner.getTokenValue(), getTemplateLiteralRawText(kind), scanner.getTokenFlags() & 7176 /* TemplateLiteralLikeFlags */) : (
|
|
27664
27716
|
// Note that theoretically the following condition would hold true literals like 009,
|
|
27665
27717
|
// which is not octal. But because of how the scanner separates the tokens, we would
|
|
27666
27718
|
// never get a token like this. Instead, we would get 00 and 9 as two separate tokens.
|
|
@@ -29464,7 +29516,7 @@ var Parser;
|
|
|
29464
29516
|
parseExpected(43 /* SlashToken */);
|
|
29465
29517
|
if (parseExpected(
|
|
29466
29518
|
31 /* GreaterThanToken */,
|
|
29467
|
-
/*
|
|
29519
|
+
/*diagnosticMessage*/
|
|
29468
29520
|
void 0,
|
|
29469
29521
|
/*shouldAdvance*/
|
|
29470
29522
|
false
|
|
@@ -29509,7 +29561,7 @@ var Parser;
|
|
|
29509
29561
|
} else {
|
|
29510
29562
|
if (parseExpected(
|
|
29511
29563
|
19 /* CloseBraceToken */,
|
|
29512
|
-
/*
|
|
29564
|
+
/*diagnosticMessage*/
|
|
29513
29565
|
void 0,
|
|
29514
29566
|
/*shouldAdvance*/
|
|
29515
29567
|
false
|
|
@@ -29562,7 +29614,7 @@ var Parser;
|
|
|
29562
29614
|
const tagName = parseJsxElementName();
|
|
29563
29615
|
if (parseExpected(
|
|
29564
29616
|
31 /* GreaterThanToken */,
|
|
29565
|
-
/*
|
|
29617
|
+
/*diagnosticMessage*/
|
|
29566
29618
|
void 0,
|
|
29567
29619
|
/*shouldAdvance*/
|
|
29568
29620
|
false
|
|
@@ -29716,7 +29768,10 @@ var Parser;
|
|
|
29716
29768
|
const tagExpression = factory2.createTaggedTemplateExpression(
|
|
29717
29769
|
tag,
|
|
29718
29770
|
typeArguments,
|
|
29719
|
-
token() === 14 /* NoSubstitutionTemplateLiteral */ ? (
|
|
29771
|
+
token() === 14 /* NoSubstitutionTemplateLiteral */ ? (reScanTemplateToken(
|
|
29772
|
+
/*isTaggedTemplate*/
|
|
29773
|
+
true
|
|
29774
|
+
), parseLiteralNode()) : parseTemplateExpression(
|
|
29720
29775
|
/*isTaggedTemplate*/
|
|
29721
29776
|
true
|
|
29722
29777
|
)
|
|
@@ -29804,10 +29859,16 @@ var Parser;
|
|
|
29804
29859
|
}
|
|
29805
29860
|
function parsePrimaryExpression() {
|
|
29806
29861
|
switch (token()) {
|
|
29862
|
+
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
29863
|
+
if (scanner.getTokenFlags() & 26656 /* IsInvalid */) {
|
|
29864
|
+
reScanTemplateToken(
|
|
29865
|
+
/*isTaggedTemplate*/
|
|
29866
|
+
false
|
|
29867
|
+
);
|
|
29868
|
+
}
|
|
29807
29869
|
case 8 /* NumericLiteral */:
|
|
29808
29870
|
case 9 /* BigIntLiteral */:
|
|
29809
29871
|
case 10 /* StringLiteral */:
|
|
29810
|
-
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
29811
29872
|
return parseLiteralNode();
|
|
29812
29873
|
case 109 /* ThisKeyword */:
|
|
29813
29874
|
case 107 /* SuperKeyword */:
|
|
@@ -29842,7 +29903,7 @@ var Parser;
|
|
|
29842
29903
|
break;
|
|
29843
29904
|
case 15 /* TemplateHead */:
|
|
29844
29905
|
return parseTemplateExpression(
|
|
29845
|
-
/*
|
|
29906
|
+
/*isTaggedTemplate*/
|
|
29846
29907
|
false
|
|
29847
29908
|
);
|
|
29848
29909
|
case 80 /* PrivateIdentifier */:
|
|
@@ -31549,7 +31610,7 @@ var Parser;
|
|
|
31549
31610
|
"file.js",
|
|
31550
31611
|
content,
|
|
31551
31612
|
99 /* Latest */,
|
|
31552
|
-
/*
|
|
31613
|
+
/*syntaxCursor*/
|
|
31553
31614
|
void 0,
|
|
31554
31615
|
1 /* JS */
|
|
31555
31616
|
);
|
|
@@ -31592,7 +31653,7 @@ var Parser;
|
|
|
31592
31653
|
const hasBrace = parseOptional(18 /* OpenBraceToken */);
|
|
31593
31654
|
const p2 = getNodePos();
|
|
31594
31655
|
let entityName = parseEntityName(
|
|
31595
|
-
/*
|
|
31656
|
+
/*allowReservedWords*/
|
|
31596
31657
|
false
|
|
31597
31658
|
);
|
|
31598
31659
|
while (token() === 80 /* PrivateIdentifier */) {
|
|
@@ -31613,7 +31674,7 @@ var Parser;
|
|
|
31613
31674
|
"",
|
|
31614
31675
|
content,
|
|
31615
31676
|
99 /* Latest */,
|
|
31616
|
-
/*
|
|
31677
|
+
/*syntaxCursor*/
|
|
31617
31678
|
void 0,
|
|
31618
31679
|
1 /* JS */
|
|
31619
31680
|
);
|
|
@@ -37279,7 +37340,7 @@ function tryResolveJSModuleWorker(moduleName, initialDir, host) {
|
|
|
37279
37340
|
2 /* JavaScript */,
|
|
37280
37341
|
/*isConfigLookup*/
|
|
37281
37342
|
false,
|
|
37282
|
-
/*
|
|
37343
|
+
/*redirectedReference*/
|
|
37283
37344
|
void 0
|
|
37284
37345
|
);
|
|
37285
37346
|
}
|
|
@@ -40414,11 +40475,6 @@ function createBinder() {
|
|
|
40414
40475
|
}
|
|
40415
40476
|
}
|
|
40416
40477
|
}
|
|
40417
|
-
function checkStrictModeNumericLiteral(node) {
|
|
40418
|
-
if (languageVersion < 1 /* ES5 */ && inStrictMode && node.numericLiteralFlags & 32 /* Octal */) {
|
|
40419
|
-
file.bindDiagnostics.push(createDiagnosticForNode2(node, Diagnostics.Octal_literals_are_not_allowed_in_strict_mode));
|
|
40420
|
-
}
|
|
40421
|
-
}
|
|
40422
40478
|
function checkStrictModePostfixUnaryExpression(node) {
|
|
40423
40479
|
if (inStrictMode) {
|
|
40424
40480
|
checkStrictModeEvalOrArguments(node, node.operand);
|
|
@@ -40610,8 +40666,6 @@ function createBinder() {
|
|
|
40610
40666
|
return checkStrictModeCatchClause(node);
|
|
40611
40667
|
case 218 /* DeleteExpression */:
|
|
40612
40668
|
return checkStrictModeDeleteExpression(node);
|
|
40613
|
-
case 8 /* NumericLiteral */:
|
|
40614
|
-
return checkStrictModeNumericLiteral(node);
|
|
40615
40669
|
case 223 /* PostfixUnaryExpression */:
|
|
40616
40670
|
return checkStrictModePostfixUnaryExpression(node);
|
|
40617
40671
|
case 222 /* PrefixUnaryExpression */:
|
|
@@ -41069,7 +41123,7 @@ function createBinder() {
|
|
|
41069
41123
|
parentSymbol,
|
|
41070
41124
|
node.left.expression,
|
|
41071
41125
|
isTopLevelNamespaceAssignment(node.left),
|
|
41072
|
-
/*
|
|
41126
|
+
/*isPrototypeProperty*/
|
|
41073
41127
|
false,
|
|
41074
41128
|
/*containerIsClass*/
|
|
41075
41129
|
false
|
|
@@ -41201,7 +41255,7 @@ function createBinder() {
|
|
|
41201
41255
|
function bindCallExpression(node) {
|
|
41202
41256
|
if (!file.commonJsModuleIndicator && isRequireCall(
|
|
41203
41257
|
node,
|
|
41204
|
-
/*
|
|
41258
|
+
/*requireStringLiteralLikeArgument*/
|
|
41205
41259
|
false
|
|
41206
41260
|
)) {
|
|
41207
41261
|
setCommonJsModuleIndicator(node);
|
|
@@ -43068,21 +43122,77 @@ function createTypeChecker(host) {
|
|
|
43068
43122
|
}
|
|
43069
43123
|
return t;
|
|
43070
43124
|
}, () => "(unreliable reporter)");
|
|
43071
|
-
var emptyObjectType = createAnonymousType(
|
|
43072
|
-
|
|
43125
|
+
var emptyObjectType = createAnonymousType(
|
|
43126
|
+
/*symbol*/
|
|
43127
|
+
void 0,
|
|
43128
|
+
emptySymbols,
|
|
43129
|
+
emptyArray,
|
|
43130
|
+
emptyArray,
|
|
43131
|
+
emptyArray
|
|
43132
|
+
);
|
|
43133
|
+
var emptyJsxObjectType = createAnonymousType(
|
|
43134
|
+
/*symbol*/
|
|
43135
|
+
void 0,
|
|
43136
|
+
emptySymbols,
|
|
43137
|
+
emptyArray,
|
|
43138
|
+
emptyArray,
|
|
43139
|
+
emptyArray
|
|
43140
|
+
);
|
|
43073
43141
|
emptyJsxObjectType.objectFlags |= 2048 /* JsxAttributes */;
|
|
43074
43142
|
var emptyTypeLiteralSymbol = createSymbol(2048 /* TypeLiteral */, "__type" /* Type */);
|
|
43075
43143
|
emptyTypeLiteralSymbol.members = createSymbolTable();
|
|
43076
43144
|
var emptyTypeLiteralType = createAnonymousType(emptyTypeLiteralSymbol, emptySymbols, emptyArray, emptyArray, emptyArray);
|
|
43077
|
-
var unknownEmptyObjectType = createAnonymousType(
|
|
43145
|
+
var unknownEmptyObjectType = createAnonymousType(
|
|
43146
|
+
/*symbol*/
|
|
43147
|
+
void 0,
|
|
43148
|
+
emptySymbols,
|
|
43149
|
+
emptyArray,
|
|
43150
|
+
emptyArray,
|
|
43151
|
+
emptyArray
|
|
43152
|
+
);
|
|
43078
43153
|
var unknownUnionType = strictNullChecks ? getUnionType([undefinedType, nullType, unknownEmptyObjectType]) : unknownType;
|
|
43079
|
-
var emptyGenericType = createAnonymousType(
|
|
43154
|
+
var emptyGenericType = createAnonymousType(
|
|
43155
|
+
/*symbol*/
|
|
43156
|
+
void 0,
|
|
43157
|
+
emptySymbols,
|
|
43158
|
+
emptyArray,
|
|
43159
|
+
emptyArray,
|
|
43160
|
+
emptyArray
|
|
43161
|
+
);
|
|
43080
43162
|
emptyGenericType.instantiations = /* @__PURE__ */ new Map();
|
|
43081
|
-
var anyFunctionType = createAnonymousType(
|
|
43163
|
+
var anyFunctionType = createAnonymousType(
|
|
43164
|
+
/*symbol*/
|
|
43165
|
+
void 0,
|
|
43166
|
+
emptySymbols,
|
|
43167
|
+
emptyArray,
|
|
43168
|
+
emptyArray,
|
|
43169
|
+
emptyArray
|
|
43170
|
+
);
|
|
43082
43171
|
anyFunctionType.objectFlags |= 262144 /* NonInferrableType */;
|
|
43083
|
-
var noConstraintType = createAnonymousType(
|
|
43084
|
-
|
|
43085
|
-
|
|
43172
|
+
var noConstraintType = createAnonymousType(
|
|
43173
|
+
/*symbol*/
|
|
43174
|
+
void 0,
|
|
43175
|
+
emptySymbols,
|
|
43176
|
+
emptyArray,
|
|
43177
|
+
emptyArray,
|
|
43178
|
+
emptyArray
|
|
43179
|
+
);
|
|
43180
|
+
var circularConstraintType = createAnonymousType(
|
|
43181
|
+
/*symbol*/
|
|
43182
|
+
void 0,
|
|
43183
|
+
emptySymbols,
|
|
43184
|
+
emptyArray,
|
|
43185
|
+
emptyArray,
|
|
43186
|
+
emptyArray
|
|
43187
|
+
);
|
|
43188
|
+
var resolvingDefaultType = createAnonymousType(
|
|
43189
|
+
/*symbol*/
|
|
43190
|
+
void 0,
|
|
43191
|
+
emptySymbols,
|
|
43192
|
+
emptyArray,
|
|
43193
|
+
emptyArray,
|
|
43194
|
+
emptyArray
|
|
43195
|
+
);
|
|
43086
43196
|
var markerSuperType = createTypeParameter();
|
|
43087
43197
|
var markerSubType = createTypeParameter();
|
|
43088
43198
|
markerSubType.constraint = markerSuperType;
|
|
@@ -43092,8 +43202,11 @@ function createTypeChecker(host) {
|
|
|
43092
43202
|
markerSubTypeForCheck.constraint = markerSuperTypeForCheck;
|
|
43093
43203
|
var noTypePredicate = createTypePredicate(1 /* Identifier */, "<<unresolved>>", 0, anyType);
|
|
43094
43204
|
var anySignature = createSignature(
|
|
43205
|
+
/*declaration*/
|
|
43095
43206
|
void 0,
|
|
43207
|
+
/*typeParameters*/
|
|
43096
43208
|
void 0,
|
|
43209
|
+
/*thisParameter*/
|
|
43097
43210
|
void 0,
|
|
43098
43211
|
emptyArray,
|
|
43099
43212
|
anyType,
|
|
@@ -43103,8 +43216,11 @@ function createTypeChecker(host) {
|
|
|
43103
43216
|
0 /* None */
|
|
43104
43217
|
);
|
|
43105
43218
|
var unknownSignature = createSignature(
|
|
43219
|
+
/*declaration*/
|
|
43106
43220
|
void 0,
|
|
43221
|
+
/*typeParameters*/
|
|
43107
43222
|
void 0,
|
|
43223
|
+
/*thisParameter*/
|
|
43108
43224
|
void 0,
|
|
43109
43225
|
emptyArray,
|
|
43110
43226
|
errorType,
|
|
@@ -43114,8 +43230,11 @@ function createTypeChecker(host) {
|
|
|
43114
43230
|
0 /* None */
|
|
43115
43231
|
);
|
|
43116
43232
|
var resolvingSignature = createSignature(
|
|
43233
|
+
/*declaration*/
|
|
43117
43234
|
void 0,
|
|
43235
|
+
/*typeParameters*/
|
|
43118
43236
|
void 0,
|
|
43237
|
+
/*thisParameter*/
|
|
43119
43238
|
void 0,
|
|
43120
43239
|
emptyArray,
|
|
43121
43240
|
anyType,
|
|
@@ -43125,8 +43244,11 @@ function createTypeChecker(host) {
|
|
|
43125
43244
|
0 /* None */
|
|
43126
43245
|
);
|
|
43127
43246
|
var silentNeverSignature = createSignature(
|
|
43247
|
+
/*declaration*/
|
|
43128
43248
|
void 0,
|
|
43249
|
+
/*typeParameters*/
|
|
43129
43250
|
void 0,
|
|
43251
|
+
/*thisParameter*/
|
|
43130
43252
|
void 0,
|
|
43131
43253
|
emptyArray,
|
|
43132
43254
|
silentNeverType,
|
|
@@ -44183,7 +44305,7 @@ function createTypeChecker(host) {
|
|
|
44183
44305
|
if (originalLocation && isInJSFile(originalLocation) && originalLocation.parent) {
|
|
44184
44306
|
if (isRequireCall(
|
|
44185
44307
|
originalLocation.parent,
|
|
44186
|
-
/*
|
|
44308
|
+
/*requireStringLiteralLikeArgument*/
|
|
44187
44309
|
false
|
|
44188
44310
|
)) {
|
|
44189
44311
|
return requireSymbol;
|
|
@@ -44804,7 +44926,7 @@ function createTypeChecker(host) {
|
|
|
44804
44926
|
node,
|
|
44805
44927
|
moduleSymbol,
|
|
44806
44928
|
resolved,
|
|
44807
|
-
/*
|
|
44929
|
+
/*overwriteEmpty*/
|
|
44808
44930
|
false
|
|
44809
44931
|
);
|
|
44810
44932
|
return resolved;
|
|
@@ -44814,7 +44936,7 @@ function createTypeChecker(host) {
|
|
|
44814
44936
|
exportDefaultSymbol,
|
|
44815
44937
|
/*finalTarget*/
|
|
44816
44938
|
void 0,
|
|
44817
|
-
/*
|
|
44939
|
+
/*overwriteEmpty*/
|
|
44818
44940
|
false
|
|
44819
44941
|
);
|
|
44820
44942
|
return exportDefaultSymbol;
|
|
@@ -44865,7 +44987,7 @@ function createTypeChecker(host) {
|
|
|
44865
44987
|
immediate,
|
|
44866
44988
|
moduleSpecifier,
|
|
44867
44989
|
dontResolveAlias,
|
|
44868
|
-
/*
|
|
44990
|
+
/*suppressInteropError*/
|
|
44869
44991
|
false
|
|
44870
44992
|
);
|
|
44871
44993
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -44884,7 +45006,7 @@ function createTypeChecker(host) {
|
|
|
44884
45006
|
immediate,
|
|
44885
45007
|
moduleSpecifier,
|
|
44886
45008
|
dontResolveAlias,
|
|
44887
|
-
/*
|
|
45009
|
+
/*suppressInteropError*/
|
|
44888
45010
|
false
|
|
44889
45011
|
);
|
|
44890
45012
|
markSymbolOfAliasDeclarationIfTypeOnly(
|
|
@@ -45376,6 +45498,7 @@ function createTypeChecker(host) {
|
|
|
45376
45498
|
left,
|
|
45377
45499
|
left.escapedText,
|
|
45378
45500
|
111551 /* Value */,
|
|
45501
|
+
/*nameNotFoundMessage*/
|
|
45379
45502
|
void 0,
|
|
45380
45503
|
left,
|
|
45381
45504
|
/*isUse*/
|
|
@@ -45411,6 +45534,7 @@ function createTypeChecker(host) {
|
|
|
45411
45534
|
name,
|
|
45412
45535
|
/*isUse*/
|
|
45413
45536
|
true,
|
|
45537
|
+
/*excludeGlobals*/
|
|
45414
45538
|
false
|
|
45415
45539
|
));
|
|
45416
45540
|
if (!symbol) {
|
|
@@ -46115,7 +46239,7 @@ function createTypeChecker(host) {
|
|
|
46115
46239
|
container,
|
|
46116
46240
|
enclosingDeclaration,
|
|
46117
46241
|
1920 /* Namespace */,
|
|
46118
|
-
/*
|
|
46242
|
+
/*useOnlyExternalAliasing*/
|
|
46119
46243
|
false
|
|
46120
46244
|
)) {
|
|
46121
46245
|
return append(concatenate(concatenate([container], additionalContainers), reexportContainers), objectLiteralContainer);
|
|
@@ -46428,7 +46552,7 @@ function createTypeChecker(host) {
|
|
|
46428
46552
|
if (symbolFromSymbolTable.escapedName === symbol.escapedName && symbolFromSymbolTable.exportSymbol) {
|
|
46429
46553
|
if (isAccessible(
|
|
46430
46554
|
getMergedSymbol(symbolFromSymbolTable.exportSymbol),
|
|
46431
|
-
/*
|
|
46555
|
+
/*resolvedAliasSymbol*/
|
|
46432
46556
|
void 0,
|
|
46433
46557
|
ignoreQualification
|
|
46434
46558
|
)) {
|
|
@@ -46680,7 +46804,7 @@ function createTypeChecker(host) {
|
|
|
46680
46804
|
enclosingDeclaration,
|
|
46681
46805
|
firstIdentifier.escapedText,
|
|
46682
46806
|
meaning,
|
|
46683
|
-
/*
|
|
46807
|
+
/*nameNotFoundMessage*/
|
|
46684
46808
|
void 0,
|
|
46685
46809
|
/*nameArg*/
|
|
46686
46810
|
void 0,
|
|
@@ -46700,7 +46824,7 @@ function createTypeChecker(host) {
|
|
|
46700
46824
|
)),
|
|
46701
46825
|
firstIdentifier,
|
|
46702
46826
|
meaning,
|
|
46703
|
-
/*
|
|
46827
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
46704
46828
|
false
|
|
46705
46829
|
).accessibility === 0 /* Accessible */) {
|
|
46706
46830
|
return { accessibility: 0 /* Accessible */ };
|
|
@@ -47259,7 +47383,7 @@ function createTypeChecker(host) {
|
|
|
47259
47383
|
symbol,
|
|
47260
47384
|
context.enclosingDeclaration,
|
|
47261
47385
|
isInstanceType,
|
|
47262
|
-
/*
|
|
47386
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
47263
47387
|
false
|
|
47264
47388
|
).accessibility !== 0 /* Accessible */)) || symbol.flags & (384 /* Enum */ | 512 /* ValueModule */) || shouldWriteTypeOfFunctionSymbol()) {
|
|
47265
47389
|
return symbolToTypeNode(symbol, context, isInstanceType);
|
|
@@ -47355,7 +47479,7 @@ function createTypeChecker(host) {
|
|
|
47355
47479
|
function deepCloneOrReuseNodes(nodes, visitor, test, start, count) {
|
|
47356
47480
|
if (nodes && nodes.length === 0) {
|
|
47357
47481
|
return setTextRange(factory.createNodeArray(
|
|
47358
|
-
/*
|
|
47482
|
+
/*elements*/
|
|
47359
47483
|
void 0,
|
|
47360
47484
|
nodes.hasTrailingComma
|
|
47361
47485
|
), nodes);
|
|
@@ -47943,12 +48067,12 @@ function createTypeChecker(host) {
|
|
|
47943
48067
|
const thisTag = getJSDocThisTag(signature.declaration);
|
|
47944
48068
|
if (thisTag && thisTag.typeExpression) {
|
|
47945
48069
|
return factory.createParameterDeclaration(
|
|
47946
|
-
/*
|
|
48070
|
+
/*modifiers*/
|
|
47947
48071
|
void 0,
|
|
47948
|
-
/*
|
|
48072
|
+
/*dotDotDotToken*/
|
|
47949
48073
|
void 0,
|
|
47950
48074
|
"this",
|
|
47951
|
-
/*
|
|
48075
|
+
/*questionToken*/
|
|
47952
48076
|
void 0,
|
|
47953
48077
|
typeToTypeNodeHelper(getTypeFromTypeNode(thisTag.typeExpression), context)
|
|
47954
48078
|
);
|
|
@@ -48035,7 +48159,7 @@ function createTypeChecker(host) {
|
|
|
48035
48159
|
firstIdentifier,
|
|
48036
48160
|
firstIdentifier.escapedText,
|
|
48037
48161
|
111551 /* Value */ | 1048576 /* ExportValue */,
|
|
48038
|
-
/*
|
|
48162
|
+
/*nameNotFoundMessage*/
|
|
48039
48163
|
void 0,
|
|
48040
48164
|
/*nameArg*/
|
|
48041
48165
|
void 0,
|
|
@@ -48368,7 +48492,7 @@ function createTypeChecker(host) {
|
|
|
48368
48492
|
context.enclosingDeclaration,
|
|
48369
48493
|
escapedName,
|
|
48370
48494
|
788968 /* Type */,
|
|
48371
|
-
/*
|
|
48495
|
+
/*nameNotFoundMessage*/
|
|
48372
48496
|
void 0,
|
|
48373
48497
|
escapedName,
|
|
48374
48498
|
/*isUse*/
|
|
@@ -48610,7 +48734,7 @@ function createTypeChecker(host) {
|
|
|
48610
48734
|
67108863 /* All */,
|
|
48611
48735
|
/*ignoreErrors*/
|
|
48612
48736
|
true,
|
|
48613
|
-
/*
|
|
48737
|
+
/*dontResolveAlias*/
|
|
48614
48738
|
true
|
|
48615
48739
|
);
|
|
48616
48740
|
if (sym) {
|
|
@@ -48689,7 +48813,7 @@ function createTypeChecker(host) {
|
|
|
48689
48813
|
[factory.createParameterDeclaration(
|
|
48690
48814
|
/*modifiers*/
|
|
48691
48815
|
void 0,
|
|
48692
|
-
/*
|
|
48816
|
+
/*dotDotDotToken*/
|
|
48693
48817
|
void 0,
|
|
48694
48818
|
"x",
|
|
48695
48819
|
/*questionToken*/
|
|
@@ -48812,13 +48936,13 @@ function createTypeChecker(host) {
|
|
|
48812
48936
|
const serializePropertySymbolForClass = makeSerializePropertySymbol(
|
|
48813
48937
|
factory.createPropertyDeclaration,
|
|
48814
48938
|
172 /* MethodDeclaration */,
|
|
48815
|
-
/*
|
|
48939
|
+
/*useAccessors*/
|
|
48816
48940
|
true
|
|
48817
48941
|
);
|
|
48818
48942
|
const serializePropertySymbolForInterfaceWorker = makeSerializePropertySymbol(
|
|
48819
48943
|
(mods, name, question, type) => factory.createPropertySignature(mods, name, question, type),
|
|
48820
48944
|
171 /* MethodSignature */,
|
|
48821
|
-
/*
|
|
48945
|
+
/*useAccessors*/
|
|
48822
48946
|
false
|
|
48823
48947
|
);
|
|
48824
48948
|
const enclosingDeclaration = context.enclosingDeclaration;
|
|
@@ -48840,7 +48964,7 @@ function createTypeChecker(host) {
|
|
|
48840
48964
|
sym,
|
|
48841
48965
|
decl,
|
|
48842
48966
|
meaning,
|
|
48843
|
-
/*
|
|
48967
|
+
/*shouldComputeAliasesToMakeVisible*/
|
|
48844
48968
|
false
|
|
48845
48969
|
);
|
|
48846
48970
|
if (accessibleResult.accessibility === 0 /* Accessible */) {
|
|
@@ -48899,7 +49023,7 @@ function createTypeChecker(host) {
|
|
|
48899
49023
|
factory.createNamedExports(map(flatMap(excessExports, (e) => getNamesOfDeclaration(e)), (id) => factory.createExportSpecifier(
|
|
48900
49024
|
/*isTypeOnly*/
|
|
48901
49025
|
false,
|
|
48902
|
-
/*
|
|
49026
|
+
/*propertyName*/
|
|
48903
49027
|
void 0,
|
|
48904
49028
|
id
|
|
48905
49029
|
))),
|
|
@@ -49192,7 +49316,7 @@ function createTypeChecker(host) {
|
|
|
49192
49316
|
addResult(factory.createExportAssignment(
|
|
49193
49317
|
/*modifiers*/
|
|
49194
49318
|
void 0,
|
|
49195
|
-
/*
|
|
49319
|
+
/*isExportEquals*/
|
|
49196
49320
|
false,
|
|
49197
49321
|
factory.createIdentifier(getInternalSymbolName(symbol, symbolName2))
|
|
49198
49322
|
), 0 /* None */);
|
|
@@ -49615,7 +49739,7 @@ function createTypeChecker(host) {
|
|
|
49615
49739
|
)])
|
|
49616
49740
|
),
|
|
49617
49741
|
factory.createStringLiteral(specifier2),
|
|
49618
|
-
/*
|
|
49742
|
+
/*assertClause*/
|
|
49619
49743
|
void 0
|
|
49620
49744
|
), 0 /* None */);
|
|
49621
49745
|
break;
|
|
@@ -49704,7 +49828,7 @@ function createTypeChecker(host) {
|
|
|
49704
49828
|
factory.createImportClause(
|
|
49705
49829
|
/*isTypeOnly*/
|
|
49706
49830
|
false,
|
|
49707
|
-
/*
|
|
49831
|
+
/*name*/
|
|
49708
49832
|
void 0,
|
|
49709
49833
|
factory.createNamespaceImport(factory.createIdentifier(localName))
|
|
49710
49834
|
),
|
|
@@ -49732,7 +49856,7 @@ function createTypeChecker(host) {
|
|
|
49732
49856
|
factory.createImportClause(
|
|
49733
49857
|
/*isTypeOnly*/
|
|
49734
49858
|
false,
|
|
49735
|
-
/*
|
|
49859
|
+
/*name*/
|
|
49736
49860
|
void 0,
|
|
49737
49861
|
factory.createNamedImports([
|
|
49738
49862
|
factory.createImportSpecifier(
|
|
@@ -50093,7 +50217,7 @@ function createTypeChecker(host) {
|
|
|
50093
50217
|
addResult(statement, 0 /* None */);
|
|
50094
50218
|
return factory.createExpressionWithTypeArguments(
|
|
50095
50219
|
factory.createIdentifier(tempName),
|
|
50096
|
-
/*
|
|
50220
|
+
/*typeArguments*/
|
|
50097
50221
|
void 0
|
|
50098
50222
|
);
|
|
50099
50223
|
}
|
|
@@ -50118,7 +50242,7 @@ function createTypeChecker(host) {
|
|
|
50118
50242
|
if (t.symbol) {
|
|
50119
50243
|
return factory.createExpressionWithTypeArguments(
|
|
50120
50244
|
symbolToExpression(t.symbol, context, 788968 /* Type */),
|
|
50121
|
-
/*
|
|
50245
|
+
/*typeArguments*/
|
|
50122
50246
|
void 0
|
|
50123
50247
|
);
|
|
50124
50248
|
}
|
|
@@ -50424,7 +50548,9 @@ function createTypeChecker(host) {
|
|
|
50424
50548
|
declaration,
|
|
50425
50549
|
firstIdentifier.escapedText,
|
|
50426
50550
|
111551 /* Value */ | 788968 /* Type */ | 1920 /* Namespace */,
|
|
50551
|
+
/*nameNotFoundMessage*/
|
|
50427
50552
|
void 0,
|
|
50553
|
+
/*nameArg*/
|
|
50428
50554
|
void 0,
|
|
50429
50555
|
/*isUse*/
|
|
50430
50556
|
false
|
|
@@ -51209,7 +51335,14 @@ function createTypeChecker(host) {
|
|
|
51209
51335
|
symbol.links.bindingElement = e;
|
|
51210
51336
|
members.set(symbol.escapedName, symbol);
|
|
51211
51337
|
});
|
|
51212
|
-
const result = createAnonymousType(
|
|
51338
|
+
const result = createAnonymousType(
|
|
51339
|
+
/*symbol*/
|
|
51340
|
+
void 0,
|
|
51341
|
+
members,
|
|
51342
|
+
emptyArray,
|
|
51343
|
+
emptyArray,
|
|
51344
|
+
stringIndexInfo ? [stringIndexInfo] : emptyArray
|
|
51345
|
+
);
|
|
51213
51346
|
result.objectFlags |= objectFlags;
|
|
51214
51347
|
if (includePatternInType) {
|
|
51215
51348
|
result.pattern = pattern;
|
|
@@ -51371,7 +51504,7 @@ function createTypeChecker(host) {
|
|
|
51371
51504
|
} else if (isParameter(declaration) || isPropertyDeclaration(declaration) || isPropertySignature(declaration) || isVariableDeclaration(declaration) || isBindingElement(declaration) || isJSDocPropertyLikeTag(declaration)) {
|
|
51372
51505
|
type = getWidenedTypeForVariableLikeDeclaration(
|
|
51373
51506
|
declaration,
|
|
51374
|
-
/*
|
|
51507
|
+
/*reportErrors*/
|
|
51375
51508
|
true
|
|
51376
51509
|
);
|
|
51377
51510
|
} else if (isEnumDeclaration(declaration)) {
|
|
@@ -51428,7 +51561,7 @@ function createTypeChecker(host) {
|
|
|
51428
51561
|
const accessor = tryCast(getDeclarationOfKind(symbol, 170 /* PropertyDeclaration */), isAutoAccessorPropertyDeclaration);
|
|
51429
51562
|
let type = getter && isInJSFile(getter) && getTypeForDeclarationFromJSDocComment(getter) || getAnnotatedAccessorType(getter) || getAnnotatedAccessorType(setter) || getAnnotatedAccessorType(accessor) || getter && getter.body && getReturnTypeFromBody(getter) || accessor && accessor.initializer && getWidenedTypeForVariableLikeDeclaration(
|
|
51430
51563
|
accessor,
|
|
51431
|
-
/*
|
|
51564
|
+
/*reportErrors*/
|
|
51432
51565
|
true
|
|
51433
51566
|
);
|
|
51434
51567
|
if (!type) {
|
|
@@ -51542,7 +51675,7 @@ function createTypeChecker(host) {
|
|
|
51542
51675
|
const targetSymbol = resolveAlias(symbol);
|
|
51543
51676
|
const exportSymbol = symbol.declarations && getTargetOfAliasDeclaration(
|
|
51544
51677
|
getDeclarationOfAliasSymbol(symbol),
|
|
51545
|
-
/*
|
|
51678
|
+
/*dontRecursivelyResolve*/
|
|
51546
51679
|
true
|
|
51547
51680
|
);
|
|
51548
51681
|
const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
|
|
@@ -52573,8 +52706,10 @@ function createTypeChecker(host) {
|
|
|
52573
52706
|
const isAbstract = !!declaration && hasSyntacticModifier(declaration, 256 /* Abstract */);
|
|
52574
52707
|
if (baseSignatures.length === 0) {
|
|
52575
52708
|
return [createSignature(
|
|
52709
|
+
/*declaration*/
|
|
52576
52710
|
void 0,
|
|
52577
52711
|
classType.localTypeParameters,
|
|
52712
|
+
/*thisParameter*/
|
|
52578
52713
|
void 0,
|
|
52579
52714
|
emptyArray,
|
|
52580
52715
|
classType,
|
|
@@ -53564,7 +53699,7 @@ function createTypeChecker(host) {
|
|
|
53564
53699
|
return type.resolvedApparentType || (type.resolvedApparentType = getTypeWithThisArgument(
|
|
53565
53700
|
type,
|
|
53566
53701
|
type,
|
|
53567
|
-
/*
|
|
53702
|
+
/*needApparentType*/
|
|
53568
53703
|
true
|
|
53569
53704
|
));
|
|
53570
53705
|
}
|
|
@@ -54061,7 +54196,9 @@ function createTypeChecker(host) {
|
|
|
54061
54196
|
param,
|
|
54062
54197
|
paramSymbol.escapedName,
|
|
54063
54198
|
111551 /* Value */,
|
|
54199
|
+
/*nameNotFoundMessage*/
|
|
54064
54200
|
void 0,
|
|
54201
|
+
/*nameArg*/
|
|
54065
54202
|
void 0,
|
|
54066
54203
|
/*isUse*/
|
|
54067
54204
|
false
|
|
@@ -54958,7 +55095,14 @@ function createTypeChecker(host) {
|
|
|
54958
55095
|
/*isReadonly*/
|
|
54959
55096
|
false
|
|
54960
55097
|
)] : emptyArray;
|
|
54961
|
-
return createAnonymousType(
|
|
55098
|
+
return createAnonymousType(
|
|
55099
|
+
/*symbol*/
|
|
55100
|
+
void 0,
|
|
55101
|
+
emptySymbols,
|
|
55102
|
+
emptyArray,
|
|
55103
|
+
emptyArray,
|
|
55104
|
+
indexInfo
|
|
55105
|
+
);
|
|
54962
55106
|
}
|
|
54963
55107
|
return anyType;
|
|
54964
55108
|
}
|
|
@@ -55066,6 +55210,7 @@ function createTypeChecker(host) {
|
|
|
55066
55210
|
}
|
|
55067
55211
|
function getGlobalSymbol(name, meaning, diagnostic) {
|
|
55068
55212
|
return resolveName(
|
|
55213
|
+
/*location*/
|
|
55069
55214
|
void 0,
|
|
55070
55215
|
name,
|
|
55071
55216
|
meaning,
|
|
@@ -56625,7 +56770,7 @@ function createTypeChecker(host) {
|
|
|
56625
56770
|
let errorInfo;
|
|
56626
56771
|
if (indexType.flags & 1024 /* EnumLiteral */) {
|
|
56627
56772
|
errorInfo = chainDiagnosticMessages(
|
|
56628
|
-
/*
|
|
56773
|
+
/*details*/
|
|
56629
56774
|
void 0,
|
|
56630
56775
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56631
56776
|
"[" + typeToString(indexType) + "]",
|
|
@@ -56634,7 +56779,7 @@ function createTypeChecker(host) {
|
|
|
56634
56779
|
} else if (indexType.flags & 8192 /* UniqueESSymbol */) {
|
|
56635
56780
|
const symbolName2 = getFullyQualifiedName(indexType.symbol, accessExpression);
|
|
56636
56781
|
errorInfo = chainDiagnosticMessages(
|
|
56637
|
-
/*
|
|
56782
|
+
/*details*/
|
|
56638
56783
|
void 0,
|
|
56639
56784
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56640
56785
|
"[" + symbolName2 + "]",
|
|
@@ -56642,7 +56787,7 @@ function createTypeChecker(host) {
|
|
|
56642
56787
|
);
|
|
56643
56788
|
} else if (indexType.flags & 128 /* StringLiteral */) {
|
|
56644
56789
|
errorInfo = chainDiagnosticMessages(
|
|
56645
|
-
/*
|
|
56790
|
+
/*details*/
|
|
56646
56791
|
void 0,
|
|
56647
56792
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56648
56793
|
indexType.value,
|
|
@@ -56650,7 +56795,7 @@ function createTypeChecker(host) {
|
|
|
56650
56795
|
);
|
|
56651
56796
|
} else if (indexType.flags & 256 /* NumberLiteral */) {
|
|
56652
56797
|
errorInfo = chainDiagnosticMessages(
|
|
56653
|
-
/*
|
|
56798
|
+
/*details*/
|
|
56654
56799
|
void 0,
|
|
56655
56800
|
Diagnostics.Property_0_does_not_exist_on_type_1,
|
|
56656
56801
|
indexType.value,
|
|
@@ -56658,7 +56803,7 @@ function createTypeChecker(host) {
|
|
|
56658
56803
|
);
|
|
56659
56804
|
} else if (indexType.flags & (8 /* Number */ | 4 /* String */)) {
|
|
56660
56805
|
errorInfo = chainDiagnosticMessages(
|
|
56661
|
-
/*
|
|
56806
|
+
/*details*/
|
|
56662
56807
|
void 0,
|
|
56663
56808
|
Diagnostics.No_index_signature_with_a_parameter_of_type_0_was_found_on_type_1,
|
|
56664
56809
|
typeToString(indexType),
|
|
@@ -58278,7 +58423,7 @@ function createTypeChecker(host) {
|
|
|
58278
58423
|
targetReturn,
|
|
58279
58424
|
relation,
|
|
58280
58425
|
returnExpression,
|
|
58281
|
-
/*
|
|
58426
|
+
/*headMessage*/
|
|
58282
58427
|
void 0,
|
|
58283
58428
|
containingMessageChain,
|
|
58284
58429
|
resultObj
|
|
@@ -58602,7 +58747,7 @@ function createTypeChecker(host) {
|
|
|
58602
58747
|
const childrenTargetType = getIndexedAccessType(target, getStringLiteralType(childrenPropName));
|
|
58603
58748
|
const diagnostic = Diagnostics._0_components_don_t_accept_text_as_child_elements_Text_in_JSX_has_the_type_string_but_the_expected_type_of_1_is_2;
|
|
58604
58749
|
invalidTextDiagnostic = { ...diagnostic, key: "!!ALREADY FORMATTED!!", message: formatMessage(
|
|
58605
|
-
/*
|
|
58750
|
+
/*dummy*/
|
|
58606
58751
|
void 0,
|
|
58607
58752
|
diagnostic,
|
|
58608
58753
|
tagNameText,
|
|
@@ -58693,7 +58838,7 @@ function createTypeChecker(host) {
|
|
|
58693
58838
|
false,
|
|
58694
58839
|
/*errorReporter*/
|
|
58695
58840
|
void 0,
|
|
58696
|
-
/*
|
|
58841
|
+
/*incompatibleErrorReporter*/
|
|
58697
58842
|
void 0,
|
|
58698
58843
|
compareTypesAssignable,
|
|
58699
58844
|
/*reportUnreliableMarkers*/
|
|
@@ -58767,12 +58912,7 @@ function createTypeChecker(host) {
|
|
|
58767
58912
|
const paramCount = sourceRestType || targetRestType ? Math.min(sourceCount, targetCount) : Math.max(sourceCount, targetCount);
|
|
58768
58913
|
const restIndex = sourceRestType || targetRestType ? paramCount - 1 : -1;
|
|
58769
58914
|
for (let i = 0; i < paramCount; i++) {
|
|
58770
|
-
const sourceType = i === restIndex ? getRestTypeAtPosition(
|
|
58771
|
-
source,
|
|
58772
|
-
i,
|
|
58773
|
-
/*readonly*/
|
|
58774
|
-
true
|
|
58775
|
-
) : tryGetTypeAtPosition(source, i);
|
|
58915
|
+
const sourceType = i === restIndex ? getRestTypeAtPosition(source, i) : tryGetTypeAtPosition(source, i);
|
|
58776
58916
|
const targetType = i === restIndex ? getRestTypeAtPosition(target, i) : tryGetTypeAtPosition(target, i);
|
|
58777
58917
|
if (sourceType && targetType) {
|
|
58778
58918
|
const sourceSig = checkMode & 3 /* Callback */ ? void 0 : getSingleCallSignature(getNonNullableType(sourceType));
|
|
@@ -59165,7 +59305,7 @@ function createTypeChecker(host) {
|
|
|
59165
59305
|
reportError(...stack[0]);
|
|
59166
59306
|
if (info) {
|
|
59167
59307
|
reportRelationError(
|
|
59168
|
-
/*
|
|
59308
|
+
/*message*/
|
|
59169
59309
|
void 0,
|
|
59170
59310
|
...info
|
|
59171
59311
|
);
|
|
@@ -59240,7 +59380,7 @@ function createTypeChecker(host) {
|
|
|
59240
59380
|
}
|
|
59241
59381
|
if (info) {
|
|
59242
59382
|
reportRelationError(
|
|
59243
|
-
/*
|
|
59383
|
+
/*message*/
|
|
59244
59384
|
void 0,
|
|
59245
59385
|
...info
|
|
59246
59386
|
);
|
|
@@ -59682,7 +59822,7 @@ function createTypeChecker(host) {
|
|
|
59682
59822
|
if (containsType(targetTypes, source2)) {
|
|
59683
59823
|
return -1 /* True */;
|
|
59684
59824
|
}
|
|
59685
|
-
if (getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
|
|
59825
|
+
if (relation !== comparableRelation && getObjectFlags(target2) & 32768 /* PrimitiveUnion */ && !(source2.flags & 1024 /* EnumLiteral */) && (source2.flags & (128 /* StringLiteral */ | 512 /* BooleanLiteral */ | 2048 /* BigIntLiteral */) || (relation === subtypeRelation || relation === strictSubtypeRelation) && source2.flags & 256 /* NumberLiteral */)) {
|
|
59686
59826
|
const alternateForm = source2 === source2.regularType ? source2.freshType : source2.regularType;
|
|
59687
59827
|
const primitive = source2.flags & 128 /* StringLiteral */ ? stringType : source2.flags & 256 /* NumberLiteral */ ? numberType : source2.flags & 2048 /* BigIntLiteral */ ? bigintType : void 0;
|
|
59688
59828
|
return primitive && containsType(targetTypes, primitive) || alternateForm && containsType(targetTypes, alternateForm) ? -1 /* True */ : 0 /* False */;
|
|
@@ -59913,7 +60053,7 @@ function createTypeChecker(host) {
|
|
|
59913
60053
|
target2,
|
|
59914
60054
|
intersectionState,
|
|
59915
60055
|
relation,
|
|
59916
|
-
/*
|
|
60056
|
+
/*ignoreConstraints*/
|
|
59917
60057
|
false
|
|
59918
60058
|
);
|
|
59919
60059
|
const entry = relation.get(id);
|
|
@@ -60309,7 +60449,7 @@ function createTypeChecker(host) {
|
|
|
60309
60449
|
constraint,
|
|
60310
60450
|
2 /* Target */,
|
|
60311
60451
|
reportErrors2,
|
|
60312
|
-
/*
|
|
60452
|
+
/*headMessage*/
|
|
60313
60453
|
void 0,
|
|
60314
60454
|
intersectionState
|
|
60315
60455
|
)) {
|
|
@@ -60721,7 +60861,7 @@ function createTypeChecker(host) {
|
|
|
60721
60861
|
source2,
|
|
60722
60862
|
type,
|
|
60723
60863
|
0 /* Call */,
|
|
60724
|
-
/*
|
|
60864
|
+
/*reportErrors*/
|
|
60725
60865
|
false,
|
|
60726
60866
|
0 /* None */
|
|
60727
60867
|
);
|
|
@@ -60730,7 +60870,7 @@ function createTypeChecker(host) {
|
|
|
60730
60870
|
source2,
|
|
60731
60871
|
type,
|
|
60732
60872
|
1 /* Construct */,
|
|
60733
|
-
/*
|
|
60873
|
+
/*reportErrors*/
|
|
60734
60874
|
false,
|
|
60735
60875
|
0 /* None */
|
|
60736
60876
|
);
|
|
@@ -60740,7 +60880,7 @@ function createTypeChecker(host) {
|
|
|
60740
60880
|
type,
|
|
60741
60881
|
/*sourceIsPrimitive*/
|
|
60742
60882
|
false,
|
|
60743
|
-
/*
|
|
60883
|
+
/*reportErrors*/
|
|
60744
60884
|
false,
|
|
60745
60885
|
0 /* None */
|
|
60746
60886
|
);
|
|
@@ -61326,7 +61466,7 @@ function createTypeChecker(host) {
|
|
|
61326
61466
|
const targetHasStringIndex = some(indexInfos, (info) => info.keyType === stringType);
|
|
61327
61467
|
let result2 = -1 /* True */;
|
|
61328
61468
|
for (const targetInfo of indexInfos) {
|
|
61329
|
-
const related = !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
|
|
61469
|
+
const related = relation !== strictSubtypeRelation && !sourceIsPrimitive && targetHasStringIndex && targetInfo.type.flags & 1 /* Any */ ? -1 /* True */ : isGenericMappedType(source2) && targetHasStringIndex ? isRelatedTo(getTemplateTypeFromMappedType(source2), targetInfo.type, 3 /* Both */, reportErrors2) : typeRelatedToIndexInfo(source2, targetInfo, reportErrors2, intersectionState);
|
|
61330
61470
|
if (!related) {
|
|
61331
61471
|
return 0 /* False */;
|
|
61332
61472
|
}
|
|
@@ -62230,6 +62370,7 @@ function createTypeChecker(host) {
|
|
|
62230
62370
|
param,
|
|
62231
62371
|
param.name.escapedText,
|
|
62232
62372
|
788968 /* Type */,
|
|
62373
|
+
/*nameNotFoundMessage*/
|
|
62233
62374
|
void 0,
|
|
62234
62375
|
param.name.escapedText,
|
|
62235
62376
|
/*isUse*/
|
|
@@ -62457,7 +62598,14 @@ function createTypeChecker(host) {
|
|
|
62457
62598
|
/*isReadonly*/
|
|
62458
62599
|
false
|
|
62459
62600
|
)] : emptyArray;
|
|
62460
|
-
return createAnonymousType(
|
|
62601
|
+
return createAnonymousType(
|
|
62602
|
+
/*symbol*/
|
|
62603
|
+
void 0,
|
|
62604
|
+
members,
|
|
62605
|
+
emptyArray,
|
|
62606
|
+
emptyArray,
|
|
62607
|
+
indexInfos
|
|
62608
|
+
);
|
|
62461
62609
|
}
|
|
62462
62610
|
function inferTypeForHomomorphicMappedType(source, target, constraint) {
|
|
62463
62611
|
if (inInferTypeForHomomorphicMappedType) {
|
|
@@ -63953,7 +64101,7 @@ function createTypeChecker(host) {
|
|
|
63953
64101
|
return source.flags & 1048576 /* Union */ ? !forEach(source.types, (t) => !contains(types, t)) : contains(types, source);
|
|
63954
64102
|
}
|
|
63955
64103
|
function isTypeSubsetOf(source, target) {
|
|
63956
|
-
return source === target || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target);
|
|
64104
|
+
return !!(source === target || source.flags & 131072 /* Never */ || target.flags & 1048576 /* Union */ && isTypeSubsetOfUnion(source, target));
|
|
63957
64105
|
}
|
|
63958
64106
|
function isTypeSubsetOfUnion(source, target) {
|
|
63959
64107
|
if (source.flags & 1048576 /* Union */) {
|
|
@@ -64653,7 +64801,7 @@ function createTypeChecker(host) {
|
|
|
64653
64801
|
return type;
|
|
64654
64802
|
}
|
|
64655
64803
|
pushIfUnique(antecedentTypes, type);
|
|
64656
|
-
if (!isTypeSubsetOf(type,
|
|
64804
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64657
64805
|
subtypeReduction = true;
|
|
64658
64806
|
}
|
|
64659
64807
|
if (isIncomplete(flowType)) {
|
|
@@ -64668,7 +64816,7 @@ function createTypeChecker(host) {
|
|
|
64668
64816
|
return type;
|
|
64669
64817
|
}
|
|
64670
64818
|
antecedentTypes.push(type);
|
|
64671
|
-
if (!isTypeSubsetOf(type,
|
|
64819
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64672
64820
|
subtypeReduction = true;
|
|
64673
64821
|
}
|
|
64674
64822
|
if (isIncomplete(flowType)) {
|
|
@@ -64722,7 +64870,7 @@ function createTypeChecker(host) {
|
|
|
64722
64870
|
}
|
|
64723
64871
|
const type = getTypeFromFlowType(flowType);
|
|
64724
64872
|
pushIfUnique(antecedentTypes, type);
|
|
64725
|
-
if (!isTypeSubsetOf(type,
|
|
64873
|
+
if (!isTypeSubsetOf(type, initialType)) {
|
|
64726
64874
|
subtypeReduction = true;
|
|
64727
64875
|
}
|
|
64728
64876
|
if (type === declaredType) {
|
|
@@ -65802,7 +65950,7 @@ function createTypeChecker(host) {
|
|
|
65802
65950
|
const isNodeInTypeQuery = isInTypeQuery(node);
|
|
65803
65951
|
let container = getThisContainer(
|
|
65804
65952
|
node,
|
|
65805
|
-
/*
|
|
65953
|
+
/*includeArrowFunctions*/
|
|
65806
65954
|
true,
|
|
65807
65955
|
/*includeClassComputedPropertyName*/
|
|
65808
65956
|
true
|
|
@@ -65816,7 +65964,7 @@ function createTypeChecker(host) {
|
|
|
65816
65964
|
if (container.kind === 217 /* ArrowFunction */) {
|
|
65817
65965
|
container = getThisContainer(
|
|
65818
65966
|
container,
|
|
65819
|
-
/*
|
|
65967
|
+
/*includeArrowFunctions*/
|
|
65820
65968
|
false,
|
|
65821
65969
|
!thisInComputedPropertyName
|
|
65822
65970
|
);
|
|
@@ -66429,6 +66577,7 @@ function createTypeChecker(host) {
|
|
|
66429
66577
|
id,
|
|
66430
66578
|
id.escapedText,
|
|
66431
66579
|
111551 /* Value */,
|
|
66580
|
+
/*nameNotFoundMessage*/
|
|
66432
66581
|
void 0,
|
|
66433
66582
|
id.escapedText,
|
|
66434
66583
|
/*isUse*/
|
|
@@ -66478,7 +66627,9 @@ function createTypeChecker(host) {
|
|
|
66478
66627
|
declaration.left,
|
|
66479
66628
|
name,
|
|
66480
66629
|
111551 /* Value */,
|
|
66630
|
+
/*nameNotFoundMessage*/
|
|
66481
66631
|
void 0,
|
|
66632
|
+
/*nameArg*/
|
|
66482
66633
|
void 0,
|
|
66483
66634
|
/*isUse*/
|
|
66484
66635
|
true,
|
|
@@ -67831,7 +67982,7 @@ function createTypeChecker(host) {
|
|
|
67831
67982
|
location,
|
|
67832
67983
|
namespaceName,
|
|
67833
67984
|
1920 /* Namespace */,
|
|
67834
|
-
/*
|
|
67985
|
+
/*nameNotFoundMessage*/
|
|
67835
67986
|
void 0,
|
|
67836
67987
|
namespaceName,
|
|
67837
67988
|
/*isUse*/
|
|
@@ -67854,7 +68005,7 @@ function createTypeChecker(host) {
|
|
|
67854
68005
|
const s = resolveSymbol(getGlobalSymbol(
|
|
67855
68006
|
JsxNames.JSX,
|
|
67856
68007
|
1920 /* Namespace */,
|
|
67857
|
-
/*
|
|
68008
|
+
/*diagnostic*/
|
|
67858
68009
|
void 0
|
|
67859
68010
|
));
|
|
67860
68011
|
if (s === unknownSymbol) {
|
|
@@ -67948,7 +68099,7 @@ function createTypeChecker(host) {
|
|
|
67948
68099
|
function generateInitialErrorChain() {
|
|
67949
68100
|
const componentName = getTextOfNode(openingLikeElement.tagName);
|
|
67950
68101
|
return chainDiagnosticMessages(
|
|
67951
|
-
/*
|
|
68102
|
+
/*details*/
|
|
67952
68103
|
void 0,
|
|
67953
68104
|
Diagnostics._0_cannot_be_used_as_a_JSX_component,
|
|
67954
68105
|
componentName
|
|
@@ -68206,7 +68357,7 @@ function createTypeChecker(host) {
|
|
|
68206
68357
|
function getThisParameterFromNodeContext(node) {
|
|
68207
68358
|
const thisContainer = getThisContainer(
|
|
68208
68359
|
node,
|
|
68209
|
-
/*
|
|
68360
|
+
/*includeArrowFunctions*/
|
|
68210
68361
|
false,
|
|
68211
68362
|
/*includeClassComputedPropertyName*/
|
|
68212
68363
|
false
|
|
@@ -68344,9 +68495,9 @@ function createTypeChecker(host) {
|
|
|
68344
68495
|
if (symbol) {
|
|
68345
68496
|
markPropertyAsReferenced(
|
|
68346
68497
|
symbol,
|
|
68347
|
-
/*
|
|
68498
|
+
/*nodeForCheckWriteOnly*/
|
|
68348
68499
|
void 0,
|
|
68349
|
-
/*
|
|
68500
|
+
/*isSelfTypeAccess*/
|
|
68350
68501
|
false
|
|
68351
68502
|
);
|
|
68352
68503
|
}
|
|
@@ -68887,7 +69038,7 @@ function createTypeChecker(host) {
|
|
|
68887
69038
|
return isPropertyAccessible(
|
|
68888
69039
|
node,
|
|
68889
69040
|
node.kind === 209 /* PropertyAccessExpression */ && node.expression.kind === 107 /* SuperKeyword */,
|
|
68890
|
-
/*
|
|
69041
|
+
/*isWrite*/
|
|
68891
69042
|
false,
|
|
68892
69043
|
type,
|
|
68893
69044
|
property
|
|
@@ -68901,7 +69052,7 @@ function createTypeChecker(host) {
|
|
|
68901
69052
|
return !!prop && isPropertyAccessible(
|
|
68902
69053
|
node,
|
|
68903
69054
|
isSuper,
|
|
68904
|
-
/*
|
|
69055
|
+
/*isWrite*/
|
|
68905
69056
|
false,
|
|
68906
69057
|
type,
|
|
68907
69058
|
prop
|
|
@@ -69614,7 +69765,17 @@ function createTypeChecker(host) {
|
|
|
69614
69765
|
function isPromiseResolveArityError(node) {
|
|
69615
69766
|
if (!isCallExpression(node) || !isIdentifier(node.expression))
|
|
69616
69767
|
return false;
|
|
69617
|
-
const symbol = resolveName(
|
|
69768
|
+
const symbol = resolveName(
|
|
69769
|
+
node.expression,
|
|
69770
|
+
node.expression.escapedText,
|
|
69771
|
+
111551 /* Value */,
|
|
69772
|
+
/*nameNotFoundMessage*/
|
|
69773
|
+
void 0,
|
|
69774
|
+
/*nameArg*/
|
|
69775
|
+
void 0,
|
|
69776
|
+
/*isUse*/
|
|
69777
|
+
false
|
|
69778
|
+
);
|
|
69618
69779
|
const decl = symbol == null ? void 0 : symbol.valueDeclaration;
|
|
69619
69780
|
if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) {
|
|
69620
69781
|
return false;
|
|
@@ -70093,7 +70254,7 @@ function createTypeChecker(host) {
|
|
|
70093
70254
|
parameters,
|
|
70094
70255
|
/*resolvedReturnType*/
|
|
70095
70256
|
getIntersectionType(candidates.map(getReturnTypeOfSignature)),
|
|
70096
|
-
/*
|
|
70257
|
+
/*resolvedTypePredicate*/
|
|
70097
70258
|
void 0,
|
|
70098
70259
|
minArgumentCount,
|
|
70099
70260
|
flags
|
|
@@ -70214,7 +70375,7 @@ function createTypeChecker(host) {
|
|
|
70214
70375
|
if (isLineBreak(text.charCodeAt(skipTrivia(
|
|
70215
70376
|
text,
|
|
70216
70377
|
node.expression.end,
|
|
70217
|
-
/*
|
|
70378
|
+
/*stopAfterLineBreak*/
|
|
70218
70379
|
true
|
|
70219
70380
|
) - 1))) {
|
|
70220
70381
|
relatedInformation = createDiagnosticForNode(node.expression, Diagnostics.Are_you_missing_a_semicolon);
|
|
@@ -70393,7 +70554,7 @@ function createTypeChecker(host) {
|
|
|
70393
70554
|
}
|
|
70394
70555
|
if (!hasSignatures) {
|
|
70395
70556
|
errorInfo = chainDiagnosticMessages(
|
|
70396
|
-
/*
|
|
70557
|
+
/*details*/
|
|
70397
70558
|
void 0,
|
|
70398
70559
|
isCall ? Diagnostics.No_constituent_of_type_0_is_callable : Diagnostics.No_constituent_of_type_0_is_constructable,
|
|
70399
70560
|
typeToString(apparentType)
|
|
@@ -70434,7 +70595,7 @@ function createTypeChecker(host) {
|
|
|
70434
70595
|
if (isCallExpression(errorTarget.parent)) {
|
|
70435
70596
|
const { start, length: length2 } = getDiagnosticSpanForCallNode(
|
|
70436
70597
|
errorTarget.parent,
|
|
70437
|
-
/*
|
|
70598
|
+
/*doNotIncludeArguments*/
|
|
70438
70599
|
true
|
|
70439
70600
|
);
|
|
70440
70601
|
diagnostic.start = start;
|
|
@@ -70542,10 +70703,10 @@ function createTypeChecker(host) {
|
|
|
70542
70703
|
[factory.createParameterDeclaration(
|
|
70543
70704
|
/*modifiers*/
|
|
70544
70705
|
void 0,
|
|
70545
|
-
/*
|
|
70706
|
+
/*dotDotDotToken*/
|
|
70546
70707
|
void 0,
|
|
70547
70708
|
"props",
|
|
70548
|
-
/*
|
|
70709
|
+
/*questionToken*/
|
|
70549
70710
|
void 0,
|
|
70550
70711
|
nodeBuilder.typeToTypeNode(result, node)
|
|
70551
70712
|
)],
|
|
@@ -70565,7 +70726,7 @@ function createTypeChecker(host) {
|
|
|
70565
70726
|
void 0,
|
|
70566
70727
|
[parameterSymbol],
|
|
70567
70728
|
typeSymbol ? getDeclaredTypeOfSymbol(typeSymbol) : errorType,
|
|
70568
|
-
/*
|
|
70729
|
+
/*resolvedTypePredicate*/
|
|
70569
70730
|
void 0,
|
|
70570
70731
|
1,
|
|
70571
70732
|
0 /* None */
|
|
@@ -70635,8 +70796,11 @@ function createTypeChecker(host) {
|
|
|
70635
70796
|
return cached;
|
|
70636
70797
|
}
|
|
70637
70798
|
links.resolvedSignature = resolvingSignature;
|
|
70638
|
-
|
|
70799
|
+
let result = resolveSignature(node, candidatesOutArray, checkMode || 0 /* Normal */);
|
|
70639
70800
|
if (result !== resolvingSignature) {
|
|
70801
|
+
if (links.resolvedSignature !== resolvingSignature) {
|
|
70802
|
+
result = links.resolvedSignature;
|
|
70803
|
+
}
|
|
70640
70804
|
links.resolvedSignature = flowLoopStart === flowLoopCount ? result : cached;
|
|
70641
70805
|
}
|
|
70642
70806
|
return result;
|
|
@@ -70882,9 +71046,9 @@ function createTypeChecker(host) {
|
|
|
70882
71046
|
const esModuleSymbol = resolveESModuleSymbol(
|
|
70883
71047
|
moduleSymbol,
|
|
70884
71048
|
specifier,
|
|
70885
|
-
/*
|
|
71049
|
+
/*dontResolveAlias*/
|
|
70886
71050
|
true,
|
|
70887
|
-
/*
|
|
71051
|
+
/*suppressInteropError*/
|
|
70888
71052
|
false
|
|
70889
71053
|
);
|
|
70890
71054
|
if (esModuleSymbol) {
|
|
@@ -70954,7 +71118,7 @@ function createTypeChecker(host) {
|
|
|
70954
71118
|
function isCommonJsRequire(node) {
|
|
70955
71119
|
if (!isRequireCall(
|
|
70956
71120
|
node,
|
|
70957
|
-
/*
|
|
71121
|
+
/*requireStringLiteralLikeArgument*/
|
|
70958
71122
|
true
|
|
70959
71123
|
)) {
|
|
70960
71124
|
return false;
|
|
@@ -70995,14 +71159,14 @@ function createTypeChecker(host) {
|
|
|
70995
71159
|
checkDeprecatedSignature(signature, node);
|
|
70996
71160
|
return getReturnTypeOfSignature(signature);
|
|
70997
71161
|
}
|
|
70998
|
-
function checkAssertion(node) {
|
|
71162
|
+
function checkAssertion(node, checkMode) {
|
|
70999
71163
|
if (node.kind === 214 /* TypeAssertionExpression */) {
|
|
71000
71164
|
const file = getSourceFileOfNode(node);
|
|
71001
71165
|
if (file && fileExtensionIsOneOf(file.fileName, [".cts" /* Cts */, ".mts" /* Mts */])) {
|
|
71002
71166
|
grammarErrorOnNode(node, Diagnostics.This_syntax_is_reserved_in_files_with_the_mts_or_cts_extension_Use_an_as_expression_instead);
|
|
71003
71167
|
}
|
|
71004
71168
|
}
|
|
71005
|
-
return checkAssertionWorker(node,
|
|
71169
|
+
return checkAssertionWorker(node, checkMode);
|
|
71006
71170
|
}
|
|
71007
71171
|
function isValidConstAssertionArgument(node) {
|
|
71008
71172
|
switch (node.kind) {
|
|
@@ -71035,8 +71199,9 @@ function createTypeChecker(host) {
|
|
|
71035
71199
|
}
|
|
71036
71200
|
return false;
|
|
71037
71201
|
}
|
|
71038
|
-
function checkAssertionWorker(
|
|
71039
|
-
|
|
71202
|
+
function checkAssertionWorker(node, checkMode) {
|
|
71203
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
71204
|
+
const exprType = checkExpression(expression, checkMode);
|
|
71040
71205
|
if (isConstTypeReference(type)) {
|
|
71041
71206
|
if (!isValidConstAssertionArgument(expression)) {
|
|
71042
71207
|
error(expression, Diagnostics.A_const_assertions_can_only_be_applied_to_references_to_enum_members_or_string_number_boolean_array_or_object_literals);
|
|
@@ -71044,7 +71209,29 @@ function createTypeChecker(host) {
|
|
|
71044
71209
|
return getRegularTypeOfLiteralType(exprType);
|
|
71045
71210
|
}
|
|
71046
71211
|
checkSourceElement(type);
|
|
71047
|
-
|
|
71212
|
+
checkNodeDeferred(node);
|
|
71213
|
+
return getTypeFromTypeNode(type);
|
|
71214
|
+
}
|
|
71215
|
+
function getAssertionTypeAndExpression(node) {
|
|
71216
|
+
let type;
|
|
71217
|
+
let expression;
|
|
71218
|
+
switch (node.kind) {
|
|
71219
|
+
case 232 /* AsExpression */:
|
|
71220
|
+
case 214 /* TypeAssertionExpression */:
|
|
71221
|
+
type = node.type;
|
|
71222
|
+
expression = node.expression;
|
|
71223
|
+
break;
|
|
71224
|
+
case 215 /* ParenthesizedExpression */:
|
|
71225
|
+
type = getJSDocTypeAssertionType(node);
|
|
71226
|
+
expression = node.expression;
|
|
71227
|
+
break;
|
|
71228
|
+
}
|
|
71229
|
+
return { type, expression };
|
|
71230
|
+
}
|
|
71231
|
+
function checkAssertionDeferred(node) {
|
|
71232
|
+
const { type, expression } = getAssertionTypeAndExpression(node);
|
|
71233
|
+
const errNode = isParenthesizedExpression(node) ? type : node;
|
|
71234
|
+
const exprType = getRegularTypeOfObjectLiteral(getBaseTypeOfLiteralType(checkExpression(expression)));
|
|
71048
71235
|
const targetType = getTypeFromTypeNode(type);
|
|
71049
71236
|
if (!isErrorType(targetType)) {
|
|
71050
71237
|
addLazyDiagnostic(() => {
|
|
@@ -71059,7 +71246,6 @@ function createTypeChecker(host) {
|
|
|
71059
71246
|
}
|
|
71060
71247
|
});
|
|
71061
71248
|
}
|
|
71062
|
-
return targetType;
|
|
71063
71249
|
}
|
|
71064
71250
|
function checkNonNullChain(node) {
|
|
71065
71251
|
const leftType = checkExpression(node.expression);
|
|
@@ -71111,7 +71297,14 @@ function createTypeChecker(host) {
|
|
|
71111
71297
|
hasSignatures || (hasSignatures = resolved.callSignatures.length !== 0 || resolved.constructSignatures.length !== 0);
|
|
71112
71298
|
hasApplicableSignature || (hasApplicableSignature = callSignatures.length !== 0 || constructSignatures.length !== 0);
|
|
71113
71299
|
if (callSignatures !== resolved.callSignatures || constructSignatures !== resolved.constructSignatures) {
|
|
71114
|
-
const result3 = createAnonymousType(
|
|
71300
|
+
const result3 = createAnonymousType(
|
|
71301
|
+
/*symbol*/
|
|
71302
|
+
void 0,
|
|
71303
|
+
resolved.members,
|
|
71304
|
+
callSignatures,
|
|
71305
|
+
constructSignatures,
|
|
71306
|
+
resolved.indexInfos
|
|
71307
|
+
);
|
|
71115
71308
|
result3.objectFlags |= 8388608 /* InstantiationExpressionType */;
|
|
71116
71309
|
result3.node = node;
|
|
71117
71310
|
return result3;
|
|
@@ -71300,12 +71493,12 @@ function createTypeChecker(host) {
|
|
|
71300
71493
|
}
|
|
71301
71494
|
return void 0;
|
|
71302
71495
|
}
|
|
71303
|
-
function getRestTypeAtPosition(source, pos
|
|
71496
|
+
function getRestTypeAtPosition(source, pos) {
|
|
71304
71497
|
const parameterCount = getParameterCount(source);
|
|
71305
71498
|
const minArgumentCount = getMinArgumentCount(source);
|
|
71306
71499
|
const restType = getEffectiveRestType(source);
|
|
71307
71500
|
if (restType && pos >= parameterCount - 1) {
|
|
71308
|
-
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType)
|
|
71501
|
+
return pos === parameterCount - 1 ? restType : createArrayType(getIndexedAccessType(restType, numberType));
|
|
71309
71502
|
}
|
|
71310
71503
|
const types = [];
|
|
71311
71504
|
const flags = [];
|
|
@@ -71323,7 +71516,13 @@ function createTypeChecker(host) {
|
|
|
71323
71516
|
names.push(name);
|
|
71324
71517
|
}
|
|
71325
71518
|
}
|
|
71326
|
-
return createTupleType(
|
|
71519
|
+
return createTupleType(
|
|
71520
|
+
types,
|
|
71521
|
+
flags,
|
|
71522
|
+
/*readonly*/
|
|
71523
|
+
false,
|
|
71524
|
+
length(names) === length(types) ? names : void 0
|
|
71525
|
+
);
|
|
71327
71526
|
}
|
|
71328
71527
|
function getParameterCount(signature) {
|
|
71329
71528
|
const length2 = signature.parameters.length;
|
|
@@ -71553,13 +71752,13 @@ function createTypeChecker(host) {
|
|
|
71553
71752
|
}
|
|
71554
71753
|
function createClassAccessorDecoratorTargetType(thisType, valueType) {
|
|
71555
71754
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorTargetType(
|
|
71556
|
-
/*
|
|
71755
|
+
/*reportErrors*/
|
|
71557
71756
|
true
|
|
71558
71757
|
), [thisType, valueType]);
|
|
71559
71758
|
}
|
|
71560
71759
|
function createClassAccessorDecoratorResultType(thisType, valueType) {
|
|
71561
71760
|
return tryCreateTypeReference(getGlobalClassAccessorDecoratorResultType(
|
|
71562
|
-
/*
|
|
71761
|
+
/*reportErrors*/
|
|
71563
71762
|
true
|
|
71564
71763
|
), [thisType, valueType]);
|
|
71565
71764
|
}
|
|
@@ -72077,8 +72276,11 @@ function createTypeChecker(host) {
|
|
|
72077
72276
|
}
|
|
72078
72277
|
const returnType = getReturnTypeFromBody(node, checkMode);
|
|
72079
72278
|
const returnOnlySignature = createSignature(
|
|
72279
|
+
/*declaration*/
|
|
72080
72280
|
void 0,
|
|
72281
|
+
/*typeParameters*/
|
|
72081
72282
|
void 0,
|
|
72283
|
+
/*thisParameter*/
|
|
72082
72284
|
void 0,
|
|
72083
72285
|
emptyArray,
|
|
72084
72286
|
returnType,
|
|
@@ -73126,6 +73328,7 @@ function createTypeChecker(host) {
|
|
|
73126
73328
|
prop.valueDeclaration,
|
|
73127
73329
|
name,
|
|
73128
73330
|
788968 /* Type */,
|
|
73331
|
+
/*nameNotFoundMessage*/
|
|
73129
73332
|
void 0,
|
|
73130
73333
|
name,
|
|
73131
73334
|
/*isUse*/
|
|
@@ -73732,7 +73935,7 @@ function createTypeChecker(host) {
|
|
|
73732
73935
|
}
|
|
73733
73936
|
if (isCallExpression(expr) && expr.expression.kind !== 107 /* SuperKeyword */ && !isRequireCall(
|
|
73734
73937
|
expr,
|
|
73735
|
-
/*
|
|
73938
|
+
/*requireStringLiteralLikeArgument*/
|
|
73736
73939
|
true
|
|
73737
73940
|
) && !isSymbolOrSymbolForCall(expr)) {
|
|
73738
73941
|
return isCallChain(expr) ? getReturnTypeOfSingleNonGenericSignatureOfCallChain(expr) : getReturnTypeOfSingleNonGenericCallSignature(checkNonNullExpression(expr.expression));
|
|
@@ -73792,8 +73995,7 @@ function createTypeChecker(host) {
|
|
|
73792
73995
|
return checkSatisfiesExpressionWorker(node.expression, getJSDocSatisfiesExpressionType(node), checkMode);
|
|
73793
73996
|
}
|
|
73794
73997
|
if (isJSDocTypeAssertion(node)) {
|
|
73795
|
-
|
|
73796
|
-
return checkAssertionWorker(type, type, node.expression, checkMode);
|
|
73998
|
+
return checkAssertionWorker(node, checkMode);
|
|
73797
73999
|
}
|
|
73798
74000
|
}
|
|
73799
74001
|
return checkExpression(node.expression, checkMode);
|
|
@@ -73868,7 +74070,7 @@ function createTypeChecker(host) {
|
|
|
73868
74070
|
return checkTypeOfExpression(node);
|
|
73869
74071
|
case 214 /* TypeAssertionExpression */:
|
|
73870
74072
|
case 232 /* AsExpression */:
|
|
73871
|
-
return checkAssertion(node);
|
|
74073
|
+
return checkAssertion(node, checkMode);
|
|
73872
74074
|
case 233 /* NonNullExpression */:
|
|
73873
74075
|
return checkNonNullAssertion(node);
|
|
73874
74076
|
case 231 /* ExpressionWithTypeArguments */:
|
|
@@ -75385,7 +75587,7 @@ function createTypeChecker(host) {
|
|
|
75385
75587
|
void 0,
|
|
75386
75588
|
/*nameArg*/
|
|
75387
75589
|
void 0,
|
|
75388
|
-
/*
|
|
75590
|
+
/*isUse*/
|
|
75389
75591
|
true
|
|
75390
75592
|
);
|
|
75391
75593
|
if (rootSymbol && rootSymbol.flags & 2097152 /* Alias */) {
|
|
@@ -76129,7 +76331,7 @@ function createTypeChecker(host) {
|
|
|
76129
76331
|
node,
|
|
76130
76332
|
node.name.escapedText,
|
|
76131
76333
|
3 /* Variable */,
|
|
76132
|
-
/*
|
|
76334
|
+
/*nameNotFoundMessage*/
|
|
76133
76335
|
void 0,
|
|
76134
76336
|
/*nameArg*/
|
|
76135
76337
|
void 0,
|
|
@@ -76947,12 +77149,12 @@ function createTypeChecker(host) {
|
|
|
76947
77149
|
const suggestAwait = (
|
|
76948
77150
|
// for (const x of Promise<...>) or [...Promise<...>]
|
|
76949
77151
|
!!getAwaitedTypeOfPromise(type) || !allowAsyncIterables && isForOfStatement(errorNode.parent) && errorNode.parent.expression === errorNode && getGlobalAsyncIterableType(
|
|
76950
|
-
|
|
77152
|
+
/*reportErrors*/
|
|
76951
77153
|
false
|
|
76952
77154
|
) !== emptyGenericType && isTypeAssignableTo(
|
|
76953
77155
|
type,
|
|
76954
77156
|
getGlobalAsyncIterableType(
|
|
76955
|
-
|
|
77157
|
+
/*reportErrors*/
|
|
76956
77158
|
false
|
|
76957
77159
|
)
|
|
76958
77160
|
)
|
|
@@ -77820,7 +78022,7 @@ function createTypeChecker(host) {
|
|
|
77820
78022
|
type,
|
|
77821
78023
|
typeWithThis,
|
|
77822
78024
|
param,
|
|
77823
|
-
/*
|
|
78025
|
+
/*memberIsParameterProperty*/
|
|
77824
78026
|
true
|
|
77825
78027
|
);
|
|
77826
78028
|
}
|
|
@@ -77834,7 +78036,7 @@ function createTypeChecker(host) {
|
|
|
77834
78036
|
type,
|
|
77835
78037
|
typeWithThis,
|
|
77836
78038
|
member,
|
|
77837
|
-
/*
|
|
78039
|
+
/*memberIsParameterProperty*/
|
|
77838
78040
|
false
|
|
77839
78041
|
);
|
|
77840
78042
|
}
|
|
@@ -77938,7 +78140,7 @@ function createTypeChecker(host) {
|
|
|
77938
78140
|
getTypeOfSymbol(prop),
|
|
77939
78141
|
getTypeOfSymbol(baseProp),
|
|
77940
78142
|
member.name || member,
|
|
77941
|
-
/*
|
|
78143
|
+
/*headMessage*/
|
|
77942
78144
|
void 0,
|
|
77943
78145
|
rootChain
|
|
77944
78146
|
)) {
|
|
@@ -77986,7 +78188,7 @@ function createTypeChecker(host) {
|
|
|
77986
78188
|
memberHasOverrideModifier,
|
|
77987
78189
|
hasAbstractModifier(member),
|
|
77988
78190
|
isStatic(member),
|
|
77989
|
-
/*
|
|
78191
|
+
/*memberIsParameterProperty*/
|
|
77990
78192
|
false,
|
|
77991
78193
|
symbolName(memberSymbol)
|
|
77992
78194
|
);
|
|
@@ -79454,6 +79656,10 @@ function createTypeChecker(host) {
|
|
|
79454
79656
|
case 282 /* JsxElement */:
|
|
79455
79657
|
checkJsxElementDeferred(node);
|
|
79456
79658
|
break;
|
|
79659
|
+
case 214 /* TypeAssertionExpression */:
|
|
79660
|
+
case 232 /* AsExpression */:
|
|
79661
|
+
case 215 /* ParenthesizedExpression */:
|
|
79662
|
+
checkAssertionDeferred(node);
|
|
79457
79663
|
}
|
|
79458
79664
|
currentNode = saveCurrentNode;
|
|
79459
79665
|
(_b = tracing) == null ? void 0 : _b.pop();
|
|
@@ -79816,7 +80022,12 @@ function createTypeChecker(host) {
|
|
|
79816
80022
|
meaning = 1920 /* Namespace */;
|
|
79817
80023
|
}
|
|
79818
80024
|
meaning |= 2097152 /* Alias */;
|
|
79819
|
-
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
80025
|
+
const entityNameSymbol = isEntityNameExpression(name) ? resolveEntityName(
|
|
80026
|
+
name,
|
|
80027
|
+
meaning,
|
|
80028
|
+
/*ignoreErrors*/
|
|
80029
|
+
true
|
|
80030
|
+
) : void 0;
|
|
79820
80031
|
if (entityNameSymbol) {
|
|
79821
80032
|
return entityNameSymbol;
|
|
79822
80033
|
}
|
|
@@ -79845,7 +80056,7 @@ function createTypeChecker(host) {
|
|
|
79845
80056
|
meaning,
|
|
79846
80057
|
/*ignoreErrors*/
|
|
79847
80058
|
false,
|
|
79848
|
-
/*
|
|
80059
|
+
/*dontResolveAlias*/
|
|
79849
80060
|
true,
|
|
79850
80061
|
getHostSignatureFromJSDoc(name)
|
|
79851
80062
|
);
|
|
@@ -79868,7 +80079,7 @@ function createTypeChecker(host) {
|
|
|
79868
80079
|
meaning,
|
|
79869
80080
|
/*ignoreErrors*/
|
|
79870
80081
|
true,
|
|
79871
|
-
/*
|
|
80082
|
+
/*dontResolveAlias*/
|
|
79872
80083
|
true,
|
|
79873
80084
|
getSourceFileOfNode(container)
|
|
79874
80085
|
) || result;
|
|
@@ -80041,7 +80252,7 @@ function createTypeChecker(host) {
|
|
|
80041
80252
|
case 14 /* NoSubstitutionTemplateLiteral */:
|
|
80042
80253
|
if (isExternalModuleImportEqualsDeclaration(node.parent.parent) && getExternalModuleImportEqualsDeclarationExpression(node.parent.parent) === node || (node.parent.kind === 270 /* ImportDeclaration */ || node.parent.kind === 276 /* ExportDeclaration */) && node.parent.moduleSpecifier === node || (isInJSFile(node) && getEmitModuleResolutionKind(compilerOptions) !== 100 /* Bundler */ && isRequireCall(
|
|
80043
80254
|
node.parent,
|
|
80044
|
-
/*
|
|
80255
|
+
/*requireStringLiteralLikeArgument*/
|
|
80045
80256
|
false
|
|
80046
80257
|
) || isImportCall(node.parent)) || isLiteralTypeNode(node.parent) && isLiteralImportTypeNode(node.parent.parent) && node.parent.parent.argument === node.parent) {
|
|
80047
80258
|
return resolveExternalModuleName(node, node, ignoreErrors);
|
|
@@ -80655,7 +80866,7 @@ function createTypeChecker(host) {
|
|
|
80655
80866
|
location,
|
|
80656
80867
|
reference.escapedText,
|
|
80657
80868
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
80658
|
-
/*
|
|
80869
|
+
/*nameNotFoundMessage*/
|
|
80659
80870
|
void 0,
|
|
80660
80871
|
/*nameArg*/
|
|
80661
80872
|
void 0,
|
|
@@ -80672,7 +80883,7 @@ function createTypeChecker(host) {
|
|
|
80672
80883
|
reference,
|
|
80673
80884
|
reference.escapedText,
|
|
80674
80885
|
111551 /* Value */ | 1048576 /* ExportValue */ | 2097152 /* Alias */,
|
|
80675
|
-
/*
|
|
80886
|
+
/*nameNotFoundMessage*/
|
|
80676
80887
|
void 0,
|
|
80677
80888
|
/*nameArg*/
|
|
80678
80889
|
void 0,
|
|
@@ -81089,7 +81300,14 @@ function createTypeChecker(host) {
|
|
|
81089
81300
|
anyArrayType = createArrayType(anyType);
|
|
81090
81301
|
autoArrayType = createArrayType(autoType);
|
|
81091
81302
|
if (autoArrayType === emptyObjectType) {
|
|
81092
|
-
autoArrayType = createAnonymousType(
|
|
81303
|
+
autoArrayType = createAnonymousType(
|
|
81304
|
+
/*symbol*/
|
|
81305
|
+
void 0,
|
|
81306
|
+
emptySymbols,
|
|
81307
|
+
emptyArray,
|
|
81308
|
+
emptyArray,
|
|
81309
|
+
emptyArray
|
|
81310
|
+
);
|
|
81093
81311
|
}
|
|
81094
81312
|
globalReadonlyArrayType = getGlobalTypeOrUndefined(
|
|
81095
81313
|
"ReadonlyArray",
|
|
@@ -82207,7 +82425,7 @@ function createTypeChecker(host) {
|
|
|
82207
82425
|
if (node.label && current.label.escapedText === node.label.escapedText) {
|
|
82208
82426
|
const isMisplacedContinueLabel = node.kind === 249 /* ContinueStatement */ && !isIterationStatement(
|
|
82209
82427
|
current.statement,
|
|
82210
|
-
/*
|
|
82428
|
+
/*lookInLabeledStatements*/
|
|
82211
82429
|
true
|
|
82212
82430
|
);
|
|
82213
82431
|
if (isMisplacedContinueLabel) {
|
|
@@ -82224,7 +82442,7 @@ function createTypeChecker(host) {
|
|
|
82224
82442
|
default:
|
|
82225
82443
|
if (isIterationStatement(
|
|
82226
82444
|
current,
|
|
82227
|
-
/*
|
|
82445
|
+
/*lookInLabeledStatements*/
|
|
82228
82446
|
false
|
|
82229
82447
|
) && !node.label) {
|
|
82230
82448
|
return false;
|
|
@@ -82514,25 +82732,6 @@ function createTypeChecker(host) {
|
|
|
82514
82732
|
return false;
|
|
82515
82733
|
}
|
|
82516
82734
|
function checkGrammarNumericLiteral(node) {
|
|
82517
|
-
if (node.numericLiteralFlags & 32 /* Octal */) {
|
|
82518
|
-
let diagnosticMessage;
|
|
82519
|
-
if (languageVersion >= 1 /* ES5 */) {
|
|
82520
|
-
diagnosticMessage = Diagnostics.Octal_literals_are_not_available_when_targeting_ECMAScript_5_and_higher_Use_the_syntax_0;
|
|
82521
|
-
} else if (isChildOfNodeWithKind(node, 199 /* LiteralType */)) {
|
|
82522
|
-
diagnosticMessage = Diagnostics.Octal_literal_types_must_use_ES2015_syntax_Use_the_syntax_0;
|
|
82523
|
-
} else if (isChildOfNodeWithKind(node, 303 /* EnumMember */)) {
|
|
82524
|
-
diagnosticMessage = Diagnostics.Octal_literals_are_not_allowed_in_enums_members_initializer_Use_the_syntax_0;
|
|
82525
|
-
}
|
|
82526
|
-
if (diagnosticMessage) {
|
|
82527
|
-
const withMinus = isPrefixUnaryExpression(node.parent) && node.parent.operator === 40 /* MinusToken */;
|
|
82528
|
-
const literal = (withMinus ? "-" : "") + "0o" + node.text;
|
|
82529
|
-
return grammarErrorOnNode(withMinus ? node.parent : node, diagnosticMessage, literal);
|
|
82530
|
-
}
|
|
82531
|
-
}
|
|
82532
|
-
checkNumericLiteralValueSize(node);
|
|
82533
|
-
return false;
|
|
82534
|
-
}
|
|
82535
|
-
function checkNumericLiteralValueSize(node) {
|
|
82536
82735
|
const isFractional = getTextOfNode(node).indexOf(".") !== -1;
|
|
82537
82736
|
const isScientific = node.numericLiteralFlags & 16 /* Scientific */;
|
|
82538
82737
|
if (isFractional || isScientific) {
|
|
@@ -85473,7 +85672,7 @@ function processTaggedTemplateExpression(context, node, visitor, currentSourceFi
|
|
|
85473
85672
|
);
|
|
85474
85673
|
}
|
|
85475
85674
|
function createTemplateCooked(factory2, template) {
|
|
85476
|
-
return template.templateFlags ? factory2.createVoidZero() : factory2.createStringLiteral(template.text);
|
|
85675
|
+
return template.templateFlags & 26656 /* IsInvalid */ ? factory2.createVoidZero() : factory2.createStringLiteral(template.text);
|
|
85477
85676
|
}
|
|
85478
85677
|
function getRawLiteral(factory2, node, currentSourceFile) {
|
|
85479
85678
|
let text = node.rawText;
|
|
@@ -85832,7 +86031,7 @@ function transformTypeScript(context) {
|
|
|
85832
86031
|
let facts = 0 /* None */;
|
|
85833
86032
|
if (some(getProperties(
|
|
85834
86033
|
node,
|
|
85835
|
-
/*
|
|
86034
|
+
/*requireInitializer*/
|
|
85836
86035
|
true,
|
|
85837
86036
|
/*isStatic*/
|
|
85838
86037
|
true
|
|
@@ -87702,10 +87901,10 @@ function transformClassFields(context) {
|
|
|
87702
87901
|
filter(node.modifiers, (m) => isModifier(m) && !isStaticModifier(m) && !isAccessorModifier(m)),
|
|
87703
87902
|
node.asteriskToken,
|
|
87704
87903
|
functionName,
|
|
87705
|
-
/*
|
|
87904
|
+
/*typeParameters*/
|
|
87706
87905
|
void 0,
|
|
87707
87906
|
visitParameterList(node.parameters, visitor, context),
|
|
87708
|
-
/*
|
|
87907
|
+
/*type*/
|
|
87709
87908
|
void 0,
|
|
87710
87909
|
visitFunctionBody(node.body, visitor, context)
|
|
87711
87910
|
)
|
|
@@ -88310,7 +88509,7 @@ function transformClassFields(context) {
|
|
|
88310
88509
|
info.brandCheckIdentifier,
|
|
88311
88510
|
right,
|
|
88312
88511
|
info.kind,
|
|
88313
|
-
/*
|
|
88512
|
+
/*f*/
|
|
88314
88513
|
void 0
|
|
88315
88514
|
);
|
|
88316
88515
|
case "f" /* Field */:
|
|
@@ -88382,7 +88581,7 @@ function transformClassFields(context) {
|
|
|
88382
88581
|
if (facts & 4 /* NeedsClassSuperReference */) {
|
|
88383
88582
|
const temp = factory2.createTempVariable(
|
|
88384
88583
|
hoistVariableDeclaration,
|
|
88385
|
-
/*
|
|
88584
|
+
/*reservedInNestedScopes*/
|
|
88386
88585
|
true
|
|
88387
88586
|
);
|
|
88388
88587
|
getClassLexicalEnvironment().superClassReference = temp;
|
|
@@ -89215,7 +89414,7 @@ function transformClassFields(context) {
|
|
|
89215
89414
|
const identifier = typeof name === "object" ? factory2.getGeneratedNameForNode(name, 16 /* Optimistic */ | 8 /* ReservedInNestedScopes */, prefix, suffix) : typeof name === "string" ? factory2.createUniqueName(name, 16 /* Optimistic */, prefix, suffix) : factory2.createTempVariable(
|
|
89216
89415
|
/*recordTempVariable*/
|
|
89217
89416
|
void 0,
|
|
89218
|
-
/*
|
|
89417
|
+
/*reservedInNestedScopes*/
|
|
89219
89418
|
true,
|
|
89220
89419
|
prefix,
|
|
89221
89420
|
suffix
|
|
@@ -89921,11 +90120,11 @@ function transformLegacyDecorators(context) {
|
|
|
89921
90120
|
}
|
|
89922
90121
|
function visitClassDeclaration(node) {
|
|
89923
90122
|
if (!(classOrConstructorParameterIsDecorated(
|
|
89924
|
-
/*
|
|
90123
|
+
/*useLegacyDecorators*/
|
|
89925
90124
|
true,
|
|
89926
90125
|
node
|
|
89927
90126
|
) || childIsDecorated(
|
|
89928
|
-
/*
|
|
90127
|
+
/*useLegacyDecorators*/
|
|
89929
90128
|
true,
|
|
89930
90129
|
node
|
|
89931
90130
|
))) {
|
|
@@ -90180,7 +90379,7 @@ function transformLegacyDecorators(context) {
|
|
|
90180
90379
|
}
|
|
90181
90380
|
function isDecoratedClassElement(member, isStaticElement, parent) {
|
|
90182
90381
|
return nodeOrChildIsDecorated(
|
|
90183
|
-
/*
|
|
90382
|
+
/*useLegacyDecorators*/
|
|
90184
90383
|
true,
|
|
90185
90384
|
member,
|
|
90186
90385
|
parent
|
|
@@ -90532,7 +90731,7 @@ function transformESDecorators(context) {
|
|
|
90532
90731
|
case 223 /* PostfixUnaryExpression */:
|
|
90533
90732
|
return visitPreOrPostfixUnaryExpression(
|
|
90534
90733
|
node,
|
|
90535
|
-
/*
|
|
90734
|
+
/*discarded*/
|
|
90536
90735
|
false
|
|
90537
90736
|
);
|
|
90538
90737
|
case 209 /* PropertyAccessExpression */:
|
|
@@ -90683,7 +90882,7 @@ function transformESDecorators(context) {
|
|
|
90683
90882
|
let hasStaticPrivateClassElements = false;
|
|
90684
90883
|
for (const member of node.members) {
|
|
90685
90884
|
if (isNamedClassElement(member) && nodeOrChildIsDecorated(
|
|
90686
|
-
/*
|
|
90885
|
+
/*useLegacyDecorators*/
|
|
90687
90886
|
false,
|
|
90688
90887
|
member,
|
|
90689
90888
|
node
|
|
@@ -90922,7 +91121,7 @@ function transformESDecorators(context) {
|
|
|
90922
91121
|
if (leadingBlockStatements) {
|
|
90923
91122
|
const leadingStaticBlockBody = factory2.createBlock(
|
|
90924
91123
|
leadingBlockStatements,
|
|
90925
|
-
/*
|
|
91124
|
+
/*multiLine*/
|
|
90926
91125
|
true
|
|
90927
91126
|
);
|
|
90928
91127
|
const leadingStaticBlock = factory2.createClassStaticBlockDeclaration(leadingStaticBlockBody);
|
|
@@ -90937,7 +91136,7 @@ function transformESDecorators(context) {
|
|
|
90937
91136
|
if (trailingBlockStatements) {
|
|
90938
91137
|
const trailingStaticBlockBody = factory2.createBlock(
|
|
90939
91138
|
trailingBlockStatements,
|
|
90940
|
-
/*
|
|
91139
|
+
/*multiLine*/
|
|
90941
91140
|
true
|
|
90942
91141
|
);
|
|
90943
91142
|
const trailingStaticBlock = factory2.createClassStaticBlockDeclaration(trailingStaticBlockBody);
|
|
@@ -91003,11 +91202,11 @@ function transformESDecorators(context) {
|
|
|
91003
91202
|
}
|
|
91004
91203
|
function isDecoratedClassLike(node) {
|
|
91005
91204
|
return classOrConstructorParameterIsDecorated(
|
|
91006
|
-
/*
|
|
91205
|
+
/*useLegacyDecorators*/
|
|
91007
91206
|
false,
|
|
91008
91207
|
node
|
|
91009
91208
|
) || childIsDecorated(
|
|
91010
|
-
/*
|
|
91209
|
+
/*useLegacyDecorators*/
|
|
91011
91210
|
false,
|
|
91012
91211
|
node
|
|
91013
91212
|
);
|
|
@@ -92687,15 +92886,15 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92687
92886
|
getterAndSetter.push(factory2.createPropertyAssignment(
|
|
92688
92887
|
"get",
|
|
92689
92888
|
factory2.createArrowFunction(
|
|
92690
|
-
/*
|
|
92889
|
+
/*modifiers*/
|
|
92691
92890
|
void 0,
|
|
92692
|
-
/*
|
|
92891
|
+
/*typeParameters*/
|
|
92693
92892
|
void 0,
|
|
92694
92893
|
/* parameters */
|
|
92695
92894
|
[],
|
|
92696
|
-
/*
|
|
92895
|
+
/*type*/
|
|
92697
92896
|
void 0,
|
|
92698
|
-
/*
|
|
92897
|
+
/*equalsGreaterThanToken*/
|
|
92699
92898
|
void 0,
|
|
92700
92899
|
setEmitFlags(
|
|
92701
92900
|
factory2.createPropertyAccessExpression(
|
|
@@ -92714,29 +92913,29 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92714
92913
|
factory2.createPropertyAssignment(
|
|
92715
92914
|
"set",
|
|
92716
92915
|
factory2.createArrowFunction(
|
|
92717
|
-
/*
|
|
92916
|
+
/*modifiers*/
|
|
92718
92917
|
void 0,
|
|
92719
|
-
/*
|
|
92918
|
+
/*typeParameters*/
|
|
92720
92919
|
void 0,
|
|
92721
92920
|
/* parameters */
|
|
92722
92921
|
[
|
|
92723
92922
|
factory2.createParameterDeclaration(
|
|
92724
|
-
/*
|
|
92923
|
+
/*modifiers*/
|
|
92725
92924
|
void 0,
|
|
92726
|
-
/*
|
|
92925
|
+
/*dotDotDotToken*/
|
|
92727
92926
|
void 0,
|
|
92728
92927
|
"v",
|
|
92729
|
-
/*
|
|
92928
|
+
/*questionToken*/
|
|
92730
92929
|
void 0,
|
|
92731
|
-
/*
|
|
92930
|
+
/*type*/
|
|
92732
92931
|
void 0,
|
|
92733
|
-
/*
|
|
92932
|
+
/*initializer*/
|
|
92734
92933
|
void 0
|
|
92735
92934
|
)
|
|
92736
92935
|
],
|
|
92737
|
-
/*
|
|
92936
|
+
/*type*/
|
|
92738
92937
|
void 0,
|
|
92739
|
-
/*
|
|
92938
|
+
/*equalsGreaterThanToken*/
|
|
92740
92939
|
void 0,
|
|
92741
92940
|
factory2.createAssignment(
|
|
92742
92941
|
setEmitFlags(
|
|
@@ -92763,7 +92962,7 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92763
92962
|
);
|
|
92764
92963
|
});
|
|
92765
92964
|
return factory2.createVariableStatement(
|
|
92766
|
-
/*
|
|
92965
|
+
/*modifiers*/
|
|
92767
92966
|
void 0,
|
|
92768
92967
|
factory2.createVariableDeclarationList(
|
|
92769
92968
|
[
|
|
@@ -92771,20 +92970,20 @@ function createSuperAccessVariableStatement(factory2, resolver, node, names) {
|
|
|
92771
92970
|
factory2.createUniqueName("_super", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
92772
92971
|
/*exclamationToken*/
|
|
92773
92972
|
void 0,
|
|
92774
|
-
/*
|
|
92973
|
+
/*type*/
|
|
92775
92974
|
void 0,
|
|
92776
92975
|
factory2.createCallExpression(
|
|
92777
92976
|
factory2.createPropertyAccessExpression(
|
|
92778
92977
|
factory2.createIdentifier("Object"),
|
|
92779
92978
|
"create"
|
|
92780
92979
|
),
|
|
92781
|
-
/*
|
|
92980
|
+
/*typeArguments*/
|
|
92782
92981
|
void 0,
|
|
92783
92982
|
[
|
|
92784
92983
|
factory2.createNull(),
|
|
92785
92984
|
factory2.createObjectLiteralExpression(
|
|
92786
92985
|
accessors,
|
|
92787
|
-
/*
|
|
92986
|
+
/*multiLine*/
|
|
92788
92987
|
true
|
|
92789
92988
|
)
|
|
92790
92989
|
]
|
|
@@ -93656,7 +93855,7 @@ function transformES2018(context) {
|
|
|
93656
93855
|
enclosingFunctionFlags & 2 /* Async */ ? void 0 : node.asteriskToken,
|
|
93657
93856
|
visitNode(node.name, visitor, isPropertyName),
|
|
93658
93857
|
visitNode(
|
|
93659
|
-
/*
|
|
93858
|
+
/*node*/
|
|
93660
93859
|
void 0,
|
|
93661
93860
|
visitor,
|
|
93662
93861
|
isQuestionToken
|
|
@@ -93882,7 +94081,7 @@ function transformES2018(context) {
|
|
|
93882
94081
|
context,
|
|
93883
94082
|
1 /* ObjectRest */,
|
|
93884
94083
|
factory2.getGeneratedNameForNode(parameter),
|
|
93885
|
-
/*
|
|
94084
|
+
/*hoistTempVariables*/
|
|
93886
94085
|
false,
|
|
93887
94086
|
/*skipInitializer*/
|
|
93888
94087
|
true
|
|
@@ -94425,7 +94624,7 @@ function transformJsx(context) {
|
|
|
94425
94624
|
}
|
|
94426
94625
|
const declaration = factory2.createVariableDeclaration(
|
|
94427
94626
|
factory2.createUniqueName("_jsxFileName", 16 /* Optimistic */ | 32 /* FileLevel */),
|
|
94428
|
-
/*
|
|
94627
|
+
/*exclamationToken*/
|
|
94429
94628
|
void 0,
|
|
94430
94629
|
/*type*/
|
|
94431
94630
|
void 0,
|
|
@@ -94494,7 +94693,7 @@ function transformJsx(context) {
|
|
|
94494
94693
|
/*modifiers*/
|
|
94495
94694
|
void 0,
|
|
94496
94695
|
factory2.createImportClause(
|
|
94497
|
-
/*
|
|
94696
|
+
/*isTypeOnly*/
|
|
94498
94697
|
false,
|
|
94499
94698
|
/*name*/
|
|
94500
94699
|
void 0,
|
|
@@ -94517,12 +94716,12 @@ function transformJsx(context) {
|
|
|
94517
94716
|
factory2.createVariableDeclarationList([
|
|
94518
94717
|
factory2.createVariableDeclaration(
|
|
94519
94718
|
factory2.createObjectBindingPattern(arrayFrom(importSpecifiersMap.values(), (s) => factory2.createBindingElement(
|
|
94520
|
-
/*
|
|
94719
|
+
/*dotDotDotToken*/
|
|
94521
94720
|
void 0,
|
|
94522
94721
|
s.propertyName,
|
|
94523
94722
|
s.name
|
|
94524
94723
|
))),
|
|
94525
|
-
/*
|
|
94724
|
+
/*exclamationToken*/
|
|
94526
94725
|
void 0,
|
|
94527
94726
|
/*type*/
|
|
94528
94727
|
void 0,
|
|
@@ -96839,7 +97038,7 @@ function transformES2015(context) {
|
|
|
96839
97038
|
visitor,
|
|
96840
97039
|
context,
|
|
96841
97040
|
0 /* All */,
|
|
96842
|
-
/*
|
|
97041
|
+
/*rval*/
|
|
96843
97042
|
void 0,
|
|
96844
97043
|
(ancestorFacts & 32 /* ExportedVariableStatement */) !== 0
|
|
96845
97044
|
);
|
|
@@ -101202,7 +101401,7 @@ function transformModule(context) {
|
|
|
101202
101401
|
/*whenTrue*/
|
|
101203
101402
|
createImportCallExpressionCommonJS(
|
|
101204
101403
|
temp,
|
|
101205
|
-
/*
|
|
101404
|
+
/*isInlineable*/
|
|
101206
101405
|
true
|
|
101207
101406
|
),
|
|
101208
101407
|
/*colonToken*/
|
|
@@ -101638,9 +101837,9 @@ function transformModule(context) {
|
|
|
101638
101837
|
createExportExpression(
|
|
101639
101838
|
factory2.getExportName(specifier),
|
|
101640
101839
|
exportedValue,
|
|
101641
|
-
/*
|
|
101840
|
+
/*location*/
|
|
101642
101841
|
void 0,
|
|
101643
|
-
/*
|
|
101842
|
+
/*liveBinding*/
|
|
101644
101843
|
true
|
|
101645
101844
|
)
|
|
101646
101845
|
),
|
|
@@ -101950,7 +102149,7 @@ function transformModule(context) {
|
|
|
101950
102149
|
statements = appendExportsOfDeclaration(
|
|
101951
102150
|
statements,
|
|
101952
102151
|
importBinding,
|
|
101953
|
-
/*
|
|
102152
|
+
/*liveBinding*/
|
|
101954
102153
|
true
|
|
101955
102154
|
);
|
|
101956
102155
|
}
|
|
@@ -102019,7 +102218,7 @@ function transformModule(context) {
|
|
|
102019
102218
|
name,
|
|
102020
102219
|
/*location*/
|
|
102021
102220
|
exportSpecifier.name,
|
|
102022
|
-
/*
|
|
102221
|
+
/*allowComments*/
|
|
102023
102222
|
void 0,
|
|
102024
102223
|
liveBinding
|
|
102025
102224
|
);
|
|
@@ -102063,7 +102262,7 @@ function transformModule(context) {
|
|
|
102063
102262
|
const statement = setTextRange(factory2.createExpressionStatement(createExportExpression(
|
|
102064
102263
|
name,
|
|
102065
102264
|
value,
|
|
102066
|
-
/*
|
|
102265
|
+
/*location*/
|
|
102067
102266
|
void 0,
|
|
102068
102267
|
liveBinding
|
|
102069
102268
|
)), location);
|
|
@@ -102538,7 +102737,7 @@ function transformSystemModule(context) {
|
|
|
102538
102737
|
void 0,
|
|
102539
102738
|
factory2.createObjectLiteralExpression(
|
|
102540
102739
|
exportedNames,
|
|
102541
|
-
/*
|
|
102740
|
+
/*multiLine*/
|
|
102542
102741
|
true
|
|
102543
102742
|
)
|
|
102544
102743
|
)
|
|
@@ -102630,7 +102829,7 @@ function transformSystemModule(context) {
|
|
|
102630
102829
|
)
|
|
102631
102830
|
)
|
|
102632
102831
|
],
|
|
102633
|
-
/*
|
|
102832
|
+
/*multiLine*/
|
|
102634
102833
|
true
|
|
102635
102834
|
)
|
|
102636
102835
|
);
|
|
@@ -102695,7 +102894,7 @@ function transformSystemModule(context) {
|
|
|
102695
102894
|
void 0,
|
|
102696
102895
|
[factory2.createObjectLiteralExpression(
|
|
102697
102896
|
properties,
|
|
102698
|
-
/*
|
|
102897
|
+
/*multiLine*/
|
|
102699
102898
|
true
|
|
102700
102899
|
)]
|
|
102701
102900
|
)
|
|
@@ -104228,18 +104427,18 @@ function isInternalDeclaration(node, currentSourceFile) {
|
|
|
104228
104427
|
getTrailingCommentRanges(text, skipTrivia(
|
|
104229
104428
|
text,
|
|
104230
104429
|
previousSibling.end + 1,
|
|
104231
|
-
/*
|
|
104430
|
+
/*stopAfterLineBreak*/
|
|
104232
104431
|
false,
|
|
104233
|
-
/*
|
|
104432
|
+
/*stopAtComments*/
|
|
104234
104433
|
true
|
|
104235
104434
|
)),
|
|
104236
104435
|
getLeadingCommentRanges(text, node.pos)
|
|
104237
104436
|
) : getTrailingCommentRanges(text, skipTrivia(
|
|
104238
104437
|
text,
|
|
104239
104438
|
node.pos,
|
|
104240
|
-
/*
|
|
104439
|
+
/*stopAfterLineBreak*/
|
|
104241
104440
|
false,
|
|
104242
|
-
/*
|
|
104441
|
+
/*stopAtComments*/
|
|
104243
104442
|
true
|
|
104244
104443
|
));
|
|
104245
104444
|
return commentRanges && commentRanges.length && hasInternalAnnotation(last(commentRanges), currentSourceFile);
|
|
@@ -104355,7 +104554,7 @@ function transformDeclarations(context) {
|
|
|
104355
104554
|
symbol,
|
|
104356
104555
|
enclosingDeclaration2,
|
|
104357
104556
|
meaning,
|
|
104358
|
-
/*
|
|
104557
|
+
/*shouldComputeAliasToMarkVisible*/
|
|
104359
104558
|
true
|
|
104360
104559
|
));
|
|
104361
104560
|
recordTypeReferenceDirectivesIfNecessary(resolver.getTypeReferenceDirectivesForSymbol(symbol, meaning));
|
|
@@ -104701,7 +104900,7 @@ function transformDeclarations(context) {
|
|
|
104701
104900
|
return factory2.updateBindingElement(
|
|
104702
104901
|
elem,
|
|
104703
104902
|
elem.dotDotDotToken,
|
|
104704
|
-
/*
|
|
104903
|
+
/*propertyName*/
|
|
104705
104904
|
void 0,
|
|
104706
104905
|
elem.propertyName,
|
|
104707
104906
|
shouldPrintWithInitializer(elem) ? elem.initializer : void 0
|
|
@@ -105063,7 +105262,7 @@ function transformDeclarations(context) {
|
|
|
105063
105262
|
return cleanup(factory2.createPropertyDeclaration(
|
|
105064
105263
|
ensureModifiers(input),
|
|
105065
105264
|
input.name,
|
|
105066
|
-
/*
|
|
105265
|
+
/*questionOrExclamationToken*/
|
|
105067
105266
|
void 0,
|
|
105068
105267
|
/*type*/
|
|
105069
105268
|
void 0,
|
|
@@ -105627,7 +105826,7 @@ function transformDeclarations(context) {
|
|
|
105627
105826
|
elems.push(factory2.createPropertyDeclaration(
|
|
105628
105827
|
ensureModifiers(param),
|
|
105629
105828
|
elem.name,
|
|
105630
|
-
/*
|
|
105829
|
+
/*questionOrExclamationToken*/
|
|
105631
105830
|
void 0,
|
|
105632
105831
|
ensureType(
|
|
105633
105832
|
elem,
|
|
@@ -105649,7 +105848,7 @@ function transformDeclarations(context) {
|
|
|
105649
105848
|
/*modifiers*/
|
|
105650
105849
|
void 0,
|
|
105651
105850
|
factory2.createPrivateIdentifier("#private"),
|
|
105652
|
-
/*
|
|
105851
|
+
/*questionOrExclamationToken*/
|
|
105653
105852
|
void 0,
|
|
105654
105853
|
/*type*/
|
|
105655
105854
|
void 0,
|
|
@@ -107051,7 +107250,7 @@ function emitUsingBuildInfoWorker(config, host, getCommandLine, customTransforme
|
|
|
107051
107250
|
declarationMapText,
|
|
107052
107251
|
buildInfoPath,
|
|
107053
107252
|
buildInfo,
|
|
107054
|
-
/*
|
|
107253
|
+
/*oldFileOfCurrentEmit*/
|
|
107055
107254
|
true
|
|
107056
107255
|
);
|
|
107057
107256
|
const outputFiles = [];
|
|
@@ -107244,7 +107443,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107244
107443
|
writeBundle(
|
|
107245
107444
|
bundle,
|
|
107246
107445
|
beginPrint(),
|
|
107247
|
-
/*
|
|
107446
|
+
/*sourceMapGenerator*/
|
|
107248
107447
|
void 0
|
|
107249
107448
|
);
|
|
107250
107449
|
return endPrint();
|
|
@@ -107253,7 +107452,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
107253
107452
|
writeFile2(
|
|
107254
107453
|
sourceFile,
|
|
107255
107454
|
beginPrint(),
|
|
107256
|
-
/*
|
|
107455
|
+
/*sourceMapGenerator*/
|
|
107257
107456
|
void 0
|
|
107258
107457
|
);
|
|
107259
107458
|
return endPrint();
|
|
@@ -108671,7 +108870,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108671
108870
|
/*jsxAttributeEscape*/
|
|
108672
108871
|
false
|
|
108673
108872
|
);
|
|
108674
|
-
return !expression.numericLiteralFlags && !stringContains(text, tokenToString(24 /* DotToken */));
|
|
108873
|
+
return !(expression.numericLiteralFlags & 448 /* WithSpecifier */) && !stringContains(text, tokenToString(24 /* DotToken */)) && !stringContains(text, String.fromCharCode(69 /* E */)) && !stringContains(text, String.fromCharCode(101 /* e */));
|
|
108675
108874
|
} else if (isAccessExpression(expression)) {
|
|
108676
108875
|
const constantValue = getConstantValue(expression);
|
|
108677
108876
|
return typeof constantValue === "number" && isFinite(constantValue) && Math.floor(constantValue) === constantValue;
|
|
@@ -108734,7 +108933,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108734
108933
|
const indented = writeLineSeparatorsAndIndentBefore(node.expression, node);
|
|
108735
108934
|
emitExpression(
|
|
108736
108935
|
node.expression,
|
|
108737
|
-
/*
|
|
108936
|
+
/*parenthesizerRule*/
|
|
108738
108937
|
void 0
|
|
108739
108938
|
);
|
|
108740
108939
|
writeLineSeparatorsAfter(node.expression, node);
|
|
@@ -108948,7 +109147,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108948
109147
|
function emitAsExpression(node) {
|
|
108949
109148
|
emitExpression(
|
|
108950
109149
|
node.expression,
|
|
108951
|
-
/*
|
|
109150
|
+
/*parenthesizerRule*/
|
|
108952
109151
|
void 0
|
|
108953
109152
|
);
|
|
108954
109153
|
if (node.type) {
|
|
@@ -108965,7 +109164,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
108965
109164
|
function emitSatisfiesExpression(node) {
|
|
108966
109165
|
emitExpression(
|
|
108967
109166
|
node.expression,
|
|
108968
|
-
/*
|
|
109167
|
+
/*parenthesizerRule*/
|
|
108969
109168
|
void 0
|
|
108970
109169
|
);
|
|
108971
109170
|
if (node.type) {
|
|
@@ -111285,7 +111484,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
111285
111484
|
case 165 /* ComputedPropertyName */:
|
|
111286
111485
|
return makeTempVariableName(
|
|
111287
111486
|
0 /* Auto */,
|
|
111288
|
-
/*
|
|
111487
|
+
/*reservedInNestedScopes*/
|
|
111289
111488
|
true,
|
|
111290
111489
|
privateName,
|
|
111291
111490
|
prefix,
|
|
@@ -111294,7 +111493,7 @@ function createPrinter(printerOptions = {}, handlers = {}) {
|
|
|
111294
111493
|
default:
|
|
111295
111494
|
return makeTempVariableName(
|
|
111296
111495
|
0 /* Auto */,
|
|
111297
|
-
/*
|
|
111496
|
+
/*reservedInNestedScopes*/
|
|
111298
111497
|
false,
|
|
111299
111498
|
privateName,
|
|
111300
111499
|
prefix,
|
|
@@ -112919,7 +113118,6 @@ var plainJSErrors = /* @__PURE__ */ new Set([
|
|
|
112919
113118
|
Diagnostics.Invalid_use_of_0_Modules_are_automatically_in_strict_mode.code,
|
|
112920
113119
|
Diagnostics.Invalid_use_of_0_in_strict_mode.code,
|
|
112921
113120
|
Diagnostics.A_label_is_not_allowed_here.code,
|
|
112922
|
-
Diagnostics.Octal_literals_are_not_allowed_in_strict_mode.code,
|
|
112923
113121
|
Diagnostics.with_statements_are_not_allowed_in_strict_mode.code,
|
|
112924
113122
|
// grammar errors
|
|
112925
113123
|
Diagnostics.A_break_statement_can_only_be_used_within_an_enclosing_iteration_or_switch_statement.code,
|
|
@@ -113586,7 +113784,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
113586
113784
|
return resolveTypeReferenceDirectiveNamesWorker(
|
|
113587
113785
|
typeDirectiveNames,
|
|
113588
113786
|
containingFile,
|
|
113589
|
-
/*
|
|
113787
|
+
/*reusedNames*/
|
|
113590
113788
|
void 0
|
|
113591
113789
|
);
|
|
113592
113790
|
}
|
|
@@ -113914,7 +114112,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
113914
114112
|
void 0,
|
|
113915
114113
|
/*transformers*/
|
|
113916
114114
|
noTransformers,
|
|
113917
|
-
/*
|
|
114115
|
+
/*emitOnly*/
|
|
113918
114116
|
false,
|
|
113919
114117
|
/*onlyBuildInfo*/
|
|
113920
114118
|
true
|
|
@@ -114510,7 +114708,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
114510
114708
|
const node = getNodeAtPosition(file2, r.lastIndex);
|
|
114511
114709
|
if (shouldProcessRequires && isRequireCall(
|
|
114512
114710
|
node,
|
|
114513
|
-
/*
|
|
114711
|
+
/*requireStringLiteralLikeArgument*/
|
|
114514
114712
|
true
|
|
114515
114713
|
)) {
|
|
114516
114714
|
setParentRecursive(
|
|
@@ -115107,7 +115305,7 @@ function createProgram(rootNamesOrOptions, _options, _host, _oldProgram, _config
|
|
|
115107
115305
|
commandLine = host.getParsedCommandLine(refPath);
|
|
115108
115306
|
if (!commandLine) {
|
|
115109
115307
|
addFileToFilesByName(
|
|
115110
|
-
/*
|
|
115308
|
+
/*file*/
|
|
115111
115309
|
void 0,
|
|
115112
115310
|
sourceFilePath,
|
|
115113
115311
|
/*redirectedPath*/
|
|
@@ -116422,7 +116620,7 @@ var BuilderState;
|
|
|
116422
116620
|
), sourceFiles);
|
|
116423
116621
|
},
|
|
116424
116622
|
cancellationToken,
|
|
116425
|
-
/*
|
|
116623
|
+
/*emitOnly*/
|
|
116426
116624
|
true,
|
|
116427
116625
|
/*customTransformers*/
|
|
116428
116626
|
void 0,
|
|
@@ -117621,7 +117819,7 @@ function createBuilderProgram(kind, { newProgram, host, oldProgram, configFilePa
|
|
|
117621
117819
|
continue;
|
|
117622
117820
|
} else {
|
|
117623
117821
|
result = state.program.getSemanticDiagnostics(
|
|
117624
|
-
/*
|
|
117822
|
+
/*sourceFile*/
|
|
117625
117823
|
void 0,
|
|
117626
117824
|
cancellationToken
|
|
117627
117825
|
);
|
|
@@ -118418,7 +118616,7 @@ function createResolutionCache(resolutionHost, rootDirForResolution, logChangesW
|
|
|
118418
118616
|
} else {
|
|
118419
118617
|
resolutions.forEach((resolution) => watchAffectingLocationsOfResolution(
|
|
118420
118618
|
resolution,
|
|
118421
|
-
/*
|
|
118619
|
+
/*addToResolutionsWithOnlyAffectingLocations*/
|
|
118422
118620
|
true
|
|
118423
118621
|
));
|
|
118424
118622
|
}
|
|
@@ -118778,7 +118976,7 @@ function prettyPathForFileError(error, cwd) {
|
|
|
118778
118976
|
return getRelativePathFromDirectory(
|
|
118779
118977
|
cwd,
|
|
118780
118978
|
error.fileName,
|
|
118781
|
-
/*
|
|
118979
|
+
/*ignoreCase*/
|
|
118782
118980
|
false
|
|
118783
118981
|
) + line;
|
|
118784
118982
|
}
|
|
@@ -119923,7 +120121,6 @@ function createWatchProgram(host) {
|
|
|
119923
120121
|
);
|
|
119924
120122
|
}
|
|
119925
120123
|
function updateExtendedConfigFilesWatches(forProjectPath, options, watchOptions2, watchType) {
|
|
119926
|
-
Debug.assert(configFileName);
|
|
119927
120124
|
updateSharedExtendedConfigFileWatcher(
|
|
119928
120125
|
forProjectPath,
|
|
119929
120126
|
options,
|
|
@@ -119939,7 +120136,7 @@ function createWatchProgram(host) {
|
|
|
119939
120136
|
if (!(projects == null ? void 0 : projects.size))
|
|
119940
120137
|
return;
|
|
119941
120138
|
projects.forEach((projectPath) => {
|
|
119942
|
-
if (toPath3(configFileName) === projectPath) {
|
|
120139
|
+
if (configFileName && toPath3(configFileName) === projectPath) {
|
|
119943
120140
|
reloadLevel = 2 /* Full */;
|
|
119944
120141
|
} else {
|
|
119945
120142
|
const config = parsedConfigs == null ? void 0 : parsedConfigs.get(projectPath);
|
|
@@ -120665,7 +120862,7 @@ function createBuildOrUpdateInvalidedProject(kind, state, project, projectPath,
|
|
|
120665
120862
|
void 0,
|
|
120666
120863
|
(name, text, writeByteOrderMark, _onError, _sourceFiles, data) => outputFiles.push({ name, text, writeByteOrderMark, data }),
|
|
120667
120864
|
cancellationToken,
|
|
120668
|
-
/*
|
|
120865
|
+
/*emitOnlyDtsFiles*/
|
|
120669
120866
|
false,
|
|
120670
120867
|
customTransformers || ((_b = (_a2 = state.host).getCustomTransformers) == null ? void 0 : _b.call(_a2, project))
|
|
120671
120868
|
);
|
|
@@ -122341,9 +122538,9 @@ function printEasyHelp(sys2, simpleOptions) {
|
|
|
122341
122538
|
cliCommands,
|
|
122342
122539
|
/*subCategory*/
|
|
122343
122540
|
false,
|
|
122344
|
-
/*
|
|
122541
|
+
/*beforeOptionsDescription*/
|
|
122345
122542
|
void 0,
|
|
122346
|
-
/*
|
|
122543
|
+
/*afterOptionsDescription*/
|
|
122347
122544
|
void 0
|
|
122348
122545
|
),
|
|
122349
122546
|
...generateSectionOptionsOutput(
|
|
@@ -122352,10 +122549,10 @@ function printEasyHelp(sys2, simpleOptions) {
|
|
|
122352
122549
|
configOpts,
|
|
122353
122550
|
/*subCategory*/
|
|
122354
122551
|
false,
|
|
122355
|
-
/*
|
|
122552
|
+
/*beforeOptionsDescription*/
|
|
122356
122553
|
void 0,
|
|
122357
122554
|
formatMessage(
|
|
122358
|
-
/*
|
|
122555
|
+
/*dummy*/
|
|
122359
122556
|
void 0,
|
|
122360
122557
|
Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
|
|
122361
122558
|
"https://aka.ms/tsc"
|
|
@@ -122381,10 +122578,10 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
|
122381
122578
|
compilerOptions,
|
|
122382
122579
|
/*subCategory*/
|
|
122383
122580
|
true,
|
|
122384
|
-
/*
|
|
122581
|
+
/*beforeOptionsDescription*/
|
|
122385
122582
|
void 0,
|
|
122386
122583
|
formatMessage(
|
|
122387
|
-
/*
|
|
122584
|
+
/*dummy*/
|
|
122388
122585
|
void 0,
|
|
122389
122586
|
Diagnostics.You_can_learn_about_all_of_the_compiler_options_at_0,
|
|
122390
122587
|
"https://aka.ms/tsc"
|
|
@@ -122405,7 +122602,7 @@ function printAllHelp(sys2, compilerOptions, buildOptions, watchOptions) {
|
|
|
122405
122602
|
/*subCategory*/
|
|
122406
122603
|
false,
|
|
122407
122604
|
formatMessage(
|
|
122408
|
-
/*
|
|
122605
|
+
/*dummy*/
|
|
122409
122606
|
void 0,
|
|
122410
122607
|
Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
|
|
122411
122608
|
"https://aka.ms/tsc-composite-builds"
|
|
@@ -122424,7 +122621,7 @@ function printBuildHelp(sys2, buildOptions) {
|
|
|
122424
122621
|
/*subCategory*/
|
|
122425
122622
|
false,
|
|
122426
122623
|
formatMessage(
|
|
122427
|
-
/*
|
|
122624
|
+
/*dummy*/
|
|
122428
122625
|
void 0,
|
|
122429
122626
|
Diagnostics.Using_build_b_will_make_tsc_behave_more_like_a_build_orchestrator_than_a_compiler_This_is_used_to_trigger_building_composite_projects_which_you_can_learn_more_about_at_0,
|
|
122430
122627
|
"https://aka.ms/tsc-composite-builds"
|
|
@@ -122739,7 +122936,7 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
122739
122936
|
const { fileNames, options, projectReferences } = config;
|
|
122740
122937
|
const host = createCompilerHostWorker(
|
|
122741
122938
|
options,
|
|
122742
|
-
/*
|
|
122939
|
+
/*setParentNodes*/
|
|
122743
122940
|
void 0,
|
|
122744
122941
|
sys2
|
|
122745
122942
|
);
|
|
@@ -122769,7 +122966,7 @@ function performCompilation(sys2, cb, reportDiagnostic, config) {
|
|
|
122769
122966
|
reportStatistics(
|
|
122770
122967
|
sys2,
|
|
122771
122968
|
program,
|
|
122772
|
-
/*
|
|
122969
|
+
/*solutionPerformance*/
|
|
122773
122970
|
void 0
|
|
122774
122971
|
);
|
|
122775
122972
|
cb(program);
|
|
@@ -122797,7 +122994,7 @@ function performIncrementalCompilation2(sys2, cb, reportDiagnostic, config) {
|
|
|
122797
122994
|
reportStatistics(
|
|
122798
122995
|
sys2,
|
|
122799
122996
|
builderProgram.getProgram(),
|
|
122800
|
-
/*
|
|
122997
|
+
/*solutionPerformance*/
|
|
122801
122998
|
void 0
|
|
122802
122999
|
);
|
|
122803
123000
|
cb(builderProgram);
|
|
@@ -122850,7 +123047,7 @@ function updateWatchCompilationHost(sys2, cb, watchCompilerHost) {
|
|
|
122850
123047
|
reportStatistics(
|
|
122851
123048
|
sys2,
|
|
122852
123049
|
builderProgram.getProgram(),
|
|
122853
|
-
/*
|
|
123050
|
+
/*solutionPerformance*/
|
|
122854
123051
|
void 0
|
|
122855
123052
|
);
|
|
122856
123053
|
cb(builderProgram);
|