@typescript-deploys/pr-build 5.5.0-pr-57686-4 → 5.5.0-pr-57465-98

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.5";
21
- var version = `${versionMajorMinor}.0-insiders.20240312`;
21
+ var version = `${versionMajorMinor}.0-insiders.20240313`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -6342,7 +6342,7 @@ var Diagnostics = {
6342
6342
  Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, 1 /* Error */, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."),
6343
6343
  Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, 1 /* Error */, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),
6344
6344
  A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."),
6345
- Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),
6345
+ Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),
6346
6346
  All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, 1 /* Error */, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."),
6347
6347
  Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, 1 /* Error */, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."),
6348
6348
  A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, 1 /* Error */, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."),
@@ -6452,9 +6452,13 @@ var Diagnostics = {
6452
6452
  Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),
6453
6453
  React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"),
6454
6454
  Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* Error */, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
6455
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: diag(2650, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),
6455
6456
  A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, 1 /* Error */, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
6456
6457
  Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, 1 /* Error */, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
6457
6458
  Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, 1 /* Error */, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),
6459
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: diag(2654, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),
6460
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: diag(2655, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),
6461
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: diag(2656, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),
6458
6462
  JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* Error */, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."),
6459
6463
  Type_0_provides_no_match_for_the_signature_1: diag(2658, 1 /* Error */, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."),
6460
6464
  super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, 1 /* Error */, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),
@@ -7783,7 +7787,6 @@ var Diagnostics = {
7783
7787
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
7784
7788
  The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
7785
7789
  Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."),
7786
- Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"),
7787
7790
  Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."),
7788
7791
  await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.")
7789
7792
  };
@@ -17647,21 +17650,6 @@ function replaceFirstStar(s, replacement) {
17647
17650
  function getNameFromImportAttribute(node) {
17648
17651
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
17649
17652
  }
17650
- function isSyntacticallyString(expr) {
17651
- switch (expr.kind) {
17652
- case 226 /* BinaryExpression */:
17653
- const left = expr.left;
17654
- const right = expr.right;
17655
- return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
17656
- case 217 /* ParenthesizedExpression */:
17657
- return isSyntacticallyString(expr.expression);
17658
- case 228 /* TemplateExpression */:
17659
- case 11 /* StringLiteral */:
17660
- case 15 /* NoSubstitutionTemplateLiteral */:
17661
- return true;
17662
- }
17663
- return false;
17664
- }
17665
17653
 
17666
17654
  // src/compiler/factory/baseNodeFactory.ts
17667
17655
  function createBaseNodeFactory() {
@@ -39807,7 +39795,7 @@ function createBinder() {
39807
39795
  inAssignmentPattern = saveInAssignmentPattern;
39808
39796
  return;
39809
39797
  }
39810
- if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) {
39798
+ if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 253 /* ReturnStatement */)) {
39811
39799
  node.flowNode = currentFlow;
39812
39800
  }
39813
39801
  switch (node.kind) {
@@ -55653,7 +55641,15 @@ function createTypeChecker(host) {
55653
55641
  jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
55654
55642
  }
55655
55643
  }
55656
- signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
55644
+ if (type || jsdocPredicate) {
55645
+ signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
55646
+ } else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 16 /* Boolean */)) {
55647
+ const { declaration } = signature;
55648
+ signature.resolvedTypePredicate = noTypePredicate;
55649
+ signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
55650
+ } else {
55651
+ signature.resolvedTypePredicate = noTypePredicate;
55652
+ }
55657
55653
  }
55658
55654
  Debug.assert(!!signature.resolvedTypePredicate);
55659
55655
  }
@@ -74077,6 +74073,67 @@ function createTypeChecker(host) {
74077
74073
  return false;
74078
74074
  }
74079
74075
  }
74076
+ function getTypePredicateFromBody(func) {
74077
+ switch (func.kind) {
74078
+ case 176 /* Constructor */:
74079
+ case 177 /* GetAccessor */:
74080
+ case 178 /* SetAccessor */:
74081
+ return void 0;
74082
+ }
74083
+ const functionFlags = getFunctionFlags(func);
74084
+ if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
74085
+ return void 0;
74086
+ let singleReturn;
74087
+ if (func.body && func.body.kind !== 241 /* Block */) {
74088
+ singleReturn = func.body;
74089
+ } else {
74090
+ const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
74091
+ if (singleReturn || !returnStatement.expression)
74092
+ return true;
74093
+ singleReturn = returnStatement.expression;
74094
+ });
74095
+ if (bailedEarly || !singleReturn || functionHasImplicitReturn(func))
74096
+ return void 0;
74097
+ }
74098
+ return checkIfExpressionRefinesAnyParameter(func, singleReturn);
74099
+ }
74100
+ function checkIfExpressionRefinesAnyParameter(func, expr) {
74101
+ expr = skipParentheses(
74102
+ expr,
74103
+ /*excludeJSDocTypeAssertions*/
74104
+ true
74105
+ );
74106
+ const returnType = checkExpressionCached(expr);
74107
+ if (!(returnType.flags & 16 /* Boolean */))
74108
+ return void 0;
74109
+ return forEach(func.parameters, (param, i) => {
74110
+ const initType = getTypeOfSymbol(param.symbol);
74111
+ if (!initType || initType.flags & 16 /* Boolean */ || !isIdentifier(param.name) || isSymbolAssigned(param.symbol)) {
74112
+ return;
74113
+ }
74114
+ const trueType2 = checkIfExpressionRefinesParameter(func, expr, param, initType);
74115
+ if (trueType2) {
74116
+ return createTypePredicate(1 /* Identifier */, unescapeLeadingUnderscores(param.name.escapedText), i, trueType2);
74117
+ }
74118
+ });
74119
+ }
74120
+ function checkIfExpressionRefinesParameter(func, expr, param, initType) {
74121
+ const antecedent = expr.flowNode || expr.parent.kind === 253 /* ReturnStatement */ && expr.parent.flowNode || { flags: 2 /* Start */ };
74122
+ const trueCondition = {
74123
+ flags: 32 /* TrueCondition */,
74124
+ node: expr,
74125
+ antecedent
74126
+ };
74127
+ const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
74128
+ if (trueType2 === initType)
74129
+ return void 0;
74130
+ const falseCondition = {
74131
+ ...trueCondition,
74132
+ flags: 64 /* FalseCondition */
74133
+ };
74134
+ const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
74135
+ return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0;
74136
+ }
74080
74137
  function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
74081
74138
  addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
74082
74139
  return;
@@ -80053,9 +80110,9 @@ function createTypeChecker(host) {
80053
80110
  return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */);
80054
80111
  }
80055
80112
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
80056
- var _a, _b, _c, _d;
80113
+ var _a, _b, _c, _d, _e;
80057
80114
  const baseProperties = getPropertiesOfType(baseType);
80058
- let inheritedAbstractMemberNotImplementedError;
80115
+ const notImplementedInfo = /* @__PURE__ */ new Map();
80059
80116
  basePropertyCheck:
80060
80117
  for (const baseProperty of baseProperties) {
80061
80118
  const base = getTargetSymbol(baseProperty);
@@ -80081,36 +80138,11 @@ function createTypeChecker(host) {
80081
80138
  continue basePropertyCheck;
80082
80139
  }
80083
80140
  }
80084
- if (!inheritedAbstractMemberNotImplementedError) {
80085
- inheritedAbstractMemberNotImplementedError = error(
80086
- derivedClassDecl,
80087
- Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
80088
- typeToString(type),
80089
- typeToString(baseType)
80090
- );
80091
- }
80092
- if (derivedClassDecl.kind === 231 /* ClassExpression */) {
80093
- addRelatedInfo(
80094
- inheritedAbstractMemberNotImplementedError,
80095
- createDiagnosticForNode(
80096
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
80097
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
80098
- symbolToString(baseProperty),
80099
- typeToString(baseType)
80100
- )
80101
- );
80102
- } else {
80103
- addRelatedInfo(
80104
- inheritedAbstractMemberNotImplementedError,
80105
- createDiagnosticForNode(
80106
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
80107
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
80108
- typeToString(type),
80109
- symbolToString(baseProperty),
80110
- typeToString(baseType)
80111
- )
80112
- );
80113
- }
80141
+ const baseTypeName = typeToString(baseType);
80142
+ const typeName = typeToString(type);
80143
+ const basePropertyName = symbolToString(baseProperty);
80144
+ const missedProperties = append((_a = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a.missedProperties, basePropertyName);
80145
+ notImplementedInfo.set(derivedClassDecl, { baseTypeName, typeName, missedProperties });
80114
80146
  }
80115
80147
  } else {
80116
80148
  const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
@@ -80121,7 +80153,7 @@ function createTypeChecker(host) {
80121
80153
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
80122
80154
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
80123
80155
  if (basePropertyFlags && derivedPropertyFlags) {
80124
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a = base.declarations) == null ? void 0 : _a.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_b = base.declarations) == null ? void 0 : _b.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
80156
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
80125
80157
  continue;
80126
80158
  }
80127
80159
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -80130,8 +80162,8 @@ function createTypeChecker(host) {
80130
80162
  const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;
80131
80163
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
80132
80164
  } else if (useDefineForClassFields) {
80133
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
80134
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
80165
+ const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
80166
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
80135
80167
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
80136
80168
  const propName = uninitialized.name;
80137
80169
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -80156,6 +80188,30 @@ function createTypeChecker(host) {
80156
80188
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
80157
80189
  }
80158
80190
  }
80191
+ for (const [errorNode, memberInfo] of notImplementedInfo) {
80192
+ if (length(memberInfo.missedProperties) === 1) {
80193
+ if (isClassExpression(errorNode)) {
80194
+ error(errorNode, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, first(memberInfo.missedProperties), memberInfo.baseTypeName);
80195
+ } else {
80196
+ error(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first(memberInfo.missedProperties), memberInfo.baseTypeName);
80197
+ }
80198
+ } else if (length(memberInfo.missedProperties) > 5) {
80199
+ const missedProperties = map(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
80200
+ const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
80201
+ if (isClassExpression(errorNode)) {
80202
+ error(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
80203
+ } else {
80204
+ error(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, memberInfo.typeName, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
80205
+ }
80206
+ } else {
80207
+ const missedProperties = map(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
80208
+ if (isClassExpression(errorNode)) {
80209
+ error(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
80210
+ } else {
80211
+ error(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, memberInfo.typeName, memberInfo.baseTypeName, missedProperties);
80212
+ }
80213
+ }
80214
+ }
80159
80215
  }
80160
80216
  function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
80161
80217
  return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);
@@ -89347,7 +89403,7 @@ function transformTypeScript(context) {
89347
89403
  ),
89348
89404
  valueExpression
89349
89405
  );
89350
- const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
89406
+ const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
89351
89407
  factory2.createElementAccessExpression(
89352
89408
  currentNamespaceContainerName,
89353
89409
  innerAssignment
package/lib/tsserver.js CHANGED
@@ -1760,7 +1760,6 @@ __export(server_exports, {
1760
1760
  isSuperProperty: () => isSuperProperty,
1761
1761
  isSupportedSourceFileName: () => isSupportedSourceFileName,
1762
1762
  isSwitchStatement: () => isSwitchStatement,
1763
- isSyntacticallyString: () => isSyntacticallyString,
1764
1763
  isSyntaxList: () => isSyntaxList,
1765
1764
  isSyntheticExpression: () => isSyntheticExpression,
1766
1765
  isSyntheticReference: () => isSyntheticReference,
@@ -2327,7 +2326,7 @@ module.exports = __toCommonJS(server_exports);
2327
2326
 
2328
2327
  // src/compiler/corePublic.ts
2329
2328
  var versionMajorMinor = "5.5";
2330
- var version = `${versionMajorMinor}.0-insiders.20240312`;
2329
+ var version = `${versionMajorMinor}.0-insiders.20240313`;
2331
2330
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2331
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2332
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9922,7 +9921,7 @@ var Diagnostics = {
9922
9921
  Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, 1 /* Error */, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."),
9923
9922
  Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, 1 /* Error */, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),
9924
9923
  A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."),
9925
- Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),
9924
+ Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),
9926
9925
  All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, 1 /* Error */, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."),
9927
9926
  Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, 1 /* Error */, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."),
9928
9927
  A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, 1 /* Error */, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."),
@@ -10032,9 +10031,13 @@ var Diagnostics = {
10032
10031
  Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),
10033
10032
  React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"),
10034
10033
  Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* Error */, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
10034
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: diag(2650, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),
10035
10035
  A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, 1 /* Error */, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
10036
10036
  Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, 1 /* Error */, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
10037
10037
  Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, 1 /* Error */, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),
10038
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: diag(2654, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),
10039
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: diag(2655, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),
10040
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: diag(2656, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),
10038
10041
  JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* Error */, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."),
10039
10042
  Type_0_provides_no_match_for_the_signature_1: diag(2658, 1 /* Error */, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."),
10040
10043
  super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, 1 /* Error */, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),
@@ -11363,7 +11366,6 @@ var Diagnostics = {
11363
11366
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
11364
11367
  The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
11365
11368
  Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."),
11366
- Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"),
11367
11369
  Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."),
11368
11370
  await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.")
11369
11371
  };
@@ -21908,21 +21910,6 @@ function replaceFirstStar(s, replacement) {
21908
21910
  function getNameFromImportAttribute(node) {
21909
21911
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
21910
21912
  }
21911
- function isSyntacticallyString(expr) {
21912
- switch (expr.kind) {
21913
- case 226 /* BinaryExpression */:
21914
- const left = expr.left;
21915
- const right = expr.right;
21916
- return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
21917
- case 217 /* ParenthesizedExpression */:
21918
- return isSyntacticallyString(expr.expression);
21919
- case 228 /* TemplateExpression */:
21920
- case 11 /* StringLiteral */:
21921
- case 15 /* NoSubstitutionTemplateLiteral */:
21922
- return true;
21923
- }
21924
- return false;
21925
- }
21926
21913
 
21927
21914
  // src/compiler/factory/baseNodeFactory.ts
21928
21915
  function createBaseNodeFactory() {
@@ -44506,7 +44493,7 @@ function createBinder() {
44506
44493
  inAssignmentPattern = saveInAssignmentPattern;
44507
44494
  return;
44508
44495
  }
44509
- if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) {
44496
+ if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 253 /* ReturnStatement */)) {
44510
44497
  node.flowNode = currentFlow;
44511
44498
  }
44512
44499
  switch (node.kind) {
@@ -60406,7 +60393,15 @@ function createTypeChecker(host) {
60406
60393
  jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
60407
60394
  }
60408
60395
  }
60409
- signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
60396
+ if (type || jsdocPredicate) {
60397
+ signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
60398
+ } else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 16 /* Boolean */)) {
60399
+ const { declaration } = signature;
60400
+ signature.resolvedTypePredicate = noTypePredicate;
60401
+ signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
60402
+ } else {
60403
+ signature.resolvedTypePredicate = noTypePredicate;
60404
+ }
60410
60405
  }
60411
60406
  Debug.assert(!!signature.resolvedTypePredicate);
60412
60407
  }
@@ -78830,6 +78825,67 @@ function createTypeChecker(host) {
78830
78825
  return false;
78831
78826
  }
78832
78827
  }
78828
+ function getTypePredicateFromBody(func) {
78829
+ switch (func.kind) {
78830
+ case 176 /* Constructor */:
78831
+ case 177 /* GetAccessor */:
78832
+ case 178 /* SetAccessor */:
78833
+ return void 0;
78834
+ }
78835
+ const functionFlags = getFunctionFlags(func);
78836
+ if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
78837
+ return void 0;
78838
+ let singleReturn;
78839
+ if (func.body && func.body.kind !== 241 /* Block */) {
78840
+ singleReturn = func.body;
78841
+ } else {
78842
+ const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
78843
+ if (singleReturn || !returnStatement.expression)
78844
+ return true;
78845
+ singleReturn = returnStatement.expression;
78846
+ });
78847
+ if (bailedEarly || !singleReturn || functionHasImplicitReturn(func))
78848
+ return void 0;
78849
+ }
78850
+ return checkIfExpressionRefinesAnyParameter(func, singleReturn);
78851
+ }
78852
+ function checkIfExpressionRefinesAnyParameter(func, expr) {
78853
+ expr = skipParentheses(
78854
+ expr,
78855
+ /*excludeJSDocTypeAssertions*/
78856
+ true
78857
+ );
78858
+ const returnType = checkExpressionCached(expr);
78859
+ if (!(returnType.flags & 16 /* Boolean */))
78860
+ return void 0;
78861
+ return forEach(func.parameters, (param, i) => {
78862
+ const initType = getTypeOfSymbol(param.symbol);
78863
+ if (!initType || initType.flags & 16 /* Boolean */ || !isIdentifier(param.name) || isSymbolAssigned(param.symbol)) {
78864
+ return;
78865
+ }
78866
+ const trueType2 = checkIfExpressionRefinesParameter(func, expr, param, initType);
78867
+ if (trueType2) {
78868
+ return createTypePredicate(1 /* Identifier */, unescapeLeadingUnderscores(param.name.escapedText), i, trueType2);
78869
+ }
78870
+ });
78871
+ }
78872
+ function checkIfExpressionRefinesParameter(func, expr, param, initType) {
78873
+ const antecedent = expr.flowNode || expr.parent.kind === 253 /* ReturnStatement */ && expr.parent.flowNode || { flags: 2 /* Start */ };
78874
+ const trueCondition = {
78875
+ flags: 32 /* TrueCondition */,
78876
+ node: expr,
78877
+ antecedent
78878
+ };
78879
+ const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
78880
+ if (trueType2 === initType)
78881
+ return void 0;
78882
+ const falseCondition = {
78883
+ ...trueCondition,
78884
+ flags: 64 /* FalseCondition */
78885
+ };
78886
+ const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
78887
+ return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0;
78888
+ }
78833
78889
  function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
78834
78890
  addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
78835
78891
  return;
@@ -84806,9 +84862,9 @@ function createTypeChecker(host) {
84806
84862
  return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */);
84807
84863
  }
84808
84864
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
84809
- var _a, _b, _c, _d;
84865
+ var _a, _b, _c, _d, _e;
84810
84866
  const baseProperties = getPropertiesOfType(baseType);
84811
- let inheritedAbstractMemberNotImplementedError;
84867
+ const notImplementedInfo = /* @__PURE__ */ new Map();
84812
84868
  basePropertyCheck:
84813
84869
  for (const baseProperty of baseProperties) {
84814
84870
  const base = getTargetSymbol(baseProperty);
@@ -84834,36 +84890,11 @@ function createTypeChecker(host) {
84834
84890
  continue basePropertyCheck;
84835
84891
  }
84836
84892
  }
84837
- if (!inheritedAbstractMemberNotImplementedError) {
84838
- inheritedAbstractMemberNotImplementedError = error2(
84839
- derivedClassDecl,
84840
- Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
84841
- typeToString(type),
84842
- typeToString(baseType)
84843
- );
84844
- }
84845
- if (derivedClassDecl.kind === 231 /* ClassExpression */) {
84846
- addRelatedInfo(
84847
- inheritedAbstractMemberNotImplementedError,
84848
- createDiagnosticForNode(
84849
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
84850
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
84851
- symbolToString(baseProperty),
84852
- typeToString(baseType)
84853
- )
84854
- );
84855
- } else {
84856
- addRelatedInfo(
84857
- inheritedAbstractMemberNotImplementedError,
84858
- createDiagnosticForNode(
84859
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
84860
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
84861
- typeToString(type),
84862
- symbolToString(baseProperty),
84863
- typeToString(baseType)
84864
- )
84865
- );
84866
- }
84893
+ const baseTypeName = typeToString(baseType);
84894
+ const typeName = typeToString(type);
84895
+ const basePropertyName = symbolToString(baseProperty);
84896
+ const missedProperties = append((_a = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a.missedProperties, basePropertyName);
84897
+ notImplementedInfo.set(derivedClassDecl, { baseTypeName, typeName, missedProperties });
84867
84898
  }
84868
84899
  } else {
84869
84900
  const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
@@ -84874,7 +84905,7 @@ function createTypeChecker(host) {
84874
84905
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
84875
84906
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
84876
84907
  if (basePropertyFlags && derivedPropertyFlags) {
84877
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a = base.declarations) == null ? void 0 : _a.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_b = base.declarations) == null ? void 0 : _b.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
84908
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
84878
84909
  continue;
84879
84910
  }
84880
84911
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -84883,8 +84914,8 @@ function createTypeChecker(host) {
84883
84914
  const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;
84884
84915
  error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
84885
84916
  } else if (useDefineForClassFields) {
84886
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
84887
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
84917
+ const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
84918
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
84888
84919
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
84889
84920
  const propName = uninitialized.name;
84890
84921
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -84909,6 +84940,30 @@ function createTypeChecker(host) {
84909
84940
  error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
84910
84941
  }
84911
84942
  }
84943
+ for (const [errorNode, memberInfo] of notImplementedInfo) {
84944
+ if (length(memberInfo.missedProperties) === 1) {
84945
+ if (isClassExpression(errorNode)) {
84946
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, first(memberInfo.missedProperties), memberInfo.baseTypeName);
84947
+ } else {
84948
+ error2(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first(memberInfo.missedProperties), memberInfo.baseTypeName);
84949
+ }
84950
+ } else if (length(memberInfo.missedProperties) > 5) {
84951
+ const missedProperties = map(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
84952
+ const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
84953
+ if (isClassExpression(errorNode)) {
84954
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
84955
+ } else {
84956
+ error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, memberInfo.typeName, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
84957
+ }
84958
+ } else {
84959
+ const missedProperties = map(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
84960
+ if (isClassExpression(errorNode)) {
84961
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
84962
+ } else {
84963
+ error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, memberInfo.typeName, memberInfo.baseTypeName, missedProperties);
84964
+ }
84965
+ }
84966
+ }
84912
84967
  }
84913
84968
  function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
84914
84969
  return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);
@@ -94287,7 +94342,7 @@ function transformTypeScript(context) {
94287
94342
  ),
94288
94343
  valueExpression
94289
94344
  );
94290
- const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
94345
+ const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
94291
94346
  factory2.createElementAccessExpression(
94292
94347
  currentNamespaceContainerName,
94293
94348
  innerAssignment
@@ -153542,7 +153597,12 @@ function getTypesPackageNameToInstall(packageName, host, diagCode) {
153542
153597
 
153543
153598
  // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
153544
153599
  var errorCodes31 = [
153545
- Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code
153600
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
153601
+ Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,
153602
+ Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,
153603
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,
153604
+ Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,
153605
+ Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code
153546
153606
  ];
153547
153607
  var fixId25 = "fixClassDoesntImplementInheritedAbstractMember";
153548
153608
  registerCodeFix({
@@ -175026,7 +175086,6 @@ __export(ts_exports2, {
175026
175086
  isSuperProperty: () => isSuperProperty,
175027
175087
  isSupportedSourceFileName: () => isSupportedSourceFileName,
175028
175088
  isSwitchStatement: () => isSwitchStatement,
175029
- isSyntacticallyString: () => isSyntacticallyString,
175030
175089
  isSyntaxList: () => isSyntaxList,
175031
175090
  isSyntheticExpression: () => isSyntheticExpression,
175032
175091
  isSyntheticReference: () => isSyntheticReference,
@@ -189803,7 +189862,6 @@ start(initializeNodeSystem(), require("os").platform());
189803
189862
  isSuperProperty,
189804
189863
  isSupportedSourceFileName,
189805
189864
  isSwitchStatement,
189806
- isSyntacticallyString,
189807
189865
  isSyntaxList,
189808
189866
  isSyntheticExpression,
189809
189867
  isSyntheticReference,
package/lib/typescript.js CHANGED
@@ -1760,7 +1760,6 @@ __export(typescript_exports, {
1760
1760
  isSuperProperty: () => isSuperProperty,
1761
1761
  isSupportedSourceFileName: () => isSupportedSourceFileName,
1762
1762
  isSwitchStatement: () => isSwitchStatement,
1763
- isSyntacticallyString: () => isSyntacticallyString,
1764
1763
  isSyntaxList: () => isSyntaxList,
1765
1764
  isSyntheticExpression: () => isSyntheticExpression,
1766
1765
  isSyntheticReference: () => isSyntheticReference,
@@ -2327,7 +2326,7 @@ module.exports = __toCommonJS(typescript_exports);
2327
2326
 
2328
2327
  // src/compiler/corePublic.ts
2329
2328
  var versionMajorMinor = "5.5";
2330
- var version = `${versionMajorMinor}.0-insiders.20240312`;
2329
+ var version = `${versionMajorMinor}.0-insiders.20240313`;
2331
2330
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2332
2331
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2333
2332
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9922,7 +9921,7 @@ var Diagnostics = {
9922
9921
  Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, 1 /* Error */, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."),
9923
9922
  Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, 1 /* Error */, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),
9924
9923
  A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."),
9925
- Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),
9924
+ Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),
9926
9925
  All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, 1 /* Error */, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."),
9927
9926
  Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, 1 /* Error */, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."),
9928
9927
  A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, 1 /* Error */, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."),
@@ -10032,9 +10031,13 @@ var Diagnostics = {
10032
10031
  Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),
10033
10032
  React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"),
10034
10033
  Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* Error */, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
10034
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: diag(2650, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),
10035
10035
  A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, 1 /* Error */, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
10036
10036
  Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, 1 /* Error */, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
10037
10037
  Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, 1 /* Error */, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),
10038
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: diag(2654, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),
10039
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: diag(2655, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),
10040
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: diag(2656, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),
10038
10041
  JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* Error */, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."),
10039
10042
  Type_0_provides_no_match_for_the_signature_1: diag(2658, 1 /* Error */, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."),
10040
10043
  super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, 1 /* Error */, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),
@@ -11363,7 +11366,6 @@ var Diagnostics = {
11363
11366
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
11364
11367
  The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
11365
11368
  Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."),
11366
- Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"),
11367
11369
  Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."),
11368
11370
  await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.")
11369
11371
  };
@@ -21908,21 +21910,6 @@ function replaceFirstStar(s, replacement) {
21908
21910
  function getNameFromImportAttribute(node) {
21909
21911
  return isIdentifier(node.name) ? node.name.escapedText : escapeLeadingUnderscores(node.name.text);
21910
21912
  }
21911
- function isSyntacticallyString(expr) {
21912
- switch (expr.kind) {
21913
- case 226 /* BinaryExpression */:
21914
- const left = expr.left;
21915
- const right = expr.right;
21916
- return expr.operatorToken.kind === 40 /* PlusToken */ && (isSyntacticallyString(left) || isSyntacticallyString(right));
21917
- case 217 /* ParenthesizedExpression */:
21918
- return isSyntacticallyString(expr.expression);
21919
- case 228 /* TemplateExpression */:
21920
- case 11 /* StringLiteral */:
21921
- case 15 /* NoSubstitutionTemplateLiteral */:
21922
- return true;
21923
- }
21924
- return false;
21925
- }
21926
21913
 
21927
21914
  // src/compiler/factory/baseNodeFactory.ts
21928
21915
  function createBaseNodeFactory() {
@@ -44506,7 +44493,7 @@ function createBinder() {
44506
44493
  inAssignmentPattern = saveInAssignmentPattern;
44507
44494
  return;
44508
44495
  }
44509
- if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && !options.allowUnreachableCode) {
44496
+ if (node.kind >= 243 /* FirstStatement */ && node.kind <= 259 /* LastStatement */ && (!options.allowUnreachableCode || node.kind === 253 /* ReturnStatement */)) {
44510
44497
  node.flowNode = currentFlow;
44511
44498
  }
44512
44499
  switch (node.kind) {
@@ -60406,7 +60393,15 @@ function createTypeChecker(host) {
60406
60393
  jsdocPredicate = getTypePredicateOfSignature(jsdocSignature);
60407
60394
  }
60408
60395
  }
60409
- signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
60396
+ if (type || jsdocPredicate) {
60397
+ signature.resolvedTypePredicate = type && isTypePredicateNode(type) ? createTypePredicateFromTypePredicateNode(type, signature) : jsdocPredicate || noTypePredicate;
60398
+ } else if (signature.declaration && isFunctionLikeDeclaration(signature.declaration) && (!signature.resolvedReturnType || signature.resolvedReturnType.flags & 16 /* Boolean */)) {
60399
+ const { declaration } = signature;
60400
+ signature.resolvedTypePredicate = noTypePredicate;
60401
+ signature.resolvedTypePredicate = getTypePredicateFromBody(declaration) || noTypePredicate;
60402
+ } else {
60403
+ signature.resolvedTypePredicate = noTypePredicate;
60404
+ }
60410
60405
  }
60411
60406
  Debug.assert(!!signature.resolvedTypePredicate);
60412
60407
  }
@@ -78830,6 +78825,67 @@ function createTypeChecker(host) {
78830
78825
  return false;
78831
78826
  }
78832
78827
  }
78828
+ function getTypePredicateFromBody(func) {
78829
+ switch (func.kind) {
78830
+ case 176 /* Constructor */:
78831
+ case 177 /* GetAccessor */:
78832
+ case 178 /* SetAccessor */:
78833
+ return void 0;
78834
+ }
78835
+ const functionFlags = getFunctionFlags(func);
78836
+ if (functionFlags !== 0 /* Normal */ || func.parameters.length === 0)
78837
+ return void 0;
78838
+ let singleReturn;
78839
+ if (func.body && func.body.kind !== 241 /* Block */) {
78840
+ singleReturn = func.body;
78841
+ } else {
78842
+ const bailedEarly = forEachReturnStatement(func.body, (returnStatement) => {
78843
+ if (singleReturn || !returnStatement.expression)
78844
+ return true;
78845
+ singleReturn = returnStatement.expression;
78846
+ });
78847
+ if (bailedEarly || !singleReturn || functionHasImplicitReturn(func))
78848
+ return void 0;
78849
+ }
78850
+ return checkIfExpressionRefinesAnyParameter(func, singleReturn);
78851
+ }
78852
+ function checkIfExpressionRefinesAnyParameter(func, expr) {
78853
+ expr = skipParentheses(
78854
+ expr,
78855
+ /*excludeJSDocTypeAssertions*/
78856
+ true
78857
+ );
78858
+ const returnType = checkExpressionCached(expr);
78859
+ if (!(returnType.flags & 16 /* Boolean */))
78860
+ return void 0;
78861
+ return forEach(func.parameters, (param, i) => {
78862
+ const initType = getTypeOfSymbol(param.symbol);
78863
+ if (!initType || initType.flags & 16 /* Boolean */ || !isIdentifier(param.name) || isSymbolAssigned(param.symbol)) {
78864
+ return;
78865
+ }
78866
+ const trueType2 = checkIfExpressionRefinesParameter(func, expr, param, initType);
78867
+ if (trueType2) {
78868
+ return createTypePredicate(1 /* Identifier */, unescapeLeadingUnderscores(param.name.escapedText), i, trueType2);
78869
+ }
78870
+ });
78871
+ }
78872
+ function checkIfExpressionRefinesParameter(func, expr, param, initType) {
78873
+ const antecedent = expr.flowNode || expr.parent.kind === 253 /* ReturnStatement */ && expr.parent.flowNode || { flags: 2 /* Start */ };
78874
+ const trueCondition = {
78875
+ flags: 32 /* TrueCondition */,
78876
+ node: expr,
78877
+ antecedent
78878
+ };
78879
+ const trueType2 = getFlowTypeOfReference(param.name, initType, initType, func, trueCondition);
78880
+ if (trueType2 === initType)
78881
+ return void 0;
78882
+ const falseCondition = {
78883
+ ...trueCondition,
78884
+ flags: 64 /* FalseCondition */
78885
+ };
78886
+ const falseSubtype = getFlowTypeOfReference(param.name, trueType2, trueType2, func, falseCondition);
78887
+ return falseSubtype.flags & 131072 /* Never */ ? trueType2 : void 0;
78888
+ }
78833
78889
  function checkAllCodePathsInNonVoidFunctionReturnOrThrow(func, returnType) {
78834
78890
  addLazyDiagnostic(checkAllCodePathsInNonVoidFunctionReturnOrThrowDiagnostics);
78835
78891
  return;
@@ -84806,9 +84862,9 @@ function createTypeChecker(host) {
84806
84862
  return filter(symbol.declarations, (d) => d.kind === 263 /* ClassDeclaration */ || d.kind === 264 /* InterfaceDeclaration */);
84807
84863
  }
84808
84864
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
84809
- var _a, _b, _c, _d;
84865
+ var _a, _b, _c, _d, _e;
84810
84866
  const baseProperties = getPropertiesOfType(baseType);
84811
- let inheritedAbstractMemberNotImplementedError;
84867
+ const notImplementedInfo = /* @__PURE__ */ new Map();
84812
84868
  basePropertyCheck:
84813
84869
  for (const baseProperty of baseProperties) {
84814
84870
  const base = getTargetSymbol(baseProperty);
@@ -84834,36 +84890,11 @@ function createTypeChecker(host) {
84834
84890
  continue basePropertyCheck;
84835
84891
  }
84836
84892
  }
84837
- if (!inheritedAbstractMemberNotImplementedError) {
84838
- inheritedAbstractMemberNotImplementedError = error2(
84839
- derivedClassDecl,
84840
- Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
84841
- typeToString(type),
84842
- typeToString(baseType)
84843
- );
84844
- }
84845
- if (derivedClassDecl.kind === 231 /* ClassExpression */) {
84846
- addRelatedInfo(
84847
- inheritedAbstractMemberNotImplementedError,
84848
- createDiagnosticForNode(
84849
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
84850
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
84851
- symbolToString(baseProperty),
84852
- typeToString(baseType)
84853
- )
84854
- );
84855
- } else {
84856
- addRelatedInfo(
84857
- inheritedAbstractMemberNotImplementedError,
84858
- createDiagnosticForNode(
84859
- baseProperty.valueDeclaration ?? (baseProperty.declarations && first(baseProperty.declarations)) ?? derivedClassDecl,
84860
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
84861
- typeToString(type),
84862
- symbolToString(baseProperty),
84863
- typeToString(baseType)
84864
- )
84865
- );
84866
- }
84893
+ const baseTypeName = typeToString(baseType);
84894
+ const typeName = typeToString(type);
84895
+ const basePropertyName = symbolToString(baseProperty);
84896
+ const missedProperties = append((_a = notImplementedInfo.get(derivedClassDecl)) == null ? void 0 : _a.missedProperties, basePropertyName);
84897
+ notImplementedInfo.set(derivedClassDecl, { baseTypeName, typeName, missedProperties });
84867
84898
  }
84868
84899
  } else {
84869
84900
  const derivedDeclarationFlags = getDeclarationModifierFlagsFromSymbol(derived);
@@ -84874,7 +84905,7 @@ function createTypeChecker(host) {
84874
84905
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
84875
84906
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
84876
84907
  if (basePropertyFlags && derivedPropertyFlags) {
84877
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a = base.declarations) == null ? void 0 : _a.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_b = base.declarations) == null ? void 0 : _b.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
84908
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_b = base.declarations) == null ? void 0 : _b.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_c = base.declarations) == null ? void 0 : _c.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
84878
84909
  continue;
84879
84910
  }
84880
84911
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -84883,8 +84914,8 @@ function createTypeChecker(host) {
84883
84914
  const errorMessage2 = overriddenInstanceProperty ? Diagnostics._0_is_defined_as_an_accessor_in_class_1_but_is_overridden_here_in_2_as_an_instance_property : Diagnostics._0_is_defined_as_a_property_in_class_1_but_is_overridden_here_in_2_as_an_accessor;
84884
84915
  error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
84885
84916
  } else if (useDefineForClassFields) {
84886
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
84887
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
84917
+ const uninitialized = (_d = derived.declarations) == null ? void 0 : _d.find((d) => d.kind === 172 /* PropertyDeclaration */ && !d.initializer);
84918
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 64 /* Abstract */) && !(derivedDeclarationFlags & 64 /* Abstract */) && !((_e = derived.declarations) == null ? void 0 : _e.some((d) => !!(d.flags & 33554432 /* Ambient */)))) {
84888
84919
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
84889
84920
  const propName = uninitialized.name;
84890
84921
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -84909,6 +84940,30 @@ function createTypeChecker(host) {
84909
84940
  error2(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage, typeToString(baseType), symbolToString(base), typeToString(type));
84910
84941
  }
84911
84942
  }
84943
+ for (const [errorNode, memberInfo] of notImplementedInfo) {
84944
+ if (length(memberInfo.missedProperties) === 1) {
84945
+ if (isClassExpression(errorNode)) {
84946
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1, first(memberInfo.missedProperties), memberInfo.baseTypeName);
84947
+ } else {
84948
+ error2(errorNode, Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2, memberInfo.typeName, first(memberInfo.missedProperties), memberInfo.baseTypeName);
84949
+ }
84950
+ } else if (length(memberInfo.missedProperties) > 5) {
84951
+ const missedProperties = map(memberInfo.missedProperties.slice(0, 4), (prop) => `'${prop}'`).join(", ");
84952
+ const remainingMissedProperties = length(memberInfo.missedProperties) - 4;
84953
+ if (isClassExpression(errorNode)) {
84954
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
84955
+ } else {
84956
+ error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more, memberInfo.typeName, memberInfo.baseTypeName, missedProperties, remainingMissedProperties);
84957
+ }
84958
+ } else {
84959
+ const missedProperties = map(memberInfo.missedProperties, (prop) => `'${prop}'`).join(", ");
84960
+ if (isClassExpression(errorNode)) {
84961
+ error2(errorNode, Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1, memberInfo.baseTypeName, missedProperties);
84962
+ } else {
84963
+ error2(errorNode, Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2, memberInfo.typeName, memberInfo.baseTypeName, missedProperties);
84964
+ }
84965
+ }
84966
+ }
84912
84967
  }
84913
84968
  function isPropertyAbstractOrInterface(declaration, baseDeclarationFlags) {
84914
84969
  return baseDeclarationFlags & 64 /* Abstract */ && (!isPropertyDeclaration(declaration) || !declaration.initializer) || isInterfaceDeclaration(declaration.parent);
@@ -94287,7 +94342,7 @@ function transformTypeScript(context) {
94287
94342
  ),
94288
94343
  valueExpression
94289
94344
  );
94290
- const outerAssignment = isSyntacticallyString(valueExpression) ? innerAssignment : factory2.createAssignment(
94345
+ const outerAssignment = valueExpression.kind === 11 /* StringLiteral */ ? innerAssignment : factory2.createAssignment(
94291
94346
  factory2.createElementAccessExpression(
94292
94347
  currentNamespaceContainerName,
94293
94348
  innerAssignment
@@ -153542,7 +153597,12 @@ function getTypesPackageNameToInstall(packageName, host, diagCode) {
153542
153597
 
153543
153598
  // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
153544
153599
  var errorCodes31 = [
153545
- Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code
153600
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
153601
+ Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2.code,
153602
+ Diagnostics.Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more.code,
153603
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code,
153604
+ Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1.code,
153605
+ Diagnostics.Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more.code
153546
153606
  ];
153547
153607
  var fixId25 = "fixClassDoesntImplementInheritedAbstractMember";
153548
153608
  registerCodeFix({
@@ -175026,7 +175086,6 @@ __export(ts_exports2, {
175026
175086
  isSuperProperty: () => isSuperProperty,
175027
175087
  isSupportedSourceFileName: () => isSupportedSourceFileName,
175028
175088
  isSwitchStatement: () => isSwitchStatement,
175029
- isSyntacticallyString: () => isSyntacticallyString,
175030
175089
  isSyntaxList: () => isSyntaxList,
175031
175090
  isSyntheticExpression: () => isSyntheticExpression,
175032
175091
  isSyntheticReference: () => isSyntheticReference,
@@ -189228,7 +189287,6 @@ if (typeof console !== "undefined") {
189228
189287
  isSuperProperty,
189229
189288
  isSupportedSourceFileName,
189230
189289
  isSwitchStatement,
189231
- isSyntacticallyString,
189232
189290
  isSyntaxList,
189233
189291
  isSyntheticExpression,
189234
189292
  isSyntheticReference,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.5";
57
- var version = `${versionMajorMinor}.0-insiders.20240312`;
57
+ var version = `${versionMajorMinor}.0-insiders.20240313`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -5727,7 +5727,7 @@ var Diagnostics = {
5727
5727
  Overload_signatures_must_all_be_abstract_or_non_abstract: diag(2512, 1 /* Error */, "Overload_signatures_must_all_be_abstract_or_non_abstract_2512", "Overload signatures must all be abstract or non-abstract."),
5728
5728
  Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression: diag(2513, 1 /* Error */, "Abstract_method_0_in_class_1_cannot_be_accessed_via_super_expression_2513", "Abstract method '{0}' in class '{1}' cannot be accessed via super expression."),
5729
5729
  A_tuple_type_cannot_be_indexed_with_a_negative_value: diag(2514, 1 /* Error */, "A_tuple_type_cannot_be_indexed_with_a_negative_value_2514", "A tuple type cannot be indexed with a negative value."),
5730
- Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member '{1}' from class '{2}'."),
5730
+ Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2: diag(2515, 1 /* Error */, "Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2_2515", "Non-abstract class '{0}' does not implement inherited abstract member {1} from class '{2}'."),
5731
5731
  All_declarations_of_an_abstract_method_must_be_consecutive: diag(2516, 1 /* Error */, "All_declarations_of_an_abstract_method_must_be_consecutive_2516", "All declarations of an abstract method must be consecutive."),
5732
5732
  Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type: diag(2517, 1 /* Error */, "Cannot_assign_an_abstract_constructor_type_to_a_non_abstract_constructor_type_2517", "Cannot assign an abstract constructor type to a non-abstract constructor type."),
5733
5733
  A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard: diag(2518, 1 /* Error */, "A_this_based_type_guard_is_not_compatible_with_a_parameter_based_type_guard_2518", "A 'this'-based type guard is not compatible with a parameter-based type guard."),
@@ -5837,9 +5837,13 @@ var Diagnostics = {
5837
5837
  Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operator: diag(2638, 1 /* Error */, "Type_0_may_represent_a_primitive_value_which_is_not_permitted_as_the_right_operand_of_the_in_operato_2638", "Type '{0}' may represent a primitive value, which is not permitted as the right operand of the 'in' operator."),
5838
5838
  React_components_cannot_include_JSX_namespace_names: diag(2639, 1 /* Error */, "React_components_cannot_include_JSX_namespace_names_2639", "React components cannot include JSX namespace names"),
5839
5839
  Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity: diag(2649, 1 /* Error */, "Cannot_augment_module_0_with_value_exports_because_it_resolves_to_a_non_module_entity_2649", "Cannot augment module '{0}' with value exports because it resolves to a non-module entity."),
5840
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and_2_more: diag(2650, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_and__2650", "Non-abstract class expression is missing implementations for the following members of '{0}': {1} and {2} more."),
5840
5841
  A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_members_defined_in_other_enums: diag(2651, 1 /* Error */, "A_member_initializer_in_a_enum_declaration_cannot_reference_members_declared_after_it_including_memb_2651", "A member initializer in a enum declaration cannot reference members declared after it, including members defined in other enums."),
5841
5842
  Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_default_0_declaration_instead: diag(2652, 1 /* Error */, "Merged_declaration_0_cannot_include_a_default_export_declaration_Consider_adding_a_separate_export_d_2652", "Merged declaration '{0}' cannot include a default export declaration. Consider adding a separate 'export default {0}' declaration instead."),
5842
5843
  Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1: diag(2653, 1 /* Error */, "Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1_2653", "Non-abstract class expression does not implement inherited abstract member '{0}' from class '{1}'."),
5844
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2: diag(2654, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_2654", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2}."),
5845
+ Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more: diag(2655, 1 /* Error */, "Non_abstract_class_0_is_missing_implementations_for_the_following_members_of_1_Colon_2_and_3_more_2655", "Non-abstract class '{0}' is missing implementations for the following members of '{1}': {2} and {3} more."),
5846
+ Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1: diag(2656, 1 /* Error */, "Non_abstract_class_expression_is_missing_implementations_for_the_following_members_of_0_Colon_1_2656", "Non-abstract class expression is missing implementations for the following members of '{0}': {1}."),
5843
5847
  JSX_expressions_must_have_one_parent_element: diag(2657, 1 /* Error */, "JSX_expressions_must_have_one_parent_element_2657", "JSX expressions must have one parent element."),
5844
5848
  Type_0_provides_no_match_for_the_signature_1: diag(2658, 1 /* Error */, "Type_0_provides_no_match_for_the_signature_1_2658", "Type '{0}' provides no match for the signature '{1}'."),
5845
5849
  super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_higher: diag(2659, 1 /* Error */, "super_is_only_allowed_in_members_of_object_literal_expressions_when_option_target_is_ES2015_or_highe_2659", "'super' is only allowed in members of object literal expressions when option 'target' is 'ES2015' or higher."),
@@ -7168,7 +7172,6 @@ var Diagnostics = {
7168
7172
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
7169
7173
  The_value_0_cannot_be_used_here: diag(18050, 1 /* Error */, "The_value_0_cannot_be_used_here_18050", "The value '{0}' cannot be used here."),
7170
7174
  Compiler_option_0_cannot_be_given_an_empty_string: diag(18051, 1 /* Error */, "Compiler_option_0_cannot_be_given_an_empty_string_18051", "Compiler option '{0}' cannot be given an empty string."),
7171
- Non_abstract_class_0_does_not_implement_all_abstract_members_of_1: diag(18052, 1 /* Error */, "Non_abstract_class_0_does_not_implement_all_abstract_members_of_1_18052", "Non-abstract class '{0}' does not implement all abstract members of '{1}'"),
7172
7175
  Its_type_0_is_not_a_valid_JSX_element_type: diag(18053, 1 /* Error */, "Its_type_0_is_not_a_valid_JSX_element_type_18053", "Its type '{0}' is not a valid JSX element type."),
7173
7176
  await_using_statements_cannot_be_used_inside_a_class_static_block: diag(18054, 1 /* Error */, "await_using_statements_cannot_be_used_inside_a_class_static_block_18054", "'await using' statements cannot be used inside a class static block.")
7174
7177
  };
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.5.0-pr-57686-4",
5
+ "version": "5.5.0-pr-57465-98",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -113,5 +113,5 @@
113
113
  "node": "20.1.0",
114
114
  "npm": "8.19.4"
115
115
  },
116
- "gitHead": "1553ea578452313298576241b0e1c059813925f0"
116
+ "gitHead": "c0c939be2bdda627479aa744de8043520d4a959a"
117
117
  }