@typescript-deploys/pr-build 5.4.0-pr-56680-2 → 5.4.0-pr-55924-28
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 +38 -8
- package/lib/tsserver.js +42 -12
- package/lib/typescript.js +42 -12
- package/lib/typingsInstaller.js +5 -3
- 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.4";
|
|
21
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
21
|
+
var version = `${versionMajorMinor}.0-insiders.20231207`;
|
|
22
22
|
|
|
23
23
|
// src/compiler/core.ts
|
|
24
24
|
var emptyArray = [];
|
|
@@ -3483,6 +3483,7 @@ var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
|
3483
3483
|
return ModifierFlags3;
|
|
3484
3484
|
})(ModifierFlags || {});
|
|
3485
3485
|
var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
3486
|
+
RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None";
|
|
3486
3487
|
RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded";
|
|
3487
3488
|
RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed";
|
|
3488
3489
|
RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported";
|
|
@@ -6780,6 +6781,8 @@ var Diagnostics = {
|
|
|
6780
6781
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
6781
6782
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
6782
6783
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6784
|
+
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
6785
|
+
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
6783
6786
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6784
6787
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6785
6788
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -28305,8 +28308,7 @@ var Parser;
|
|
|
28305
28308
|
function parseJSDocFunctionType() {
|
|
28306
28309
|
const pos = getNodePos();
|
|
28307
28310
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
28308
|
-
if (
|
|
28309
|
-
nextToken();
|
|
28311
|
+
if (tryParse(nextTokenIsOpenParen)) {
|
|
28310
28312
|
const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);
|
|
28311
28313
|
const type = parseReturnType(
|
|
28312
28314
|
59 /* ColonToken */,
|
|
@@ -60317,12 +60319,12 @@ function createTypeChecker(host) {
|
|
|
60317
60319
|
return !!(entry & 1 /* Succeeded */);
|
|
60318
60320
|
}
|
|
60319
60321
|
const targetEnumType = getTypeOfSymbol(targetSymbol);
|
|
60320
|
-
for (const
|
|
60321
|
-
if (
|
|
60322
|
-
const targetProperty = getPropertyOfType(targetEnumType,
|
|
60322
|
+
for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
|
|
60323
|
+
if (sourceProperty.flags & 8 /* EnumMember */) {
|
|
60324
|
+
const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
|
|
60323
60325
|
if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
|
|
60324
60326
|
if (errorReporter) {
|
|
60325
|
-
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(
|
|
60327
|
+
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
|
|
60326
60328
|
getDeclaredTypeOfSymbol(targetSymbol),
|
|
60327
60329
|
/*enclosingDeclaration*/
|
|
60328
60330
|
void 0,
|
|
@@ -60334,6 +60336,34 @@ function createTypeChecker(host) {
|
|
|
60334
60336
|
}
|
|
60335
60337
|
return false;
|
|
60336
60338
|
}
|
|
60339
|
+
const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
|
|
60340
|
+
const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
|
|
60341
|
+
if (sourceValue !== targetValue) {
|
|
60342
|
+
const sourceIsString = typeof sourceValue === "string";
|
|
60343
|
+
const targetIsString = typeof targetValue === "string";
|
|
60344
|
+
if (sourceValue !== void 0 && targetValue !== void 0) {
|
|
60345
|
+
if (!errorReporter) {
|
|
60346
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
60347
|
+
} else {
|
|
60348
|
+
const escapedSource = sourceIsString ? `"${escapeString(sourceValue)}"` : sourceValue;
|
|
60349
|
+
const escapedTarget = targetIsString ? `"${escapeString(targetValue)}"` : targetValue;
|
|
60350
|
+
errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource);
|
|
60351
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
60352
|
+
}
|
|
60353
|
+
return false;
|
|
60354
|
+
} else if (sourceIsString || targetIsString) {
|
|
60355
|
+
if (!errorReporter) {
|
|
60356
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
60357
|
+
} else {
|
|
60358
|
+
const knownStringValue = sourceValue ?? targetValue;
|
|
60359
|
+
Debug.assert(typeof knownStringValue === "string");
|
|
60360
|
+
const escapedValue = `"${escapeString(knownStringValue)}"`;
|
|
60361
|
+
errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue);
|
|
60362
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
60363
|
+
}
|
|
60364
|
+
return false;
|
|
60365
|
+
}
|
|
60366
|
+
}
|
|
60337
60367
|
}
|
|
60338
60368
|
}
|
|
60339
60369
|
enumRelation.set(id, 1 /* Succeeded */);
|
|
@@ -80050,7 +80080,7 @@ function createTypeChecker(host) {
|
|
|
80050
80080
|
error(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums);
|
|
80051
80081
|
} else {
|
|
80052
80082
|
const text = getTextOfPropertyName(member.name);
|
|
80053
|
-
if (isNumericLiteralName(text)
|
|
80083
|
+
if (isNumericLiteralName(text)) {
|
|
80054
80084
|
error(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
80055
80085
|
}
|
|
80056
80086
|
}
|
package/lib/tsserver.js
CHANGED
|
@@ -2334,7 +2334,7 @@ module.exports = __toCommonJS(server_exports);
|
|
|
2334
2334
|
|
|
2335
2335
|
// src/compiler/corePublic.ts
|
|
2336
2336
|
var versionMajorMinor = "5.4";
|
|
2337
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
2337
|
+
var version = `${versionMajorMinor}.0-insiders.20231207`;
|
|
2338
2338
|
var Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
2339
2339
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
2340
2340
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -6238,6 +6238,7 @@ var JsxFlags = /* @__PURE__ */ ((JsxFlags2) => {
|
|
|
6238
6238
|
return JsxFlags2;
|
|
6239
6239
|
})(JsxFlags || {});
|
|
6240
6240
|
var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
6241
|
+
RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None";
|
|
6241
6242
|
RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded";
|
|
6242
6243
|
RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed";
|
|
6243
6244
|
RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported";
|
|
@@ -10333,6 +10334,8 @@ var Diagnostics = {
|
|
|
10333
10334
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
10334
10335
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
10335
10336
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
10337
|
+
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
10338
|
+
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
10336
10339
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
10337
10340
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
10338
10341
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -32734,8 +32737,7 @@ var Parser;
|
|
|
32734
32737
|
function parseJSDocFunctionType() {
|
|
32735
32738
|
const pos = getNodePos();
|
|
32736
32739
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
32737
|
-
if (
|
|
32738
|
-
nextToken();
|
|
32740
|
+
if (tryParse(nextTokenIsOpenParen)) {
|
|
32739
32741
|
const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);
|
|
32740
32742
|
const type = parseReturnType(
|
|
32741
32743
|
59 /* ColonToken */,
|
|
@@ -65046,12 +65048,12 @@ function createTypeChecker(host) {
|
|
|
65046
65048
|
return !!(entry & 1 /* Succeeded */);
|
|
65047
65049
|
}
|
|
65048
65050
|
const targetEnumType = getTypeOfSymbol(targetSymbol);
|
|
65049
|
-
for (const
|
|
65050
|
-
if (
|
|
65051
|
-
const targetProperty = getPropertyOfType(targetEnumType,
|
|
65051
|
+
for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
|
|
65052
|
+
if (sourceProperty.flags & 8 /* EnumMember */) {
|
|
65053
|
+
const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
|
|
65052
65054
|
if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
|
|
65053
65055
|
if (errorReporter) {
|
|
65054
|
-
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(
|
|
65056
|
+
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
|
|
65055
65057
|
getDeclaredTypeOfSymbol(targetSymbol),
|
|
65056
65058
|
/*enclosingDeclaration*/
|
|
65057
65059
|
void 0,
|
|
@@ -65063,6 +65065,34 @@ function createTypeChecker(host) {
|
|
|
65063
65065
|
}
|
|
65064
65066
|
return false;
|
|
65065
65067
|
}
|
|
65068
|
+
const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
|
|
65069
|
+
const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
|
|
65070
|
+
if (sourceValue !== targetValue) {
|
|
65071
|
+
const sourceIsString = typeof sourceValue === "string";
|
|
65072
|
+
const targetIsString = typeof targetValue === "string";
|
|
65073
|
+
if (sourceValue !== void 0 && targetValue !== void 0) {
|
|
65074
|
+
if (!errorReporter) {
|
|
65075
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
65076
|
+
} else {
|
|
65077
|
+
const escapedSource = sourceIsString ? `"${escapeString(sourceValue)}"` : sourceValue;
|
|
65078
|
+
const escapedTarget = targetIsString ? `"${escapeString(targetValue)}"` : targetValue;
|
|
65079
|
+
errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource);
|
|
65080
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
65081
|
+
}
|
|
65082
|
+
return false;
|
|
65083
|
+
} else if (sourceIsString || targetIsString) {
|
|
65084
|
+
if (!errorReporter) {
|
|
65085
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
65086
|
+
} else {
|
|
65087
|
+
const knownStringValue = sourceValue ?? targetValue;
|
|
65088
|
+
Debug.assert(typeof knownStringValue === "string");
|
|
65089
|
+
const escapedValue = `"${escapeString(knownStringValue)}"`;
|
|
65090
|
+
errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue);
|
|
65091
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
65092
|
+
}
|
|
65093
|
+
return false;
|
|
65094
|
+
}
|
|
65095
|
+
}
|
|
65066
65096
|
}
|
|
65067
65097
|
}
|
|
65068
65098
|
enumRelation.set(id, 1 /* Succeeded */);
|
|
@@ -84779,7 +84809,7 @@ function createTypeChecker(host) {
|
|
|
84779
84809
|
error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums);
|
|
84780
84810
|
} else {
|
|
84781
84811
|
const text = getTextOfPropertyName(member.name);
|
|
84782
|
-
if (isNumericLiteralName(text)
|
|
84812
|
+
if (isNumericLiteralName(text)) {
|
|
84783
84813
|
error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
84784
84814
|
}
|
|
84785
84815
|
}
|
|
@@ -167624,16 +167654,16 @@ function getRenameInfoForModule(node, sourceFile, moduleSymbol) {
|
|
|
167624
167654
|
if (!moduleSourceFile)
|
|
167625
167655
|
return void 0;
|
|
167626
167656
|
const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
|
|
167627
|
-
const
|
|
167657
|
+
const name = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
|
|
167628
167658
|
const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */;
|
|
167629
167659
|
const indexAfterLastSlash = node.text.lastIndexOf("/") + 1;
|
|
167630
167660
|
const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);
|
|
167631
167661
|
return {
|
|
167632
167662
|
canRename: true,
|
|
167633
|
-
fileToRename:
|
|
167663
|
+
fileToRename: name,
|
|
167634
167664
|
kind,
|
|
167635
|
-
displayName:
|
|
167636
|
-
fullDisplayName:
|
|
167665
|
+
displayName: name,
|
|
167666
|
+
fullDisplayName: name,
|
|
167637
167667
|
kindModifiers: "" /* none */,
|
|
167638
167668
|
triggerSpan
|
|
167639
167669
|
};
|
package/lib/typescript.js
CHANGED
|
@@ -35,7 +35,7 @@ var ts = (() => {
|
|
|
35
35
|
"src/compiler/corePublic.ts"() {
|
|
36
36
|
"use strict";
|
|
37
37
|
versionMajorMinor = "5.4";
|
|
38
|
-
version = `${versionMajorMinor}.0-insiders.
|
|
38
|
+
version = `${versionMajorMinor}.0-insiders.20231207`;
|
|
39
39
|
Comparison = /* @__PURE__ */ ((Comparison3) => {
|
|
40
40
|
Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
|
|
41
41
|
Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
|
|
@@ -3997,6 +3997,7 @@ ${lanes.join("\n")}
|
|
|
3997
3997
|
return JsxFlags2;
|
|
3998
3998
|
})(JsxFlags || {});
|
|
3999
3999
|
RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
4000
|
+
RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None";
|
|
4000
4001
|
RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded";
|
|
4001
4002
|
RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed";
|
|
4002
4003
|
RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported";
|
|
@@ -8109,6 +8110,8 @@ ${lanes.join("\n")}
|
|
|
8109
8110
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
8110
8111
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
8111
8112
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
8113
|
+
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
8114
|
+
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
8112
8115
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
8113
8116
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
8114
8117
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -30800,8 +30803,7 @@ ${lanes.join("\n")}
|
|
|
30800
30803
|
function parseJSDocFunctionType() {
|
|
30801
30804
|
const pos = getNodePos();
|
|
30802
30805
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
30803
|
-
if (
|
|
30804
|
-
nextToken();
|
|
30806
|
+
if (tryParse(nextTokenIsOpenParen)) {
|
|
30805
30807
|
const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);
|
|
30806
30808
|
const type = parseReturnType(
|
|
30807
30809
|
59 /* ColonToken */,
|
|
@@ -62807,12 +62809,12 @@ ${lanes.join("\n")}
|
|
|
62807
62809
|
return !!(entry & 1 /* Succeeded */);
|
|
62808
62810
|
}
|
|
62809
62811
|
const targetEnumType = getTypeOfSymbol(targetSymbol);
|
|
62810
|
-
for (const
|
|
62811
|
-
if (
|
|
62812
|
-
const targetProperty = getPropertyOfType(targetEnumType,
|
|
62812
|
+
for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
|
|
62813
|
+
if (sourceProperty.flags & 8 /* EnumMember */) {
|
|
62814
|
+
const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
|
|
62813
62815
|
if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
|
|
62814
62816
|
if (errorReporter) {
|
|
62815
|
-
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(
|
|
62817
|
+
errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
|
|
62816
62818
|
getDeclaredTypeOfSymbol(targetSymbol),
|
|
62817
62819
|
/*enclosingDeclaration*/
|
|
62818
62820
|
void 0,
|
|
@@ -62824,6 +62826,34 @@ ${lanes.join("\n")}
|
|
|
62824
62826
|
}
|
|
62825
62827
|
return false;
|
|
62826
62828
|
}
|
|
62829
|
+
const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
|
|
62830
|
+
const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
|
|
62831
|
+
if (sourceValue !== targetValue) {
|
|
62832
|
+
const sourceIsString = typeof sourceValue === "string";
|
|
62833
|
+
const targetIsString = typeof targetValue === "string";
|
|
62834
|
+
if (sourceValue !== void 0 && targetValue !== void 0) {
|
|
62835
|
+
if (!errorReporter) {
|
|
62836
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
62837
|
+
} else {
|
|
62838
|
+
const escapedSource = sourceIsString ? `"${escapeString(sourceValue)}"` : sourceValue;
|
|
62839
|
+
const escapedTarget = targetIsString ? `"${escapeString(targetValue)}"` : targetValue;
|
|
62840
|
+
errorReporter(Diagnostics.Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given, symbolName(targetSymbol), symbolName(targetProperty), escapedTarget, escapedSource);
|
|
62841
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
62842
|
+
}
|
|
62843
|
+
return false;
|
|
62844
|
+
} else if (sourceIsString || targetIsString) {
|
|
62845
|
+
if (!errorReporter) {
|
|
62846
|
+
enumRelation.set(id, 2 /* Failed */);
|
|
62847
|
+
} else {
|
|
62848
|
+
const knownStringValue = sourceValue ?? targetValue;
|
|
62849
|
+
Debug.assert(typeof knownStringValue === "string");
|
|
62850
|
+
const escapedValue = `"${escapeString(knownStringValue)}"`;
|
|
62851
|
+
errorReporter(Diagnostics.One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value, symbolName(targetSymbol), symbolName(targetProperty), escapedValue);
|
|
62852
|
+
enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
|
|
62853
|
+
}
|
|
62854
|
+
return false;
|
|
62855
|
+
}
|
|
62856
|
+
}
|
|
62827
62857
|
}
|
|
62828
62858
|
}
|
|
62829
62859
|
enumRelation.set(id, 1 /* Succeeded */);
|
|
@@ -82540,7 +82570,7 @@ ${lanes.join("\n")}
|
|
|
82540
82570
|
error2(member.name, Diagnostics.Computed_property_names_are_not_allowed_in_enums);
|
|
82541
82571
|
} else {
|
|
82542
82572
|
const text = getTextOfPropertyName(member.name);
|
|
82543
|
-
if (isNumericLiteralName(text)
|
|
82573
|
+
if (isNumericLiteralName(text)) {
|
|
82544
82574
|
error2(member.name, Diagnostics.An_enum_member_cannot_have_a_numeric_name);
|
|
82545
82575
|
}
|
|
82546
82576
|
}
|
|
@@ -167016,16 +167046,16 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
|
|
|
167016
167046
|
if (!moduleSourceFile)
|
|
167017
167047
|
return void 0;
|
|
167018
167048
|
const withoutIndex = endsWith(node.text, "/index") || endsWith(node.text, "/index.js") ? void 0 : tryRemoveSuffix(removeFileExtension(moduleSourceFile.fileName), "/index");
|
|
167019
|
-
const
|
|
167049
|
+
const name = withoutIndex === void 0 ? moduleSourceFile.fileName : withoutIndex;
|
|
167020
167050
|
const kind = withoutIndex === void 0 ? "module" /* moduleElement */ : "directory" /* directory */;
|
|
167021
167051
|
const indexAfterLastSlash = node.text.lastIndexOf("/") + 1;
|
|
167022
167052
|
const triggerSpan = createTextSpan(node.getStart(sourceFile) + 1 + indexAfterLastSlash, node.text.length - indexAfterLastSlash);
|
|
167023
167053
|
return {
|
|
167024
167054
|
canRename: true,
|
|
167025
|
-
fileToRename:
|
|
167055
|
+
fileToRename: name,
|
|
167026
167056
|
kind,
|
|
167027
|
-
displayName:
|
|
167028
|
-
fullDisplayName:
|
|
167057
|
+
displayName: name,
|
|
167058
|
+
fullDisplayName: name,
|
|
167029
167059
|
kindModifiers: "" /* none */,
|
|
167030
167060
|
triggerSpan
|
|
167031
167061
|
};
|
package/lib/typingsInstaller.js
CHANGED
|
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
|
|
|
54
54
|
|
|
55
55
|
// src/compiler/corePublic.ts
|
|
56
56
|
var versionMajorMinor = "5.4";
|
|
57
|
-
var version = `${versionMajorMinor}.0-insiders.
|
|
57
|
+
var version = `${versionMajorMinor}.0-insiders.20231207`;
|
|
58
58
|
|
|
59
59
|
// src/compiler/core.ts
|
|
60
60
|
var emptyArray = [];
|
|
@@ -2944,6 +2944,7 @@ var ModifierFlags = /* @__PURE__ */ ((ModifierFlags3) => {
|
|
|
2944
2944
|
return ModifierFlags3;
|
|
2945
2945
|
})(ModifierFlags || {});
|
|
2946
2946
|
var RelationComparisonResult = /* @__PURE__ */ ((RelationComparisonResult3) => {
|
|
2947
|
+
RelationComparisonResult3[RelationComparisonResult3["None"] = 0] = "None";
|
|
2947
2948
|
RelationComparisonResult3[RelationComparisonResult3["Succeeded"] = 1] = "Succeeded";
|
|
2948
2949
|
RelationComparisonResult3[RelationComparisonResult3["Failed"] = 2] = "Failed";
|
|
2949
2950
|
RelationComparisonResult3[RelationComparisonResult3["Reported"] = 4] = "Reported";
|
|
@@ -6157,6 +6158,8 @@ var Diagnostics = {
|
|
|
6157
6158
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0: diag(4122, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4122", "This member cannot have a JSDoc comment with an '@override' tag because it is not declared in the base class '{0}'."),
|
|
6158
6159
|
This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base_class_0_Did_you_mean_1: diag(4123, 1 /* Error */, "This_member_cannot_have_a_JSDoc_comment_with_an_override_tag_because_it_is_not_declared_in_the_base__4123", "This member cannot have a JSDoc comment with an 'override' tag because it is not declared in the base class '{0}'. Did you mean '{1}'?"),
|
|
6159
6160
|
Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_with_npm_install_D_typescript_next: diag(4124, 1 /* Error */, "Compiler_option_0_of_value_1_is_unstable_Use_nightly_TypeScript_to_silence_this_error_Try_updating_w_4124", "Compiler option '{0}' of value '{1}' is unstable. Use nightly TypeScript to silence this error. Try updating with 'npm install -D typescript@next'."),
|
|
6161
|
+
Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given: diag(4125, 1 /* Error */, "Each_declaration_of_0_1_differs_in_its_value_where_2_was_expected_but_3_was_given_4125", "Each declaration of '{0}.{1}' differs in its value, where '{2}' was expected but '{3}' was given."),
|
|
6162
|
+
One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value: diag(4126, 1 /* Error */, "One_value_of_0_1_is_the_string_2_and_the_other_is_assumed_to_be_an_unknown_numeric_value_4126", "One value of '{0}.{1}' is the string '{2}', and the other is assumed to be an unknown numeric value."),
|
|
6160
6163
|
The_current_host_does_not_support_the_0_option: diag(5001, 1 /* Error */, "The_current_host_does_not_support_the_0_option_5001", "The current host does not support the '{0}' option."),
|
|
6161
6164
|
Cannot_find_the_common_subdirectory_path_for_the_input_files: diag(5009, 1 /* Error */, "Cannot_find_the_common_subdirectory_path_for_the_input_files_5009", "Cannot find the common subdirectory path for the input files."),
|
|
6162
6165
|
File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0: diag(5010, 1 /* Error */, "File_specification_cannot_end_in_a_recursive_directory_wildcard_Asterisk_Asterisk_Colon_0_5010", "File specification cannot end in a recursive directory wildcard ('**'): '{0}'."),
|
|
@@ -20119,8 +20122,7 @@ var Parser;
|
|
|
20119
20122
|
function parseJSDocFunctionType() {
|
|
20120
20123
|
const pos = getNodePos();
|
|
20121
20124
|
const hasJSDoc = hasPrecedingJSDocComment();
|
|
20122
|
-
if (
|
|
20123
|
-
nextToken();
|
|
20125
|
+
if (tryParse(nextTokenIsOpenParen)) {
|
|
20124
20126
|
const parameters = parseParameters(4 /* Type */ | 32 /* JSDoc */);
|
|
20125
20127
|
const type = parseReturnType(
|
|
20126
20128
|
59 /* ColonToken */,
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"name": "@typescript-deploys/pr-build",
|
|
3
3
|
"author": "Microsoft Corp.",
|
|
4
4
|
"homepage": "https://www.typescriptlang.org/",
|
|
5
|
-
"version": "5.4.0-pr-
|
|
5
|
+
"version": "5.4.0-pr-55924-28",
|
|
6
6
|
"license": "Apache-2.0",
|
|
7
7
|
"description": "TypeScript is a language for application scale JavaScript development",
|
|
8
8
|
"keywords": [
|
|
@@ -115,5 +115,5 @@
|
|
|
115
115
|
"node": "20.1.0",
|
|
116
116
|
"npm": "8.19.4"
|
|
117
117
|
},
|
|
118
|
-
"gitHead": "
|
|
118
|
+
"gitHead": "d11a6082070015d644600ca130bab2b0111bc55a"
|
|
119
119
|
}
|