@typescript-deploys/pr-build 5.4.0-pr-55924-19 → 5.4.0-pr-56434-11

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 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.20231116`;
21
+ var version = `${versionMajorMinor}.0-insiders.20231117`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -3678,7 +3678,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
3678
3678
  TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive";
3679
3679
  TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
3680
3680
  TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
3681
- TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType";
3681
+ TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
3682
3682
  TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable";
3683
3683
  TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
3684
3684
  TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
@@ -6791,8 +6791,6 @@ 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."),
6796
6794
  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."),
6797
6795
  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."),
6798
6796
  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}'."),
@@ -15989,7 +15987,7 @@ function getClassLikeDeclarationOfSymbol(symbol) {
15989
15987
  return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);
15990
15988
  }
15991
15989
  function getObjectFlags(type) {
15992
- return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0;
15990
+ return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0;
15993
15991
  }
15994
15992
  function isUMDExportSymbol(symbol) {
15995
15993
  return !!symbol && !!symbol.declarations && !!symbol.declarations[0] && isNamespaceExportDeclaration(symbol.declarations[0]);
@@ -57002,7 +57000,7 @@ function createTypeChecker(host) {
57002
57000
  }
57003
57001
  }
57004
57002
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
57005
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types)));
57003
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
57006
57004
  if (templates.length) {
57007
57005
  let i = types.length;
57008
57006
  while (i > 0) {
@@ -57402,19 +57400,14 @@ function createTypeChecker(host) {
57402
57400
  function getConstituentCountOfTypes(types) {
57403
57401
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
57404
57402
  }
57405
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
57406
- if (types.length !== 2) {
57407
- return false;
57408
- }
57409
- const [t1, t2] = types;
57410
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
57411
- }
57412
57403
  function getTypeFromIntersectionTypeNode(node) {
57413
57404
  const links = getNodeLinks(node);
57414
57405
  if (!links.resolvedType) {
57415
57406
  const aliasSymbol = getAliasSymbolForTypeNode(node);
57416
57407
  const types = map(node.types, getTypeFromTypeNode);
57417
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
57408
+ const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
57409
+ const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;
57410
+ const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));
57418
57411
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
57419
57412
  }
57420
57413
  return links.resolvedType;
@@ -57626,11 +57619,6 @@ function createTypeChecker(host) {
57626
57619
  }
57627
57620
  function createTemplateLiteralType(texts, types) {
57628
57621
  const type = createType(134217728 /* TemplateLiteral */);
57629
- type.objectFlags = getPropagatingFlagsOfTypes(
57630
- types,
57631
- /*excludeKinds*/
57632
- 98304 /* Nullable */
57633
- );
57634
57622
  type.texts = texts;
57635
57623
  type.types = types;
57636
57624
  return type;
@@ -57925,7 +57913,15 @@ function createTypeChecker(host) {
57925
57913
  }
57926
57914
  function isPatternLiteralPlaceholderType(type) {
57927
57915
  if (type.flags & 2097152 /* Intersection */) {
57928
- return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
57916
+ let seenPlaceholder = false;
57917
+ for (const t of type.types) {
57918
+ if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
57919
+ seenPlaceholder = true;
57920
+ } else if (!(t.flags & 524288 /* Object */)) {
57921
+ return false;
57922
+ }
57923
+ }
57924
+ return seenPlaceholder;
57929
57925
  }
57930
57926
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
57931
57927
  }
@@ -57942,7 +57938,7 @@ function createTypeChecker(host) {
57942
57938
  return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */);
57943
57939
  }
57944
57940
  function getGenericObjectFlags(type) {
57945
- if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) {
57941
+ if (type.flags & 3145728 /* UnionOrIntersection */) {
57946
57942
  if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {
57947
57943
  type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);
57948
57944
  }
@@ -57954,7 +57950,7 @@ function createTypeChecker(host) {
57954
57950
  }
57955
57951
  return type.objectFlags & 12582912 /* IsGenericType */;
57956
57952
  }
57957
- return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
57953
+ return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
57958
57954
  }
57959
57955
  function getSimplifiedType(type, writing) {
57960
57956
  return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
@@ -58980,7 +58976,7 @@ function createTypeChecker(host) {
58980
58976
  result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
58981
58977
  target.instantiations.set(id, result);
58982
58978
  const resultObjectFlags = getObjectFlags(result);
58983
- if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
58979
+ if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
58984
58980
  const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
58985
58981
  if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) {
58986
58982
  if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) {
@@ -60157,12 +60153,12 @@ function createTypeChecker(host) {
60157
60153
  return !!(entry & 1 /* Succeeded */);
60158
60154
  }
60159
60155
  const targetEnumType = getTypeOfSymbol(targetSymbol);
60160
- for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
60161
- if (sourceProperty.flags & 8 /* EnumMember */) {
60162
- const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
60156
+ for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
60157
+ if (property.flags & 8 /* EnumMember */) {
60158
+ const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
60163
60159
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
60164
60160
  if (errorReporter) {
60165
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
60161
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
60166
60162
  getDeclaredTypeOfSymbol(targetSymbol),
60167
60163
  /*enclosingDeclaration*/
60168
60164
  void 0,
@@ -60174,22 +60170,6 @@ function createTypeChecker(host) {
60174
60170
  }
60175
60171
  return false;
60176
60172
  }
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
- }
60193
60173
  }
60194
60174
  }
60195
60175
  enumRelation.set(id, 1 /* Succeeded */);
@@ -63712,8 +63692,8 @@ function createTypeChecker(host) {
63712
63692
  if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) {
63713
63693
  return !!(objectFlags & 1048576 /* CouldContainTypeVariables */);
63714
63694
  }
63715
- const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
63716
- if (type.flags & 138117121 /* ObjectFlagsType */) {
63695
+ const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
63696
+ if (type.flags & 3899393 /* ObjectFlagsType */) {
63717
63697
  type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0);
63718
63698
  }
63719
63699
  return result;
package/lib/tsserver.js CHANGED
@@ -2330,7 +2330,7 @@ module.exports = __toCommonJS(server_exports);
2330
2330
 
2331
2331
  // src/compiler/corePublic.ts
2332
2332
  var versionMajorMinor = "5.4";
2333
- var version = `${versionMajorMinor}.0-insiders.20231116`;
2333
+ var version = `${versionMajorMinor}.0-insiders.20231117`;
2334
2334
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2335
2335
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2336
2336
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -6674,7 +6674,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
6674
6674
  TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive";
6675
6675
  TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
6676
6676
  TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
6677
- TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType";
6677
+ TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
6678
6678
  TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable";
6679
6679
  TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
6680
6680
  TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
@@ -10323,8 +10323,6 @@ 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."),
10328
10326
  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."),
10329
10327
  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."),
10330
10328
  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}'."),
@@ -20058,7 +20056,7 @@ function getClassLikeDeclarationOfSymbol(symbol) {
20058
20056
  return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);
20059
20057
  }
20060
20058
  function getObjectFlags(type) {
20061
- return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0;
20059
+ return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0;
20062
20060
  }
20063
20061
  function forSomeAncestorDirectory(directory, callback) {
20064
20062
  return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0);
@@ -61710,7 +61708,7 @@ function createTypeChecker(host) {
61710
61708
  }
61711
61709
  }
61712
61710
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
61713
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types)));
61711
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
61714
61712
  if (templates.length) {
61715
61713
  let i = types.length;
61716
61714
  while (i > 0) {
@@ -62110,19 +62108,14 @@ function createTypeChecker(host) {
62110
62108
  function getConstituentCountOfTypes(types) {
62111
62109
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
62112
62110
  }
62113
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
62114
- if (types.length !== 2) {
62115
- return false;
62116
- }
62117
- const [t1, t2] = types;
62118
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
62119
- }
62120
62111
  function getTypeFromIntersectionTypeNode(node) {
62121
62112
  const links = getNodeLinks(node);
62122
62113
  if (!links.resolvedType) {
62123
62114
  const aliasSymbol = getAliasSymbolForTypeNode(node);
62124
62115
  const types = map(node.types, getTypeFromTypeNode);
62125
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
62116
+ const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
62117
+ const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;
62118
+ const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));
62126
62119
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
62127
62120
  }
62128
62121
  return links.resolvedType;
@@ -62334,11 +62327,6 @@ function createTypeChecker(host) {
62334
62327
  }
62335
62328
  function createTemplateLiteralType(texts, types) {
62336
62329
  const type = createType(134217728 /* TemplateLiteral */);
62337
- type.objectFlags = getPropagatingFlagsOfTypes(
62338
- types,
62339
- /*excludeKinds*/
62340
- 98304 /* Nullable */
62341
- );
62342
62330
  type.texts = texts;
62343
62331
  type.types = types;
62344
62332
  return type;
@@ -62633,7 +62621,15 @@ function createTypeChecker(host) {
62633
62621
  }
62634
62622
  function isPatternLiteralPlaceholderType(type) {
62635
62623
  if (type.flags & 2097152 /* Intersection */) {
62636
- return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
62624
+ let seenPlaceholder = false;
62625
+ for (const t of type.types) {
62626
+ if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
62627
+ seenPlaceholder = true;
62628
+ } else if (!(t.flags & 524288 /* Object */)) {
62629
+ return false;
62630
+ }
62631
+ }
62632
+ return seenPlaceholder;
62637
62633
  }
62638
62634
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
62639
62635
  }
@@ -62650,7 +62646,7 @@ function createTypeChecker(host) {
62650
62646
  return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */);
62651
62647
  }
62652
62648
  function getGenericObjectFlags(type) {
62653
- if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) {
62649
+ if (type.flags & 3145728 /* UnionOrIntersection */) {
62654
62650
  if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {
62655
62651
  type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);
62656
62652
  }
@@ -62662,7 +62658,7 @@ function createTypeChecker(host) {
62662
62658
  }
62663
62659
  return type.objectFlags & 12582912 /* IsGenericType */;
62664
62660
  }
62665
- return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
62661
+ return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
62666
62662
  }
62667
62663
  function getSimplifiedType(type, writing) {
62668
62664
  return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
@@ -63688,7 +63684,7 @@ function createTypeChecker(host) {
63688
63684
  result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
63689
63685
  target.instantiations.set(id, result);
63690
63686
  const resultObjectFlags = getObjectFlags(result);
63691
- if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
63687
+ if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
63692
63688
  const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
63693
63689
  if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) {
63694
63690
  if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) {
@@ -64865,12 +64861,12 @@ function createTypeChecker(host) {
64865
64861
  return !!(entry & 1 /* Succeeded */);
64866
64862
  }
64867
64863
  const targetEnumType = getTypeOfSymbol(targetSymbol);
64868
- for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
64869
- if (sourceProperty.flags & 8 /* EnumMember */) {
64870
- const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
64864
+ for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
64865
+ if (property.flags & 8 /* EnumMember */) {
64866
+ const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
64871
64867
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
64872
64868
  if (errorReporter) {
64873
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
64869
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
64874
64870
  getDeclaredTypeOfSymbol(targetSymbol),
64875
64871
  /*enclosingDeclaration*/
64876
64872
  void 0,
@@ -64882,22 +64878,6 @@ function createTypeChecker(host) {
64882
64878
  }
64883
64879
  return false;
64884
64880
  }
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
- }
64901
64881
  }
64902
64882
  }
64903
64883
  enumRelation.set(id, 1 /* Succeeded */);
@@ -68420,8 +68400,8 @@ function createTypeChecker(host) {
68420
68400
  if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) {
68421
68401
  return !!(objectFlags & 1048576 /* CouldContainTypeVariables */);
68422
68402
  }
68423
- const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
68424
- if (type.flags & 138117121 /* ObjectFlagsType */) {
68403
+ const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
68404
+ if (type.flags & 3899393 /* ObjectFlagsType */) {
68425
68405
  type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0);
68426
68406
  }
68427
68407
  return result;
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.20231116`;
38
+ version = `${versionMajorMinor}.0-insiders.20231117`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -4437,7 +4437,7 @@ ${lanes.join("\n")}
4437
4437
  TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive";
4438
4438
  TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
4439
4439
  TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
4440
- TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType";
4440
+ TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
4441
4441
  TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable";
4442
4442
  TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
4443
4443
  TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
@@ -8103,8 +8103,6 @@ ${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."),
8108
8106
  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."),
8109
8107
  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."),
8110
8108
  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}'."),
@@ -17357,7 +17355,7 @@ ${lanes.join("\n")}
17357
17355
  return (_a = symbol.declarations) == null ? void 0 : _a.find(isClassLike);
17358
17356
  }
17359
17357
  function getObjectFlags(type) {
17360
- return type.flags & 138117121 /* ObjectFlagsType */ ? type.objectFlags : 0;
17358
+ return type.flags & 3899393 /* ObjectFlagsType */ ? type.objectFlags : 0;
17361
17359
  }
17362
17360
  function forSomeAncestorDirectory(directory, callback) {
17363
17361
  return !!forEachAncestorDirectory(directory, (d) => callback(d) ? true : void 0);
@@ -59475,7 +59473,7 @@ ${lanes.join("\n")}
59475
59473
  }
59476
59474
  }
59477
59475
  function removeStringLiteralsMatchedByTemplateLiterals(types) {
59478
- const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t) && t.types.every((t2) => !(t2.flags & 2097152 /* Intersection */) || !areIntersectedTypesAvoidingPrimitiveReduction(t2.types)));
59476
+ const templates = filter(types, (t) => !!(t.flags & 134217728 /* TemplateLiteral */) && isPatternLiteralType(t));
59479
59477
  if (templates.length) {
59480
59478
  let i = types.length;
59481
59479
  while (i > 0) {
@@ -59875,19 +59873,14 @@ ${lanes.join("\n")}
59875
59873
  function getConstituentCountOfTypes(types) {
59876
59874
  return reduceLeft(types, (n, t) => n + getConstituentCount(t), 0);
59877
59875
  }
59878
- function areIntersectedTypesAvoidingPrimitiveReduction(types, primitiveFlags = 4 /* String */ | 8 /* Number */ | 64 /* BigInt */) {
59879
- if (types.length !== 2) {
59880
- return false;
59881
- }
59882
- const [t1, t2] = types;
59883
- return !!(t1.flags & primitiveFlags) && t2 === emptyTypeLiteralType || !!(t2.flags & primitiveFlags) && t1 === emptyTypeLiteralType;
59884
- }
59885
59876
  function getTypeFromIntersectionTypeNode(node) {
59886
59877
  const links = getNodeLinks(node);
59887
59878
  if (!links.resolvedType) {
59888
59879
  const aliasSymbol = getAliasSymbolForTypeNode(node);
59889
59880
  const types = map(node.types, getTypeFromTypeNode);
59890
- const noSupertypeReduction = areIntersectedTypesAvoidingPrimitiveReduction(types);
59881
+ const emptyIndex = types.length === 2 ? types.indexOf(emptyTypeLiteralType) : -1;
59882
+ const t = emptyIndex >= 0 ? types[1 - emptyIndex] : unknownType;
59883
+ const noSupertypeReduction = !!(t.flags & (4 /* String */ | 8 /* Number */ | 64 /* BigInt */) || t.flags & 134217728 /* TemplateLiteral */ && isPatternLiteralType(t));
59891
59884
  links.resolvedType = getIntersectionType(types, aliasSymbol, getTypeArgumentsForAliasSymbol(aliasSymbol), noSupertypeReduction);
59892
59885
  }
59893
59886
  return links.resolvedType;
@@ -60099,11 +60092,6 @@ ${lanes.join("\n")}
60099
60092
  }
60100
60093
  function createTemplateLiteralType(texts, types) {
60101
60094
  const type = createType(134217728 /* TemplateLiteral */);
60102
- type.objectFlags = getPropagatingFlagsOfTypes(
60103
- types,
60104
- /*excludeKinds*/
60105
- 98304 /* Nullable */
60106
- );
60107
60095
  type.texts = texts;
60108
60096
  type.types = types;
60109
60097
  return type;
@@ -60398,7 +60386,15 @@ ${lanes.join("\n")}
60398
60386
  }
60399
60387
  function isPatternLiteralPlaceholderType(type) {
60400
60388
  if (type.flags & 2097152 /* Intersection */) {
60401
- return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
60389
+ let seenPlaceholder = false;
60390
+ for (const t of type.types) {
60391
+ if (t.flags & (2944 /* Literal */ | 98304 /* Nullable */) || isPatternLiteralPlaceholderType(t)) {
60392
+ seenPlaceholder = true;
60393
+ } else if (!(t.flags & 524288 /* Object */)) {
60394
+ return false;
60395
+ }
60396
+ }
60397
+ return seenPlaceholder;
60402
60398
  }
60403
60399
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
60404
60400
  }
@@ -60415,7 +60411,7 @@ ${lanes.join("\n")}
60415
60411
  return !!(getGenericObjectFlags(type) & 8388608 /* IsGenericIndexType */);
60416
60412
  }
60417
60413
  function getGenericObjectFlags(type) {
60418
- if (type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */)) {
60414
+ if (type.flags & 3145728 /* UnionOrIntersection */) {
60419
60415
  if (!(type.objectFlags & 2097152 /* IsGenericTypeComputed */)) {
60420
60416
  type.objectFlags |= 2097152 /* IsGenericTypeComputed */ | reduceLeft(type.types, (flags, t) => flags | getGenericObjectFlags(t), 0);
60421
60417
  }
@@ -60427,7 +60423,7 @@ ${lanes.join("\n")}
60427
60423
  }
60428
60424
  return type.objectFlags & 12582912 /* IsGenericType */;
60429
60425
  }
60430
- return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
60426
+ return (type.flags & 58982400 /* InstantiableNonPrimitive */ || isGenericMappedType(type) || isGenericTupleType(type) ? 4194304 /* IsGenericObjectType */ : 0) | (type.flags & (58982400 /* InstantiableNonPrimitive */ | 4194304 /* Index */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) && !isPatternLiteralType(type) ? 8388608 /* IsGenericIndexType */ : 0);
60431
60427
  }
60432
60428
  function getSimplifiedType(type, writing) {
60433
60429
  return type.flags & 8388608 /* IndexedAccess */ ? getSimplifiedIndexedAccessType(type, writing) : type.flags & 16777216 /* Conditional */ ? getSimplifiedConditionalType(type, writing) : type;
@@ -61453,7 +61449,7 @@ ${lanes.join("\n")}
61453
61449
  result = target.objectFlags & 4 /* Reference */ ? createDeferredTypeReference(type.target, type.node, newMapper, newAliasSymbol, newAliasTypeArguments) : target.objectFlags & 32 /* Mapped */ ? instantiateMappedType(target, newMapper, newAliasSymbol, newAliasTypeArguments) : instantiateAnonymousType(target, newMapper, newAliasSymbol, newAliasTypeArguments);
61454
61450
  target.instantiations.set(id, result);
61455
61451
  const resultObjectFlags = getObjectFlags(result);
61456
- if (result.flags & 138117121 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
61452
+ if (result.flags & 3899393 /* ObjectFlagsType */ && !(resultObjectFlags & 524288 /* CouldContainTypeVariablesComputed */)) {
61457
61453
  const resultCouldContainTypeVariables = some(typeArguments, couldContainTypeVariables);
61458
61454
  if (!(getObjectFlags(result) & 524288 /* CouldContainTypeVariablesComputed */)) {
61459
61455
  if (resultObjectFlags & (32 /* Mapped */ | 16 /* Anonymous */ | 4 /* Reference */)) {
@@ -62630,12 +62626,12 @@ ${lanes.join("\n")}
62630
62626
  return !!(entry & 1 /* Succeeded */);
62631
62627
  }
62632
62628
  const targetEnumType = getTypeOfSymbol(targetSymbol);
62633
- for (const sourceProperty of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
62634
- if (sourceProperty.flags & 8 /* EnumMember */) {
62635
- const targetProperty = getPropertyOfType(targetEnumType, sourceProperty.escapedName);
62629
+ for (const property of getPropertiesOfType(getTypeOfSymbol(sourceSymbol))) {
62630
+ if (property.flags & 8 /* EnumMember */) {
62631
+ const targetProperty = getPropertyOfType(targetEnumType, property.escapedName);
62636
62632
  if (!targetProperty || !(targetProperty.flags & 8 /* EnumMember */)) {
62637
62633
  if (errorReporter) {
62638
- errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(sourceProperty), typeToString(
62634
+ errorReporter(Diagnostics.Property_0_is_missing_in_type_1, symbolName(property), typeToString(
62639
62635
  getDeclaredTypeOfSymbol(targetSymbol),
62640
62636
  /*enclosingDeclaration*/
62641
62637
  void 0,
@@ -62647,22 +62643,6 @@ ${lanes.join("\n")}
62647
62643
  }
62648
62644
  return false;
62649
62645
  }
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
- }
62666
62646
  }
62667
62647
  }
62668
62648
  enumRelation.set(id, 1 /* Succeeded */);
@@ -66185,8 +66165,8 @@ ${lanes.join("\n")}
66185
66165
  if (objectFlags & 524288 /* CouldContainTypeVariablesComputed */) {
66186
66166
  return !!(objectFlags & 1048576 /* CouldContainTypeVariables */);
66187
66167
  }
66188
- const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & (3145728 /* UnionOrIntersection */ | 134217728 /* TemplateLiteral */) && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
66189
- if (type.flags & 138117121 /* ObjectFlagsType */) {
66168
+ const result = !!(type.flags & 465829888 /* Instantiable */ || type.flags & 524288 /* Object */ && !isNonGenericTopLevelType(type) && (objectFlags & 4 /* Reference */ && (type.node || some(getTypeArguments(type), couldContainTypeVariables)) || objectFlags & 16 /* Anonymous */ && type.symbol && type.symbol.flags & (16 /* Function */ | 8192 /* Method */ | 32 /* Class */ | 2048 /* TypeLiteral */ | 4096 /* ObjectLiteral */) && type.symbol.declarations || objectFlags & (32 /* Mapped */ | 1024 /* ReverseMapped */ | 4194304 /* ObjectRestType */ | 8388608 /* InstantiationExpressionType */)) || type.flags & 3145728 /* UnionOrIntersection */ && !(type.flags & 1024 /* EnumLiteral */) && !isNonGenericTopLevelType(type) && some(type.types, couldContainTypeVariables));
66169
+ if (type.flags & 3899393 /* ObjectFlagsType */) {
66190
66170
  type.objectFlags |= 524288 /* CouldContainTypeVariablesComputed */ | (result ? 1048576 /* CouldContainTypeVariables */ : 0);
66191
66171
  }
66192
66172
  return result;
@@ -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.20231116`;
57
+ var version = `${versionMajorMinor}.0-insiders.20231117`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -3112,7 +3112,7 @@ var TypeFlags = /* @__PURE__ */ ((TypeFlags2) => {
3112
3112
  TypeFlags2[TypeFlags2["InstantiablePrimitive"] = 406847488] = "InstantiablePrimitive";
3113
3113
  TypeFlags2[TypeFlags2["Instantiable"] = 465829888] = "Instantiable";
3114
3114
  TypeFlags2[TypeFlags2["StructuredOrInstantiable"] = 469499904] = "StructuredOrInstantiable";
3115
- TypeFlags2[TypeFlags2["ObjectFlagsType"] = 138117121] = "ObjectFlagsType";
3115
+ TypeFlags2[TypeFlags2["ObjectFlagsType"] = 3899393] = "ObjectFlagsType";
3116
3116
  TypeFlags2[TypeFlags2["Simplifiable"] = 25165824] = "Simplifiable";
3117
3117
  TypeFlags2[TypeFlags2["Singleton"] = 67358815] = "Singleton";
3118
3118
  TypeFlags2[TypeFlags2["Narrowable"] = 536624127] = "Narrowable";
@@ -6168,8 +6168,6 @@ 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."),
6173
6171
  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."),
6174
6172
  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."),
6175
6173
  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-55924-19",
5
+ "version": "5.4.0-pr-56434-11",
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": "36d8abbd73baf59639b0f1ee32c9295260063495"
118
+ "gitHead": "15f9713a24b3e7e5254f4e5eac443fea87ab042c"
119
119
  }