typescript 5.3.0-dev.20231026 → 5.3.0-dev.20231027

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.3";
21
- var version = `${versionMajorMinor}.0-dev.20231026`;
21
+ var version = `${versionMajorMinor}.0-dev.20231027`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6644,7 +6644,7 @@ var Diagnostics = {
6644
6644
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6645
6645
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
6646
6646
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
6647
- An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
6647
+ An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),
6648
6648
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
6649
6649
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
6650
6650
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -6665,6 +6665,8 @@ var Diagnostics = {
6665
6665
  The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
6666
6666
  An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
6667
6667
  Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
6668
+ A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
6669
+ A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
6668
6670
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6669
6671
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6670
6672
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -45371,8 +45373,17 @@ function createTypeChecker(host) {
45371
45373
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
45372
45374
  if (meaning & 111551 /* Value */) {
45373
45375
  if (isPrimitiveTypeName(name)) {
45374
- if (isExtendedByInterface(errorLocation)) {
45375
- error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
45376
+ const grandparent = errorLocation.parent.parent;
45377
+ if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {
45378
+ const heritageKind = grandparent.token;
45379
+ const containerKind = grandparent.parent.kind;
45380
+ if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
45381
+ error(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));
45382
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
45383
+ error(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));
45384
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) {
45385
+ error(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
45386
+ }
45376
45387
  } else {
45377
45388
  error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
45378
45389
  }
@@ -45404,16 +45415,6 @@ function createTypeChecker(host) {
45404
45415
  }
45405
45416
  return false;
45406
45417
  }
45407
- function isExtendedByInterface(node) {
45408
- const grandparent = node.parent.parent;
45409
- const parentOfGrandparent = grandparent.parent;
45410
- if (grandparent && parentOfGrandparent) {
45411
- const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */;
45412
- const isInterface = isInterfaceDeclaration(parentOfGrandparent);
45413
- return isExtending && isInterface;
45414
- }
45415
- return false;
45416
- }
45417
45418
  function maybeMappedType(node, symbol) {
45418
45419
  const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit");
45419
45420
  if (container && container.members.length === 1) {
@@ -57857,7 +57858,7 @@ function createTypeChecker(host) {
57857
57858
  }
57858
57859
  function isPatternLiteralPlaceholderType(type) {
57859
57860
  if (type.flags & 2097152 /* Intersection */) {
57860
- return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t));
57861
+ return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
57861
57862
  }
57862
57863
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
57863
57864
  }
@@ -67615,7 +67616,24 @@ function createTypeChecker(host) {
67615
67616
  }
67616
67617
  const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
67617
67618
  if (signature && !isResolvingReturnTypeOfSignature(signature)) {
67618
- return getReturnTypeOfSignature(signature);
67619
+ const returnType2 = getReturnTypeOfSignature(signature);
67620
+ const functionFlags = getFunctionFlags(functionDecl);
67621
+ if (functionFlags & 1 /* Generator */) {
67622
+ return filterType(returnType2, (t) => {
67623
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType(
67624
+ t,
67625
+ functionFlags,
67626
+ /*errorNode*/
67627
+ void 0
67628
+ );
67629
+ });
67630
+ }
67631
+ if (functionFlags & 2 /* Async */) {
67632
+ return filterType(returnType2, (t) => {
67633
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t);
67634
+ });
67635
+ }
67636
+ return returnType2;
67619
67637
  }
67620
67638
  const iife = getImmediatelyInvokedFunctionExpression(functionDecl);
67621
67639
  if (iife) {
@@ -74816,7 +74834,15 @@ function createTypeChecker(host) {
74816
74834
  checkExternalEmitHelpers(node, 256 /* Values */);
74817
74835
  }
74818
74836
  }
74819
- const returnType = getReturnTypeFromAnnotation(func);
74837
+ let returnType = getReturnTypeFromAnnotation(func);
74838
+ if (returnType && returnType.flags & 1048576 /* Union */) {
74839
+ returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType(
74840
+ t,
74841
+ functionFlags,
74842
+ /*errorNode*/
74843
+ void 0
74844
+ ));
74845
+ }
74820
74846
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
74821
74847
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
74822
74848
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
@@ -75629,11 +75655,7 @@ function createTypeChecker(host) {
75629
75655
  if (returnType === voidType) {
75630
75656
  error(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation);
75631
75657
  } else {
75632
- const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType;
75633
- const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType;
75634
- const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType;
75635
- const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */));
75636
- checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation);
75658
+ checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation);
75637
75659
  }
75638
75660
  } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) {
75639
75661
  checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation);
@@ -75644,6 +75666,13 @@ function createTypeChecker(host) {
75644
75666
  }
75645
75667
  }
75646
75668
  }
75669
+ function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) {
75670
+ const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType;
75671
+ const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType;
75672
+ const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType;
75673
+ const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */));
75674
+ return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode);
75675
+ }
75647
75676
  function checkClassForDuplicateDeclarations(node) {
75648
75677
  const instanceNames = /* @__PURE__ */ new Map();
75649
75678
  const staticNames = /* @__PURE__ */ new Map();
package/lib/tsserver.js CHANGED
@@ -56,7 +56,7 @@ var init_corePublic = __esm({
56
56
  "src/compiler/corePublic.ts"() {
57
57
  "use strict";
58
58
  versionMajorMinor = "5.3";
59
- version = `${versionMajorMinor}.0-dev.20231026`;
59
+ version = `${versionMajorMinor}.0-dev.20231027`;
60
60
  Comparison = /* @__PURE__ */ ((Comparison3) => {
61
61
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
62
62
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7975,7 +7975,7 @@ var init_diagnosticInformationMap_generated = __esm({
7975
7975
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
7976
7976
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
7977
7977
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
7978
- An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
7978
+ An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),
7979
7979
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
7980
7980
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
7981
7981
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -7996,6 +7996,8 @@ var init_diagnosticInformationMap_generated = __esm({
7996
7996
  The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
7997
7997
  An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
7998
7998
  Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
7999
+ A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
8000
+ A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
7999
8001
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
8000
8002
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
8001
8003
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -47871,8 +47873,17 @@ function createTypeChecker(host) {
47871
47873
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
47872
47874
  if (meaning & 111551 /* Value */) {
47873
47875
  if (isPrimitiveTypeName(name)) {
47874
- if (isExtendedByInterface(errorLocation)) {
47875
- error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
47876
+ const grandparent = errorLocation.parent.parent;
47877
+ if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {
47878
+ const heritageKind = grandparent.token;
47879
+ const containerKind = grandparent.parent.kind;
47880
+ if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
47881
+ error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));
47882
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
47883
+ error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));
47884
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) {
47885
+ error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
47886
+ }
47876
47887
  } else {
47877
47888
  error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
47878
47889
  }
@@ -47904,16 +47915,6 @@ function createTypeChecker(host) {
47904
47915
  }
47905
47916
  return false;
47906
47917
  }
47907
- function isExtendedByInterface(node) {
47908
- const grandparent = node.parent.parent;
47909
- const parentOfGrandparent = grandparent.parent;
47910
- if (grandparent && parentOfGrandparent) {
47911
- const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */;
47912
- const isInterface = isInterfaceDeclaration(parentOfGrandparent);
47913
- return isExtending && isInterface;
47914
- }
47915
- return false;
47916
- }
47917
47918
  function maybeMappedType(node, symbol) {
47918
47919
  const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit");
47919
47920
  if (container && container.members.length === 1) {
@@ -60357,7 +60358,7 @@ function createTypeChecker(host) {
60357
60358
  }
60358
60359
  function isPatternLiteralPlaceholderType(type) {
60359
60360
  if (type.flags & 2097152 /* Intersection */) {
60360
- return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t));
60361
+ return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
60361
60362
  }
60362
60363
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
60363
60364
  }
@@ -70115,7 +70116,24 @@ function createTypeChecker(host) {
70115
70116
  }
70116
70117
  const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
70117
70118
  if (signature && !isResolvingReturnTypeOfSignature(signature)) {
70118
- return getReturnTypeOfSignature(signature);
70119
+ const returnType2 = getReturnTypeOfSignature(signature);
70120
+ const functionFlags = getFunctionFlags(functionDecl);
70121
+ if (functionFlags & 1 /* Generator */) {
70122
+ return filterType(returnType2, (t) => {
70123
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType(
70124
+ t,
70125
+ functionFlags,
70126
+ /*errorNode*/
70127
+ void 0
70128
+ );
70129
+ });
70130
+ }
70131
+ if (functionFlags & 2 /* Async */) {
70132
+ return filterType(returnType2, (t) => {
70133
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t);
70134
+ });
70135
+ }
70136
+ return returnType2;
70119
70137
  }
70120
70138
  const iife = getImmediatelyInvokedFunctionExpression(functionDecl);
70121
70139
  if (iife) {
@@ -77316,7 +77334,15 @@ function createTypeChecker(host) {
77316
77334
  checkExternalEmitHelpers(node, 256 /* Values */);
77317
77335
  }
77318
77336
  }
77319
- const returnType = getReturnTypeFromAnnotation(func);
77337
+ let returnType = getReturnTypeFromAnnotation(func);
77338
+ if (returnType && returnType.flags & 1048576 /* Union */) {
77339
+ returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType(
77340
+ t,
77341
+ functionFlags,
77342
+ /*errorNode*/
77343
+ void 0
77344
+ ));
77345
+ }
77320
77346
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
77321
77347
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
77322
77348
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
@@ -78129,11 +78155,7 @@ function createTypeChecker(host) {
78129
78155
  if (returnType === voidType) {
78130
78156
  error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation);
78131
78157
  } else {
78132
- const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType;
78133
- const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType;
78134
- const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType;
78135
- const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */));
78136
- checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation);
78158
+ checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation);
78137
78159
  }
78138
78160
  } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) {
78139
78161
  checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation);
@@ -78144,6 +78166,13 @@ function createTypeChecker(host) {
78144
78166
  }
78145
78167
  }
78146
78168
  }
78169
+ function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) {
78170
+ const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType;
78171
+ const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType;
78172
+ const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType;
78173
+ const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */));
78174
+ return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode);
78175
+ }
78147
78176
  function checkClassForDuplicateDeclarations(node) {
78148
78177
  const instanceNames = /* @__PURE__ */ new Map();
78149
78178
  const staticNames = /* @__PURE__ */ new Map();
package/lib/typescript.js CHANGED
@@ -56,7 +56,7 @@ var ts = (() => {
56
56
  "src/compiler/corePublic.ts"() {
57
57
  "use strict";
58
58
  versionMajorMinor = "5.3";
59
- version = `${versionMajorMinor}.0-dev.20231026`;
59
+ version = `${versionMajorMinor}.0-dev.20231027`;
60
60
  Comparison = /* @__PURE__ */ ((Comparison3) => {
61
61
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
62
62
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -7975,7 +7975,7 @@ ${lanes.join("\n")}
7975
7975
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
7976
7976
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
7977
7977
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
7978
- An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
7978
+ An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),
7979
7979
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
7980
7980
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
7981
7981
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -7996,6 +7996,8 @@ ${lanes.join("\n")}
7996
7996
  The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
7997
7997
  An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
7998
7998
  Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
7999
+ A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
8000
+ A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
7999
8001
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
8000
8002
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
8001
8003
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
@@ -47871,8 +47873,17 @@ ${lanes.join("\n")}
47871
47873
  function checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) {
47872
47874
  if (meaning & 111551 /* Value */) {
47873
47875
  if (isPrimitiveTypeName(name)) {
47874
- if (isExtendedByInterface(errorLocation)) {
47875
- error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes, unescapeLeadingUnderscores(name));
47876
+ const grandparent = errorLocation.parent.parent;
47877
+ if (grandparent && grandparent.parent && isHeritageClause(grandparent)) {
47878
+ const heritageKind = grandparent.token;
47879
+ const containerKind = grandparent.parent.kind;
47880
+ if (containerKind === 264 /* InterfaceDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
47881
+ error2(errorLocation, Diagnostics.An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types, unescapeLeadingUnderscores(name));
47882
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 96 /* ExtendsKeyword */) {
47883
+ error2(errorLocation, Diagnostics.A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values, unescapeLeadingUnderscores(name));
47884
+ } else if (containerKind === 263 /* ClassDeclaration */ && heritageKind === 119 /* ImplementsKeyword */) {
47885
+ error2(errorLocation, Diagnostics.A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types, unescapeLeadingUnderscores(name));
47886
+ }
47876
47887
  } else {
47877
47888
  error2(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
47878
47889
  }
@@ -47904,16 +47915,6 @@ ${lanes.join("\n")}
47904
47915
  }
47905
47916
  return false;
47906
47917
  }
47907
- function isExtendedByInterface(node) {
47908
- const grandparent = node.parent.parent;
47909
- const parentOfGrandparent = grandparent.parent;
47910
- if (grandparent && parentOfGrandparent) {
47911
- const isExtending = isHeritageClause(grandparent) && grandparent.token === 96 /* ExtendsKeyword */;
47912
- const isInterface = isInterfaceDeclaration(parentOfGrandparent);
47913
- return isExtending && isInterface;
47914
- }
47915
- return false;
47916
- }
47917
47918
  function maybeMappedType(node, symbol) {
47918
47919
  const container = findAncestor(node.parent, (n) => isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit");
47919
47920
  if (container && container.members.length === 1) {
@@ -60357,7 +60358,7 @@ ${lanes.join("\n")}
60357
60358
  }
60358
60359
  function isPatternLiteralPlaceholderType(type) {
60359
60360
  if (type.flags & 2097152 /* Intersection */) {
60360
- return some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 65536 /* Null */ | 32768 /* Undefined */)) || isPatternLiteralPlaceholderType(t));
60361
+ return !isGenericType(type) && some(type.types, (t) => !!(t.flags & (2944 /* Literal */ | 98304 /* Nullable */)) || isPatternLiteralPlaceholderType(t));
60361
60362
  }
60362
60363
  return !!(type.flags & (1 /* Any */ | 4 /* String */ | 8 /* Number */ | 64 /* BigInt */)) || isPatternLiteralType(type);
60363
60364
  }
@@ -70115,7 +70116,24 @@ ${lanes.join("\n")}
70115
70116
  }
70116
70117
  const signature = getContextualSignatureForFunctionLikeDeclaration(functionDecl);
70117
70118
  if (signature && !isResolvingReturnTypeOfSignature(signature)) {
70118
- return getReturnTypeOfSignature(signature);
70119
+ const returnType2 = getReturnTypeOfSignature(signature);
70120
+ const functionFlags = getFunctionFlags(functionDecl);
70121
+ if (functionFlags & 1 /* Generator */) {
70122
+ return filterType(returnType2, (t) => {
70123
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || checkGeneratorInstantiationAssignabilityToReturnType(
70124
+ t,
70125
+ functionFlags,
70126
+ /*errorNode*/
70127
+ void 0
70128
+ );
70129
+ });
70130
+ }
70131
+ if (functionFlags & 2 /* Async */) {
70132
+ return filterType(returnType2, (t) => {
70133
+ return !!(t.flags & (3 /* AnyOrUnknown */ | 16384 /* Void */ | 58982400 /* InstantiableNonPrimitive */)) || !!getAwaitedTypeOfPromise(t);
70134
+ });
70135
+ }
70136
+ return returnType2;
70119
70137
  }
70120
70138
  const iife = getImmediatelyInvokedFunctionExpression(functionDecl);
70121
70139
  if (iife) {
@@ -77316,7 +77334,15 @@ ${lanes.join("\n")}
77316
77334
  checkExternalEmitHelpers(node, 256 /* Values */);
77317
77335
  }
77318
77336
  }
77319
- const returnType = getReturnTypeFromAnnotation(func);
77337
+ let returnType = getReturnTypeFromAnnotation(func);
77338
+ if (returnType && returnType.flags & 1048576 /* Union */) {
77339
+ returnType = filterType(returnType, (t) => checkGeneratorInstantiationAssignabilityToReturnType(
77340
+ t,
77341
+ functionFlags,
77342
+ /*errorNode*/
77343
+ void 0
77344
+ ));
77345
+ }
77320
77346
  const iterationTypes = returnType && getIterationTypesOfGeneratorFunctionReturnType(returnType, isAsync);
77321
77347
  const signatureYieldType = iterationTypes && iterationTypes.yieldType || anyType;
77322
77348
  const signatureNextType = iterationTypes && iterationTypes.nextType || anyType;
@@ -78129,11 +78155,7 @@ ${lanes.join("\n")}
78129
78155
  if (returnType === voidType) {
78130
78156
  error2(returnTypeErrorLocation, Diagnostics.A_generator_cannot_have_a_void_type_annotation);
78131
78157
  } else {
78132
- const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || anyType;
78133
- const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || generatorYieldType;
78134
- const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags2 & 2 /* Async */) !== 0) || unknownType;
78135
- const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags2 & 2 /* Async */));
78136
- checkTypeAssignableTo(generatorInstantiation, returnType, returnTypeErrorLocation);
78158
+ checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags2, returnTypeErrorLocation);
78137
78159
  }
78138
78160
  } else if ((functionFlags2 & 3 /* AsyncGenerator */) === 2 /* Async */) {
78139
78161
  checkAsyncFunctionReturnType(node, returnTypeNode, returnTypeErrorLocation);
@@ -78144,6 +78166,13 @@ ${lanes.join("\n")}
78144
78166
  }
78145
78167
  }
78146
78168
  }
78169
+ function checkGeneratorInstantiationAssignabilityToReturnType(returnType, functionFlags, errorNode) {
78170
+ const generatorYieldType = getIterationTypeOfGeneratorFunctionReturnType(0 /* Yield */, returnType, (functionFlags & 2 /* Async */) !== 0) || anyType;
78171
+ const generatorReturnType = getIterationTypeOfGeneratorFunctionReturnType(1 /* Return */, returnType, (functionFlags & 2 /* Async */) !== 0) || generatorYieldType;
78172
+ const generatorNextType = getIterationTypeOfGeneratorFunctionReturnType(2 /* Next */, returnType, (functionFlags & 2 /* Async */) !== 0) || unknownType;
78173
+ const generatorInstantiation = createGeneratorReturnType(generatorYieldType, generatorReturnType, generatorNextType, !!(functionFlags & 2 /* Async */));
78174
+ return checkTypeAssignableTo(generatorInstantiation, returnType, errorNode);
78175
+ }
78147
78176
  function checkClassForDuplicateDeclarations(node) {
78148
78177
  const instanceNames = /* @__PURE__ */ new Map();
78149
78178
  const staticNames = /* @__PURE__ */ new Map();
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.3";
57
- var version = `${versionMajorMinor}.0-dev.20231026`;
57
+ var version = `${versionMajorMinor}.0-dev.20231027`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -6021,7 +6021,7 @@ var Diagnostics = {
6021
6021
  Import_assertion_values_must_be_string_literal_expressions: diag(2837, 1 /* Error */, "Import_assertion_values_must_be_string_literal_expressions_2837", "Import assertion values must be string literal expressions."),
6022
6022
  All_declarations_of_0_must_have_identical_constraints: diag(2838, 1 /* Error */, "All_declarations_of_0_must_have_identical_constraints_2838", "All declarations of '{0}' must have identical constraints."),
6023
6023
  This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value: diag(2839, 1 /* Error */, "This_condition_will_always_return_0_since_JavaScript_compares_objects_by_reference_not_value_2839", "This condition will always return '{0}' since JavaScript compares objects by reference, not value."),
6024
- An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_classes: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_an_interface_can_only_extend_named_types_and_clas_2840", "An interface cannot extend a primitive type like '{0}'; an interface can only extend named types and classes"),
6024
+ An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types: diag(2840, 1 /* Error */, "An_interface_cannot_extend_a_primitive_type_like_0_It_can_only_extend_other_named_object_types_2840", "An interface cannot extend a primitive type like '{0}'. It can only extend other named object types."),
6025
6025
  _0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation: diag(2842, 1 /* Error */, "_0_is_an_unused_renaming_of_1_Did_you_intend_to_use_it_as_a_type_annotation_2842", "'{0}' is an unused renaming of '{1}'. Did you intend to use it as a type annotation?"),
6026
6026
  We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here: diag(2843, 1 /* Error */, "We_can_only_write_a_type_for_0_by_adding_a_type_for_the_entire_parameter_here_2843", "We can only write a type for '{0}' by adding a type for the entire parameter here."),
6027
6027
  Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor: diag(2844, 1 /* Error */, "Type_of_instance_member_variable_0_cannot_reference_identifier_1_declared_in_the_constructor_2844", "Type of instance member variable '{0}' cannot reference identifier '{1}' declared in the constructor."),
@@ -6042,6 +6042,8 @@ var Diagnostics = {
6042
6042
  The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_hand_side_s_Symbol_hasInstance_method: diag(2860, 1 /* Error */, "The_left_hand_side_of_an_instanceof_expression_must_be_assignable_to_the_first_argument_of_the_right_2860", "The left-hand side of an 'instanceof' expression must be assignable to the first argument of the right-hand side's '[Symbol.hasInstance]' method."),
6043
6043
  An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_hand_side_of_an_instanceof_expression: diag(2861, 1 /* Error */, "An_object_s_Symbol_hasInstance_method_must_return_a_boolean_value_for_it_to_be_used_on_the_right_han_2861", "An object's '[Symbol.hasInstance]' method must return a boolean value for it to be used on the right-hand side of an 'instanceof' expression."),
6044
6044
  Type_0_is_generic_and_can_only_be_indexed_for_reading: diag(2862, 1 /* Error */, "Type_0_is_generic_and_can_only_be_indexed_for_reading_2862", "Type '{0}' is generic and can only be indexed for reading."),
6045
+ A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values: diag(2863, 1 /* Error */, "A_class_cannot_extend_a_primitive_type_like_0_Classes_can_only_extend_constructable_values_2863", "A class cannot extend a primitive type like '{0}'. Classes can only extend constructable values."),
6046
+ A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types: diag(2864, 1 /* Error */, "A_class_cannot_implement_a_primitive_type_like_0_It_can_only_implement_other_named_object_types_2864", "A class cannot implement a primitive type like '{0}'. It can only implement other named object types."),
6045
6047
  Import_declaration_0_is_using_private_name_1: diag(4e3, 1 /* Error */, "Import_declaration_0_is_using_private_name_1_4000", "Import declaration '{0}' is using private name '{1}'."),
6046
6048
  Type_parameter_0_of_exported_class_has_or_is_using_private_name_1: diag(4002, 1 /* Error */, "Type_parameter_0_of_exported_class_has_or_is_using_private_name_1_4002", "Type parameter '{0}' of exported class has or is using private name '{1}'."),
6047
6049
  Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1: diag(4004, 1 /* Error */, "Type_parameter_0_of_exported_interface_has_or_is_using_private_name_1_4004", "Type parameter '{0}' of exported interface has or is using private name '{1}'."),
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "typescript",
3
3
  "author": "Microsoft Corp.",
4
4
  "homepage": "https://www.typescriptlang.org/",
5
- "version": "5.3.0-dev.20231026",
5
+ "version": "5.3.0-dev.20231027",
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": "aa9b6953441b53f8b14072c047f0519b611150c4"
118
+ "gitHead": "85c2577285154657f99f32db6231cb3f9815fe51"
119
119
  }