@typescript-deploys/pr-build 5.4.0-pr-56429-7 → 5.4.0-pr-55924-19

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.
@@ -43,7 +43,7 @@ interface SuppressedError extends Error {
43
43
  suppressed: any;
44
44
  }
45
45
 
46
- interface SuppressedErrorConstructor extends ErrorConstructor {
46
+ interface SuppressedErrorConstructor {
47
47
  new (error: any, suppressed: any, message?: string): SuppressedError;
48
48
  (error: any, suppressed: any, message?: string): SuppressedError;
49
49
  readonly prototype: SuppressedError;
package/lib/tsc.js CHANGED
@@ -6791,6 +6791,8 @@ var Diagnostics = {
6791
6791
  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}'."),
6792
6792
  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}'?"),
6793
6793
  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'."),
6794
+ 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."),
6795
+ Values_of_0_1_are_not_sufficiently_known: diag(4126, 1 /* Error */, "Values_of_0_1_are_not_sufficiently_known_4126", "Values of '{0}.{1}' are not sufficiently known."),
6794
6796
  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."),
6795
6797
  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."),
6796
6798
  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}'."),
@@ -48588,7 +48590,7 @@ function createTypeChecker(host) {
48588
48590
  context.approximateLength += symbolName(propertySymbol).length + 1;
48589
48591
  if (propertySymbol.flags & 98304 /* Accessor */) {
48590
48592
  const writeType = getWriteTypeOfSymbol(propertySymbol);
48591
- if (propertyType !== writeType) {
48593
+ if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
48592
48594
  const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
48593
48595
  const getterSignature = getSignatureFromDeclaration(getterDeclaration);
48594
48596
  typeElements.push(
@@ -52610,7 +52612,7 @@ function createTypeChecker(host) {
52610
52612
  } else if (getter && noImplicitAny) {
52611
52613
  error(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
52612
52614
  }
52613
- type = errorType;
52615
+ type = anyType;
52614
52616
  }
52615
52617
  links.type = type;
52616
52618
  }
@@ -52628,7 +52630,7 @@ function createTypeChecker(host) {
52628
52630
  if (getAnnotatedAccessorTypeNode(setter)) {
52629
52631
  error(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
52630
52632
  }
52631
- writeType = errorType;
52633
+ writeType = anyType;
52632
52634
  }
52633
52635
  links.writeType = writeType || getTypeOfAccessors(symbol);
52634
52636
  }
@@ -52709,7 +52711,8 @@ function createTypeChecker(host) {
52709
52711
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
52710
52712
  links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
52711
52713
  if (!popTypeResolution()) {
52712
- return links.type = reportCircularityError(exportSymbol ?? symbol);
52714
+ reportCircularityError(exportSymbol ?? symbol);
52715
+ return links.type = errorType;
52713
52716
  }
52714
52717
  }
52715
52718
  return links.type;
@@ -52738,7 +52741,7 @@ function createTypeChecker(host) {
52738
52741
  error(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
52739
52742
  }
52740
52743
  }
52741
- return errorType;
52744
+ return anyType;
52742
52745
  }
52743
52746
  function getTypeOfSymbolWithDeferredType(symbol) {
52744
52747
  const links = getSymbolLinks(symbol);
@@ -55499,7 +55502,7 @@ function createTypeChecker(host) {
55499
55502
  }
55500
55503
  }
55501
55504
  }
55502
- type = errorType;
55505
+ type = anyType;
55503
55506
  }
55504
55507
  signature.resolvedReturnType = type;
55505
55508
  }
@@ -60154,12 +60157,12 @@ function createTypeChecker(host) {
60154
60157
  return !!(entry & 1 /* Succeeded */);
60155
60158
  }
60156
60159
  const targetEnumType = getTypeOfSymbol(targetSymbol);
60157
- for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
60158
- if (property.flags & 8 /* EnumMember */) {
60159
- const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
60160
+ for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
60161
+ if (sourceProperty.flags & 8 /* EnumMember */) {
60162
+ const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
60160
60163
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
60161
60164
  if (errorReporter) {
60162
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
60165
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
60163
60166
  getDeclaredTypeOfSymbol(targetSymbol),
60164
60167
  /*enclosingDeclaration*/
60165
60168
  void 0,
@@ -60171,6 +60174,22 @@ function createTypeChecker(host) {
60171
60174
  }
60172
60175
  return false;
60173
60176
  }
60177
+ const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
60178
+ const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
60179
+ if (sourceValue !== targetValue || sourceValue === void 0 || targetValue === void 0) {
60180
+ if (!errorReporter) {
60181
+ enumRelation.set(id, 2 /* Failed */);
60182
+ } else if (sourceValue !== targetValue && sourceValue !== void 0 && targetValue !== void 0) {
60183
+ const escapedSource = typeof sourceValue === "string" ? `"${escapeString(sourceValue)}"` : sourceValue;
60184
+ const escapedTarget = typeof targetValue === "string" ? `"${escapeString(targetValue)}"` : targetValue;
60185
+ 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);
60186
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
60187
+ } else {
60188
+ errorReporter(Diagnostics.Values_of_0_1_are_not_sufficiently_known, symbolName(targetSymbol), symbolName(targetProperty));
60189
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
60190
+ }
60191
+ return false;
60192
+ }
60174
60193
  }
60175
60194
  }
60176
60195
  enumRelation.set(id, 1 /* Succeeded */);
package/lib/tsserver.js CHANGED
@@ -10323,6 +10323,8 @@ var Diagnostics = {
10323
10323
  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}'."),
10324
10324
  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}'?"),
10325
10325
  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'."),
10326
+ 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."),
10327
+ Values_of_0_1_are_not_sufficiently_known: diag(4126, 1 /* Error */, "Values_of_0_1_are_not_sufficiently_known_4126", "Values of '{0}.{1}' are not sufficiently known."),
10326
10328
  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."),
10327
10329
  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."),
10328
10330
  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}'."),
@@ -53296,7 +53298,7 @@ function createTypeChecker(host) {
53296
53298
  context.approximateLength += symbolName(propertySymbol).length + 1;
53297
53299
  if (propertySymbol.flags & 98304 /* Accessor */) {
53298
53300
  const writeType = getWriteTypeOfSymbol(propertySymbol);
53299
- if (propertyType !== writeType) {
53301
+ if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
53300
53302
  const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
53301
53303
  const getterSignature = getSignatureFromDeclaration(getterDeclaration);
53302
53304
  typeElements.push(
@@ -57318,7 +57320,7 @@ function createTypeChecker(host) {
57318
57320
  } else if (getter && noImplicitAny) {
57319
57321
  error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
57320
57322
  }
57321
- type = errorType;
57323
+ type = anyType;
57322
57324
  }
57323
57325
  links.type = type;
57324
57326
  }
@@ -57336,7 +57338,7 @@ function createTypeChecker(host) {
57336
57338
  if (getAnnotatedAccessorTypeNode(setter)) {
57337
57339
  error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
57338
57340
  }
57339
- writeType = errorType;
57341
+ writeType = anyType;
57340
57342
  }
57341
57343
  links.writeType = writeType || getTypeOfAccessors(symbol);
57342
57344
  }
@@ -57417,7 +57419,8 @@ function createTypeChecker(host) {
57417
57419
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
57418
57420
  links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
57419
57421
  if (!popTypeResolution()) {
57420
- return links.type = reportCircularityError(exportSymbol ?? symbol);
57422
+ reportCircularityError(exportSymbol ?? symbol);
57423
+ return links.type = errorType;
57421
57424
  }
57422
57425
  }
57423
57426
  return links.type;
@@ -57446,7 +57449,7 @@ function createTypeChecker(host) {
57446
57449
  error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
57447
57450
  }
57448
57451
  }
57449
- return errorType;
57452
+ return anyType;
57450
57453
  }
57451
57454
  function getTypeOfSymbolWithDeferredType(symbol) {
57452
57455
  const links = getSymbolLinks(symbol);
@@ -60207,7 +60210,7 @@ function createTypeChecker(host) {
60207
60210
  }
60208
60211
  }
60209
60212
  }
60210
- type = errorType;
60213
+ type = anyType;
60211
60214
  }
60212
60215
  signature.resolvedReturnType = type;
60213
60216
  }
@@ -64862,12 +64865,12 @@ function createTypeChecker(host) {
64862
64865
  return !!(entry & 1 /* Succeeded */);
64863
64866
  }
64864
64867
  const targetEnumType = getTypeOfSymbol(targetSymbol);
64865
- for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
64866
- if (property.flags & 8 /* EnumMember */) {
64867
- const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
64868
+ for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
64869
+ if (sourceProperty.flags & 8 /* EnumMember */) {
64870
+ const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
64868
64871
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
64869
64872
  if (errorReporter) {
64870
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
64873
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
64871
64874
  getDeclaredTypeOfSymbol(targetSymbol),
64872
64875
  /*enclosingDeclaration*/
64873
64876
  void 0,
@@ -64879,6 +64882,22 @@ function createTypeChecker(host) {
64879
64882
  }
64880
64883
  return false;
64881
64884
  }
64885
+ const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
64886
+ const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
64887
+ if (sourceValue !== targetValue || sourceValue === void 0 || targetValue === void 0) {
64888
+ if (!errorReporter) {
64889
+ enumRelation.set(id, 2 /* Failed */);
64890
+ } else if (sourceValue !== targetValue && sourceValue !== void 0 && targetValue !== void 0) {
64891
+ const escapedSource = typeof sourceValue === "string" ? `"${escapeString(sourceValue)}"` : sourceValue;
64892
+ const escapedTarget = typeof targetValue === "string" ? `"${escapeString(targetValue)}"` : targetValue;
64893
+ 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);
64894
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
64895
+ } else {
64896
+ errorReporter(Diagnostics.Values_of_0_1_are_not_sufficiently_known, symbolName(targetSymbol), symbolName(targetProperty));
64897
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
64898
+ }
64899
+ return false;
64900
+ }
64882
64901
  }
64883
64902
  }
64884
64903
  enumRelation.set(id, 1 /* Succeeded */);
@@ -158923,6 +158942,9 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
158923
158942
  if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) {
158924
158943
  continue;
158925
158944
  }
158945
+ if (!isTypeOnlyLocation && isInJSFile(sourceFile) && symbolAppearsToBeTypeOnly(symbol)) {
158946
+ continue;
158947
+ }
158926
158948
  const { name, needsConvertPropertyAccess } = info;
158927
158949
  const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority;
158928
158950
  const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText;
@@ -159002,6 +159024,10 @@ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, con
159002
159024
  }
159003
159025
  return !!(allFlags & 111551 /* Value */);
159004
159026
  }
159027
+ function symbolAppearsToBeTypeOnly(symbol) {
159028
+ var _a;
159029
+ return !(symbol.flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(symbol.flags & 788968 /* Type */));
159030
+ }
159005
159031
  }
159006
159032
  function getLabelCompletionAtPosition(node) {
159007
159033
  const entries = getLabelStatementCompletions(node);
package/lib/typescript.js CHANGED
@@ -8103,6 +8103,8 @@ ${lanes.join("\n")}
8103
8103
  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}'."),
8104
8104
  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}'?"),
8105
8105
  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'."),
8106
+ 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."),
8107
+ Values_of_0_1_are_not_sufficiently_known: diag(4126, 1 /* Error */, "Values_of_0_1_are_not_sufficiently_known_4126", "Values of '{0}.{1}' are not sufficiently known."),
8106
8108
  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."),
8107
8109
  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."),
8108
8110
  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}'."),
@@ -51061,7 +51063,7 @@ ${lanes.join("\n")}
51061
51063
  context.approximateLength += symbolName(propertySymbol).length + 1;
51062
51064
  if (propertySymbol.flags & 98304 /* Accessor */) {
51063
51065
  const writeType = getWriteTypeOfSymbol(propertySymbol);
51064
- if (propertyType !== writeType) {
51066
+ if (propertyType !== writeType && !isErrorType(propertyType) && !isErrorType(writeType)) {
51065
51067
  const getterDeclaration = getDeclarationOfKind(propertySymbol, 177 /* GetAccessor */);
51066
51068
  const getterSignature = getSignatureFromDeclaration(getterDeclaration);
51067
51069
  typeElements.push(
@@ -55083,7 +55085,7 @@ ${lanes.join("\n")}
55083
55085
  } else if (getter && noImplicitAny) {
55084
55086
  error2(getter, Diagnostics._0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions, symbolToString(symbol));
55085
55087
  }
55086
- type = errorType;
55088
+ type = anyType;
55087
55089
  }
55088
55090
  links.type = type;
55089
55091
  }
@@ -55101,7 +55103,7 @@ ${lanes.join("\n")}
55101
55103
  if (getAnnotatedAccessorTypeNode(setter)) {
55102
55104
  error2(setter, Diagnostics._0_is_referenced_directly_or_indirectly_in_its_own_type_annotation, symbolToString(symbol));
55103
55105
  }
55104
- writeType = errorType;
55106
+ writeType = anyType;
55105
55107
  }
55106
55108
  links.writeType = writeType || getTypeOfAccessors(symbol);
55107
55109
  }
@@ -55182,7 +55184,8 @@ ${lanes.join("\n")}
55182
55184
  const declaredType = firstDefined(exportSymbol == null ? void 0 : exportSymbol.declarations, (d) => isExportAssignment(d) ? tryGetTypeFromEffectiveTypeNode(d) : void 0);
55183
55185
  links.type = (exportSymbol == null ? void 0 : exportSymbol.declarations) && isDuplicatedCommonJSExport(exportSymbol.declarations) && symbol.declarations.length ? getFlowTypeFromCommonJSExport(exportSymbol) : isDuplicatedCommonJSExport(symbol.declarations) ? autoType : declaredType ? declaredType : getSymbolFlags(targetSymbol) & 111551 /* Value */ ? getTypeOfSymbol(targetSymbol) : errorType;
55184
55186
  if (!popTypeResolution()) {
55185
- return links.type = reportCircularityError(exportSymbol ?? symbol);
55187
+ reportCircularityError(exportSymbol ?? symbol);
55188
+ return links.type = errorType;
55186
55189
  }
55187
55190
  }
55188
55191
  return links.type;
@@ -55211,7 +55214,7 @@ ${lanes.join("\n")}
55211
55214
  error2(node, Diagnostics.Circular_definition_of_import_alias_0, symbolToString(symbol));
55212
55215
  }
55213
55216
  }
55214
- return errorType;
55217
+ return anyType;
55215
55218
  }
55216
55219
  function getTypeOfSymbolWithDeferredType(symbol) {
55217
55220
  const links = getSymbolLinks(symbol);
@@ -57972,7 +57975,7 @@ ${lanes.join("\n")}
57972
57975
  }
57973
57976
  }
57974
57977
  }
57975
- type = errorType;
57978
+ type = anyType;
57976
57979
  }
57977
57980
  signature.resolvedReturnType = type;
57978
57981
  }
@@ -62627,12 +62630,12 @@ ${lanes.join("\n")}
62627
62630
  return !!(entry & 1 /* Succeeded */);
62628
62631
  }
62629
62632
  const targetEnumType = getTypeOfSymbol(targetSymbol);
62630
- for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
62631
- if (property.flags & 8 /* EnumMember */) {
62632
- const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
62633
+ for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
62634
+ if (sourceProperty.flags & 8 /* EnumMember */) {
62635
+ const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
62633
62636
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
62634
62637
  if (errorReporter) {
62635
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
62638
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
62636
62639
  getDeclaredTypeOfSymbol(targetSymbol),
62637
62640
  /*enclosingDeclaration*/
62638
62641
  void 0,
@@ -62644,6 +62647,22 @@ ${lanes.join("\n")}
62644
62647
  }
62645
62648
  return false;
62646
62649
  }
62650
+ const sourceValue = getEnumMemberValue(getDeclarationOfKind(sourceProperty, 306 /* EnumMember */));
62651
+ const targetValue = getEnumMemberValue(getDeclarationOfKind(targetProperty, 306 /* EnumMember */));
62652
+ if (sourceValue !== targetValue || sourceValue === void 0 || targetValue === void 0) {
62653
+ if (!errorReporter) {
62654
+ enumRelation.set(id, 2 /* Failed */);
62655
+ } else if (sourceValue !== targetValue && sourceValue !== void 0 && targetValue !== void 0) {
62656
+ const escapedSource = typeof sourceValue === "string" ? `"${escapeString(sourceValue)}"` : sourceValue;
62657
+ const escapedTarget = typeof targetValue === "string" ? `"${escapeString(targetValue)}"` : targetValue;
62658
+ 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);
62659
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
62660
+ } else {
62661
+ errorReporter(Diagnostics.Values_of_0_1_are_not_sufficiently_known, symbolName(targetSymbol), symbolName(targetProperty));
62662
+ enumRelation.set(id, 2 /* Failed */ | 4 /* Reported */);
62663
+ }
62664
+ return false;
62665
+ }
62647
62666
  }
62648
62667
  }
62649
62668
  enumRelation.set(id, 1 /* Succeeded */);
@@ -158146,6 +158165,9 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158146
158165
  if (!info || uniques.get(info.name) && (!origin || !originIsObjectLiteralMethod(origin)) || kind === 1 /* Global */ && symbolToSortTextMap && !shouldIncludeSymbol(symbol, symbolToSortTextMap)) {
158147
158166
  continue;
158148
158167
  }
158168
+ if (!isTypeOnlyLocation && isInJSFile(sourceFile) && symbolAppearsToBeTypeOnly(symbol)) {
158169
+ continue;
158170
+ }
158149
158171
  const { name, needsConvertPropertyAccess } = info;
158150
158172
  const originalSortText = (symbolToSortTextMap == null ? void 0 : symbolToSortTextMap[getSymbolId(symbol)]) ?? SortText.LocationPriority;
158151
158173
  const sortText = isDeprecated(symbol, typeChecker) ? SortText.Deprecated(originalSortText) : originalSortText;
@@ -158225,6 +158247,10 @@ ${newComment.split("\n").map((c) => ` * ${c}`).join("\n")}
158225
158247
  }
158226
158248
  return !!(allFlags & 111551 /* Value */);
158227
158249
  }
158250
+ function symbolAppearsToBeTypeOnly(symbol) {
158251
+ var _a;
158252
+ return !(symbol.flags & 111551 /* Value */) && (!isInJSFile((_a = symbol.declarations) == null ? void 0 : _a[0]) || !!(symbol.flags & 788968 /* Type */));
158253
+ }
158228
158254
  }
158229
158255
  function getLabelCompletionAtPosition(node) {
158230
158256
  const entries = getLabelStatementCompletions(node);
@@ -6168,6 +6168,8 @@ var Diagnostics = {
6168
6168
  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}'."),
6169
6169
  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}'?"),
6170
6170
  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'."),
6171
+ 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."),
6172
+ Values_of_0_1_are_not_sufficiently_known: diag(4126, 1 /* Error */, "Values_of_0_1_are_not_sufficiently_known_4126", "Values of '{0}.{1}' are not sufficiently known."),
6171
6173
  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."),
6172
6174
  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."),
6173
6175
  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}'."),
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-56429-7",
5
+ "version": "5.4.0-pr-55924-19",
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": "1f095db76098959d2ad1e8beef365f4e5b2a7b9a"
118
+ "gitHead": "36d8abbd73baf59639b0f1ee32c9295260063495"
119
119
  }