typescript 5.1.0-dev.20230328 → 5.1.0-dev.20230330

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.1";
21
- var version = `${versionMajorMinor}.0-dev.20230328`;
21
+ var version = `${versionMajorMinor}.0-dev.20230330`;
22
22
 
23
23
  // src/compiler/core.ts
24
24
  var emptyArray = [];
@@ -7740,7 +7740,8 @@ var Diagnostics = {
7740
7740
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
7741
7741
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
7742
7742
  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."),
7743
- 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.")
7743
+ 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."),
7744
+ 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}'")
7744
7745
  };
7745
7746
 
7746
7747
  // src/compiler/scanner.ts
@@ -78206,8 +78207,9 @@ function createTypeChecker(host) {
78206
78207
  return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */);
78207
78208
  }
78208
78209
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
78209
- var _a2, _b, _c, _d;
78210
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
78210
78211
  const baseProperties = getPropertiesOfType(baseType);
78212
+ let inheritedAbstractMemberNotImplementedError;
78211
78213
  basePropertyCheck:
78212
78214
  for (const baseProperty of baseProperties) {
78213
78215
  const base = getTargetSymbol(baseProperty);
@@ -78233,20 +78235,34 @@ function createTypeChecker(host) {
78233
78235
  continue basePropertyCheck;
78234
78236
  }
78235
78237
  }
78236
- if (derivedClassDecl.kind === 229 /* ClassExpression */) {
78237
- error(
78238
+ if (!inheritedAbstractMemberNotImplementedError) {
78239
+ inheritedAbstractMemberNotImplementedError = error(
78238
78240
  derivedClassDecl,
78239
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
78240
- symbolToString(baseProperty),
78241
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
78242
+ typeToString(type),
78241
78243
  typeToString(baseType)
78242
78244
  );
78245
+ }
78246
+ if (derivedClassDecl.kind === 229 /* ClassExpression */) {
78247
+ addRelatedInfo(
78248
+ inheritedAbstractMemberNotImplementedError,
78249
+ createDiagnosticForNode(
78250
+ (_b = (_a2 = baseProperty.valueDeclaration) != null ? _a2 : baseProperty.declarations && first(baseProperty.declarations)) != null ? _b : derivedClassDecl,
78251
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
78252
+ symbolToString(baseProperty),
78253
+ typeToString(baseType)
78254
+ )
78255
+ );
78243
78256
  } else {
78244
- error(
78245
- derivedClassDecl,
78246
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
78247
- typeToString(type),
78248
- symbolToString(baseProperty),
78249
- typeToString(baseType)
78257
+ addRelatedInfo(
78258
+ inheritedAbstractMemberNotImplementedError,
78259
+ createDiagnosticForNode(
78260
+ (_d = (_c = baseProperty.valueDeclaration) != null ? _c : baseProperty.declarations && first(baseProperty.declarations)) != null ? _d : derivedClassDecl,
78261
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
78262
+ typeToString(type),
78263
+ symbolToString(baseProperty),
78264
+ typeToString(baseType)
78265
+ )
78250
78266
  );
78251
78267
  }
78252
78268
  }
@@ -78259,7 +78275,7 @@ function createTypeChecker(host) {
78259
78275
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
78260
78276
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
78261
78277
  if (basePropertyFlags && derivedPropertyFlags) {
78262
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a2 = base.declarations) == null ? void 0 : _a2.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)) {
78278
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_e = base.declarations) == null ? void 0 : _e.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_f = base.declarations) == null ? void 0 : _f.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
78263
78279
  continue;
78264
78280
  }
78265
78281
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -78268,8 +78284,8 @@ function createTypeChecker(host) {
78268
78284
  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;
78269
78285
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
78270
78286
  } else if (useDefineForClassFields) {
78271
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
78272
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
78287
+ const uninitialized = (_g = derived.declarations) == null ? void 0 : _g.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
78288
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_h = derived.declarations) == null ? void 0 : _h.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
78273
78289
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
78274
78290
  const propName = uninitialized.name;
78275
78291
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -88380,16 +88396,17 @@ function transformClassFields(context) {
88380
88396
  if (isAssignmentExpression(node)) {
88381
88397
  if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {
88382
88398
  const assignedName = getAssignedNameOfIdentifier(node.left, node.right);
88383
- const left = visitNode(node.left, visitor, isExpression);
88399
+ const left2 = visitNode(node.left, visitor, isExpression);
88384
88400
  const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression);
88385
- return factory2.updateBinaryExpression(node, left, node.operatorToken, right);
88401
+ return factory2.updateBinaryExpression(node, left2, node.operatorToken, right);
88386
88402
  }
88387
- if (isPrivateIdentifierPropertyAccessExpression(node.left)) {
88388
- const info = accessPrivateIdentifier2(node.left.name);
88403
+ const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */);
88404
+ if (isPrivateIdentifierPropertyAccessExpression(left)) {
88405
+ const info = accessPrivateIdentifier2(left.name);
88389
88406
  if (info) {
88390
88407
  return setTextRange(
88391
88408
  setOriginalNode(
88392
- createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind),
88409
+ createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind),
88393
88410
  node
88394
88411
  ),
88395
88412
  node
package/lib/tsserver.js CHANGED
@@ -2286,7 +2286,7 @@ module.exports = __toCommonJS(server_exports);
2286
2286
 
2287
2287
  // src/compiler/corePublic.ts
2288
2288
  var versionMajorMinor = "5.1";
2289
- var version = `${versionMajorMinor}.0-dev.20230328`;
2289
+ var version = `${versionMajorMinor}.0-dev.20230330`;
2290
2290
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2291
2291
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2292
2292
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -11233,7 +11233,8 @@ var Diagnostics = {
11233
11233
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
11234
11234
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
11235
11235
  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."),
11236
- 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.")
11236
+ 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."),
11237
+ 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}'")
11237
11238
  };
11238
11239
 
11239
11240
  // src/compiler/scanner.ts
@@ -82848,8 +82849,9 @@ function createTypeChecker(host) {
82848
82849
  return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */);
82849
82850
  }
82850
82851
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
82851
- var _a2, _b, _c, _d;
82852
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
82852
82853
  const baseProperties = getPropertiesOfType(baseType);
82854
+ let inheritedAbstractMemberNotImplementedError;
82853
82855
  basePropertyCheck:
82854
82856
  for (const baseProperty of baseProperties) {
82855
82857
  const base = getTargetSymbol(baseProperty);
@@ -82875,20 +82877,34 @@ function createTypeChecker(host) {
82875
82877
  continue basePropertyCheck;
82876
82878
  }
82877
82879
  }
82878
- if (derivedClassDecl.kind === 229 /* ClassExpression */) {
82879
- error(
82880
+ if (!inheritedAbstractMemberNotImplementedError) {
82881
+ inheritedAbstractMemberNotImplementedError = error(
82880
82882
  derivedClassDecl,
82881
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
82882
- symbolToString(baseProperty),
82883
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
82884
+ typeToString(type),
82883
82885
  typeToString(baseType)
82884
82886
  );
82887
+ }
82888
+ if (derivedClassDecl.kind === 229 /* ClassExpression */) {
82889
+ addRelatedInfo(
82890
+ inheritedAbstractMemberNotImplementedError,
82891
+ createDiagnosticForNode(
82892
+ (_b = (_a2 = baseProperty.valueDeclaration) != null ? _a2 : baseProperty.declarations && first(baseProperty.declarations)) != null ? _b : derivedClassDecl,
82893
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
82894
+ symbolToString(baseProperty),
82895
+ typeToString(baseType)
82896
+ )
82897
+ );
82885
82898
  } else {
82886
- error(
82887
- derivedClassDecl,
82888
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
82889
- typeToString(type),
82890
- symbolToString(baseProperty),
82891
- typeToString(baseType)
82899
+ addRelatedInfo(
82900
+ inheritedAbstractMemberNotImplementedError,
82901
+ createDiagnosticForNode(
82902
+ (_d = (_c = baseProperty.valueDeclaration) != null ? _c : baseProperty.declarations && first(baseProperty.declarations)) != null ? _d : derivedClassDecl,
82903
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
82904
+ typeToString(type),
82905
+ symbolToString(baseProperty),
82906
+ typeToString(baseType)
82907
+ )
82892
82908
  );
82893
82909
  }
82894
82910
  }
@@ -82901,7 +82917,7 @@ function createTypeChecker(host) {
82901
82917
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
82902
82918
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
82903
82919
  if (basePropertyFlags && derivedPropertyFlags) {
82904
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a2 = base.declarations) == null ? void 0 : _a2.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)) {
82920
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_e = base.declarations) == null ? void 0 : _e.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_f = base.declarations) == null ? void 0 : _f.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
82905
82921
  continue;
82906
82922
  }
82907
82923
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -82910,8 +82926,8 @@ function createTypeChecker(host) {
82910
82926
  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;
82911
82927
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
82912
82928
  } else if (useDefineForClassFields) {
82913
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
82914
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
82929
+ const uninitialized = (_g = derived.declarations) == null ? void 0 : _g.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
82930
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_h = derived.declarations) == null ? void 0 : _h.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
82915
82931
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
82916
82932
  const propName = uninitialized.name;
82917
82933
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -93193,16 +93209,17 @@ function transformClassFields(context) {
93193
93209
  if (isAssignmentExpression(node)) {
93194
93210
  if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {
93195
93211
  const assignedName = getAssignedNameOfIdentifier(node.left, node.right);
93196
- const left = visitNode(node.left, visitor, isExpression);
93212
+ const left2 = visitNode(node.left, visitor, isExpression);
93197
93213
  const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression);
93198
- return factory2.updateBinaryExpression(node, left, node.operatorToken, right);
93214
+ return factory2.updateBinaryExpression(node, left2, node.operatorToken, right);
93199
93215
  }
93200
- if (isPrivateIdentifierPropertyAccessExpression(node.left)) {
93201
- const info = accessPrivateIdentifier2(node.left.name);
93216
+ const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */);
93217
+ if (isPrivateIdentifierPropertyAccessExpression(left)) {
93218
+ const info = accessPrivateIdentifier2(left.name);
93202
93219
  if (info) {
93203
93220
  return setTextRange(
93204
93221
  setOriginalNode(
93205
- createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind),
93222
+ createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind),
93206
93223
  node
93207
93224
  ),
93208
93225
  node
@@ -144828,8 +144845,7 @@ function getTypesPackageNameToInstall(packageName, host, diagCode) {
144828
144845
 
144829
144846
  // src/services/codefixes/fixClassDoesntImplementInheritedAbstractMember.ts
144830
144847
  var errorCodes30 = [
144831
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
144832
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code
144848
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code
144833
144849
  ];
144834
144850
  var fixId25 = "fixClassDoesntImplementInheritedAbstractMember";
144835
144851
  registerCodeFix({
@@ -152475,34 +152491,10 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck
152475
152491
  switch (parent2.kind) {
152476
152492
  case 199 /* LiteralType */: {
152477
152493
  const grandParent = walkUpParentheses(parent2.parent);
152478
- switch (grandParent.kind) {
152479
- case 231 /* ExpressionWithTypeArguments */:
152480
- case 181 /* TypeReference */: {
152481
- const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
152482
- if (typeArgument) {
152483
- return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
152484
- }
152485
- return void 0;
152486
- }
152487
- case 197 /* IndexedAccessType */:
152488
- const { indexType, objectType } = grandParent;
152489
- if (!rangeContainsPosition(indexType, position)) {
152490
- return void 0;
152491
- }
152492
- return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
152493
- case 203 /* ImportType */:
152494
- return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
152495
- case 190 /* UnionType */: {
152496
- if (!isTypeReferenceNode(grandParent.parent)) {
152497
- return void 0;
152498
- }
152499
- const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
152500
- const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent)).filter((t) => !contains(alreadyUsedTypes, t.value));
152501
- return { kind: 2 /* Types */, types, isNewIdentifier: false };
152502
- }
152503
- default:
152504
- return void 0;
152494
+ if (grandParent.kind === 203 /* ImportType */) {
152495
+ return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
152505
152496
  }
152497
+ return fromUnionableLiteralType(grandParent);
152506
152498
  }
152507
152499
  case 300 /* PropertyAssignment */:
152508
152500
  if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) {
@@ -152538,6 +152530,37 @@ function getStringLiteralCompletionEntries(sourceFile, node, position, typeCheck
152538
152530
  default:
152539
152531
  return fromContextualType() || fromContextualType(0 /* None */);
152540
152532
  }
152533
+ function fromUnionableLiteralType(grandParent) {
152534
+ switch (grandParent.kind) {
152535
+ case 231 /* ExpressionWithTypeArguments */:
152536
+ case 181 /* TypeReference */: {
152537
+ const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
152538
+ if (typeArgument) {
152539
+ return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
152540
+ }
152541
+ return void 0;
152542
+ }
152543
+ case 197 /* IndexedAccessType */:
152544
+ const { indexType, objectType } = grandParent;
152545
+ if (!rangeContainsPosition(indexType, position)) {
152546
+ return void 0;
152547
+ }
152548
+ return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
152549
+ case 190 /* UnionType */: {
152550
+ const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));
152551
+ if (!result) {
152552
+ return void 0;
152553
+ }
152554
+ const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
152555
+ if (result.kind === 1 /* Properties */) {
152556
+ return { kind: 1 /* Properties */, symbols: result.symbols.filter((sym) => !contains(alreadyUsedTypes, sym.name)), hasIndexSignature: result.hasIndexSignature };
152557
+ }
152558
+ return { kind: 2 /* Types */, types: result.types.filter((t) => !contains(alreadyUsedTypes, t.value)), isNewIdentifier: false };
152559
+ }
152560
+ default:
152561
+ return void 0;
152562
+ }
152563
+ }
152541
152564
  function fromContextualType(contextFlags = 4 /* Completions */) {
152542
152565
  const types = getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker, contextFlags));
152543
152566
  if (!types.length) {
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-dev.20230328`;
38
+ version = `${versionMajorMinor}.0-dev.20230330`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9056,7 +9056,8 @@ ${lanes.join("\n")}
9056
9056
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
9057
9057
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
9058
9058
  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."),
9059
- 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.")
9059
+ 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."),
9060
+ 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}'")
9060
9061
  };
9061
9062
  }
9062
9063
  });
@@ -80656,8 +80657,9 @@ ${lanes.join("\n")}
80656
80657
  return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */);
80657
80658
  }
80658
80659
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
80659
- var _a2, _b, _c, _d;
80660
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
80660
80661
  const baseProperties = getPropertiesOfType(baseType);
80662
+ let inheritedAbstractMemberNotImplementedError;
80661
80663
  basePropertyCheck:
80662
80664
  for (const baseProperty of baseProperties) {
80663
80665
  const base = getTargetSymbol(baseProperty);
@@ -80683,20 +80685,34 @@ ${lanes.join("\n")}
80683
80685
  continue basePropertyCheck;
80684
80686
  }
80685
80687
  }
80686
- if (derivedClassDecl.kind === 229 /* ClassExpression */) {
80687
- error(
80688
+ if (!inheritedAbstractMemberNotImplementedError) {
80689
+ inheritedAbstractMemberNotImplementedError = error(
80688
80690
  derivedClassDecl,
80689
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
80690
- symbolToString(baseProperty),
80691
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
80692
+ typeToString(type),
80691
80693
  typeToString(baseType)
80692
80694
  );
80695
+ }
80696
+ if (derivedClassDecl.kind === 229 /* ClassExpression */) {
80697
+ addRelatedInfo(
80698
+ inheritedAbstractMemberNotImplementedError,
80699
+ createDiagnosticForNode(
80700
+ (_b = (_a2 = baseProperty.valueDeclaration) != null ? _a2 : baseProperty.declarations && first(baseProperty.declarations)) != null ? _b : derivedClassDecl,
80701
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
80702
+ symbolToString(baseProperty),
80703
+ typeToString(baseType)
80704
+ )
80705
+ );
80693
80706
  } else {
80694
- error(
80695
- derivedClassDecl,
80696
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
80697
- typeToString(type),
80698
- symbolToString(baseProperty),
80699
- typeToString(baseType)
80707
+ addRelatedInfo(
80708
+ inheritedAbstractMemberNotImplementedError,
80709
+ createDiagnosticForNode(
80710
+ (_d = (_c = baseProperty.valueDeclaration) != null ? _c : baseProperty.declarations && first(baseProperty.declarations)) != null ? _d : derivedClassDecl,
80711
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
80712
+ typeToString(type),
80713
+ symbolToString(baseProperty),
80714
+ typeToString(baseType)
80715
+ )
80700
80716
  );
80701
80717
  }
80702
80718
  }
@@ -80709,7 +80725,7 @@ ${lanes.join("\n")}
80709
80725
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
80710
80726
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
80711
80727
  if (basePropertyFlags && derivedPropertyFlags) {
80712
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a2 = base.declarations) == null ? void 0 : _a2.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)) {
80728
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_e = base.declarations) == null ? void 0 : _e.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_f = base.declarations) == null ? void 0 : _f.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
80713
80729
  continue;
80714
80730
  }
80715
80731
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -80718,8 +80734,8 @@ ${lanes.join("\n")}
80718
80734
  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;
80719
80735
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
80720
80736
  } else if (useDefineForClassFields) {
80721
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
80722
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
80737
+ const uninitialized = (_g = derived.declarations) == null ? void 0 : _g.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
80738
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_h = derived.declarations) == null ? void 0 : _h.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
80723
80739
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
80724
80740
  const propName = uninitialized.name;
80725
80741
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -91176,16 +91192,17 @@ ${lanes.join("\n")}
91176
91192
  if (isAssignmentExpression(node)) {
91177
91193
  if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {
91178
91194
  const assignedName = getAssignedNameOfIdentifier(node.left, node.right);
91179
- const left = visitNode(node.left, visitor, isExpression);
91195
+ const left2 = visitNode(node.left, visitor, isExpression);
91180
91196
  const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression);
91181
- return factory2.updateBinaryExpression(node, left, node.operatorToken, right);
91197
+ return factory2.updateBinaryExpression(node, left2, node.operatorToken, right);
91182
91198
  }
91183
- if (isPrivateIdentifierPropertyAccessExpression(node.left)) {
91184
- const info = accessPrivateIdentifier2(node.left.name);
91199
+ const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */);
91200
+ if (isPrivateIdentifierPropertyAccessExpression(left)) {
91201
+ const info = accessPrivateIdentifier2(left.name);
91185
91202
  if (info) {
91186
91203
  return setTextRange(
91187
91204
  setOriginalNode(
91188
- createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind),
91205
+ createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind),
91189
91206
  node
91190
91207
  ),
91191
91208
  node
@@ -143551,8 +143568,7 @@ ${lanes.join("\n")}
143551
143568
  init_ts4();
143552
143569
  init_ts_codefix();
143553
143570
  errorCodes30 = [
143554
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
143555
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code
143571
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code
143556
143572
  ];
143557
143573
  fixId25 = "fixClassDoesntImplementInheritedAbstractMember";
143558
143574
  registerCodeFix({
@@ -151572,34 +151588,10 @@ ${lanes.join("\n")}
151572
151588
  switch (parent2.kind) {
151573
151589
  case 199 /* LiteralType */: {
151574
151590
  const grandParent = walkUpParentheses(parent2.parent);
151575
- switch (grandParent.kind) {
151576
- case 231 /* ExpressionWithTypeArguments */:
151577
- case 181 /* TypeReference */: {
151578
- const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
151579
- if (typeArgument) {
151580
- return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
151581
- }
151582
- return void 0;
151583
- }
151584
- case 197 /* IndexedAccessType */:
151585
- const { indexType, objectType } = grandParent;
151586
- if (!rangeContainsPosition(indexType, position)) {
151587
- return void 0;
151588
- }
151589
- return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
151590
- case 203 /* ImportType */:
151591
- return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
151592
- case 190 /* UnionType */: {
151593
- if (!isTypeReferenceNode(grandParent.parent)) {
151594
- return void 0;
151595
- }
151596
- const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
151597
- const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent)).filter((t) => !contains(alreadyUsedTypes, t.value));
151598
- return { kind: 2 /* Types */, types, isNewIdentifier: false };
151599
- }
151600
- default:
151601
- return void 0;
151591
+ if (grandParent.kind === 203 /* ImportType */) {
151592
+ return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
151602
151593
  }
151594
+ return fromUnionableLiteralType(grandParent);
151603
151595
  }
151604
151596
  case 300 /* PropertyAssignment */:
151605
151597
  if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) {
@@ -151635,6 +151627,37 @@ ${lanes.join("\n")}
151635
151627
  default:
151636
151628
  return fromContextualType() || fromContextualType(0 /* None */);
151637
151629
  }
151630
+ function fromUnionableLiteralType(grandParent) {
151631
+ switch (grandParent.kind) {
151632
+ case 231 /* ExpressionWithTypeArguments */:
151633
+ case 181 /* TypeReference */: {
151634
+ const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
151635
+ if (typeArgument) {
151636
+ return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
151637
+ }
151638
+ return void 0;
151639
+ }
151640
+ case 197 /* IndexedAccessType */:
151641
+ const { indexType, objectType } = grandParent;
151642
+ if (!rangeContainsPosition(indexType, position)) {
151643
+ return void 0;
151644
+ }
151645
+ return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
151646
+ case 190 /* UnionType */: {
151647
+ const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));
151648
+ if (!result) {
151649
+ return void 0;
151650
+ }
151651
+ const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
151652
+ if (result.kind === 1 /* Properties */) {
151653
+ return { kind: 1 /* Properties */, symbols: result.symbols.filter((sym) => !contains(alreadyUsedTypes, sym.name)), hasIndexSignature: result.hasIndexSignature };
151654
+ }
151655
+ return { kind: 2 /* Types */, types: result.types.filter((t) => !contains(alreadyUsedTypes, t.value)), isNewIdentifier: false };
151656
+ }
151657
+ default:
151658
+ return void 0;
151659
+ }
151660
+ }
151638
151661
  function fromContextualType(contextFlags = 4 /* Completions */) {
151639
151662
  const types = getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker, contextFlags));
151640
151663
  if (!types.length) {
package/lib/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.1";
38
- version = `${versionMajorMinor}.0-dev.20230328`;
38
+ version = `${versionMajorMinor}.0-dev.20230330`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -9056,7 +9056,8 @@ ${lanes.join("\n")}
9056
9056
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
9057
9057
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
9058
9058
  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."),
9059
- 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.")
9059
+ 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."),
9060
+ 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}'")
9060
9061
  };
9061
9062
  }
9062
9063
  });
@@ -80656,8 +80657,9 @@ ${lanes.join("\n")}
80656
80657
  return filter(symbol.declarations, (d) => d.kind === 261 /* ClassDeclaration */ || d.kind === 262 /* InterfaceDeclaration */);
80657
80658
  }
80658
80659
  function checkKindsOfPropertyMemberOverrides(type, baseType) {
80659
- var _a2, _b, _c, _d;
80660
+ var _a2, _b, _c, _d, _e, _f, _g, _h;
80660
80661
  const baseProperties = getPropertiesOfType(baseType);
80662
+ let inheritedAbstractMemberNotImplementedError;
80661
80663
  basePropertyCheck:
80662
80664
  for (const baseProperty of baseProperties) {
80663
80665
  const base = getTargetSymbol(baseProperty);
@@ -80683,20 +80685,34 @@ ${lanes.join("\n")}
80683
80685
  continue basePropertyCheck;
80684
80686
  }
80685
80687
  }
80686
- if (derivedClassDecl.kind === 229 /* ClassExpression */) {
80687
- error(
80688
+ if (!inheritedAbstractMemberNotImplementedError) {
80689
+ inheritedAbstractMemberNotImplementedError = error(
80688
80690
  derivedClassDecl,
80689
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
80690
- symbolToString(baseProperty),
80691
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1,
80692
+ typeToString(type),
80691
80693
  typeToString(baseType)
80692
80694
  );
80695
+ }
80696
+ if (derivedClassDecl.kind === 229 /* ClassExpression */) {
80697
+ addRelatedInfo(
80698
+ inheritedAbstractMemberNotImplementedError,
80699
+ createDiagnosticForNode(
80700
+ (_b = (_a2 = baseProperty.valueDeclaration) != null ? _a2 : baseProperty.declarations && first(baseProperty.declarations)) != null ? _b : derivedClassDecl,
80701
+ Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1,
80702
+ symbolToString(baseProperty),
80703
+ typeToString(baseType)
80704
+ )
80705
+ );
80693
80706
  } else {
80694
- error(
80695
- derivedClassDecl,
80696
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
80697
- typeToString(type),
80698
- symbolToString(baseProperty),
80699
- typeToString(baseType)
80707
+ addRelatedInfo(
80708
+ inheritedAbstractMemberNotImplementedError,
80709
+ createDiagnosticForNode(
80710
+ (_d = (_c = baseProperty.valueDeclaration) != null ? _c : baseProperty.declarations && first(baseProperty.declarations)) != null ? _d : derivedClassDecl,
80711
+ Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2,
80712
+ typeToString(type),
80713
+ symbolToString(baseProperty),
80714
+ typeToString(baseType)
80715
+ )
80700
80716
  );
80701
80717
  }
80702
80718
  }
@@ -80709,7 +80725,7 @@ ${lanes.join("\n")}
80709
80725
  const basePropertyFlags = base.flags & 98308 /* PropertyOrAccessor */;
80710
80726
  const derivedPropertyFlags = derived.flags & 98308 /* PropertyOrAccessor */;
80711
80727
  if (basePropertyFlags && derivedPropertyFlags) {
80712
- if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_a2 = base.declarations) == null ? void 0 : _a2.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)) {
80728
+ if ((getCheckFlags(base) & 6 /* Synthetic */ ? (_e = base.declarations) == null ? void 0 : _e.some((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags)) : (_f = base.declarations) == null ? void 0 : _f.every((d) => isPropertyAbstractOrInterface(d, baseDeclarationFlags))) || getCheckFlags(base) & 262144 /* Mapped */ || derived.valueDeclaration && isBinaryExpression(derived.valueDeclaration)) {
80713
80729
  continue;
80714
80730
  }
80715
80731
  const overriddenInstanceProperty = basePropertyFlags !== 4 /* Property */ && derivedPropertyFlags === 4 /* Property */;
@@ -80718,8 +80734,8 @@ ${lanes.join("\n")}
80718
80734
  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;
80719
80735
  error(getNameOfDeclaration(derived.valueDeclaration) || derived.valueDeclaration, errorMessage2, symbolToString(base), typeToString(baseType), typeToString(type));
80720
80736
  } else if (useDefineForClassFields) {
80721
- const uninitialized = (_c = derived.declarations) == null ? void 0 : _c.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
80722
- if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_d = derived.declarations) == null ? void 0 : _d.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
80737
+ const uninitialized = (_g = derived.declarations) == null ? void 0 : _g.find((d) => d.kind === 170 /* PropertyDeclaration */ && !d.initializer);
80738
+ if (uninitialized && !(derived.flags & 33554432 /* Transient */) && !(baseDeclarationFlags & 256 /* Abstract */) && !(derivedDeclarationFlags & 256 /* Abstract */) && !((_h = derived.declarations) == null ? void 0 : _h.some((d) => !!(d.flags & 16777216 /* Ambient */)))) {
80723
80739
  const constructor = findConstructorDeclaration(getClassLikeDeclarationOfSymbol(type.symbol));
80724
80740
  const propName = uninitialized.name;
80725
80741
  if (uninitialized.exclamationToken || !constructor || !isIdentifier(propName) || !strictNullChecks || !isPropertyInitializedInConstructor(propName, type, constructor)) {
@@ -91176,16 +91192,17 @@ ${lanes.join("\n")}
91176
91192
  if (isAssignmentExpression(node)) {
91177
91193
  if (isNamedEvaluation(node, isAnonymousClassNeedingAssignedName)) {
91178
91194
  const assignedName = getAssignedNameOfIdentifier(node.left, node.right);
91179
- const left = visitNode(node.left, visitor, isExpression);
91195
+ const left2 = visitNode(node.left, visitor, isExpression);
91180
91196
  const right = visitNode(node.right, (node2) => namedEvaluationVisitor(node2, assignedName), isExpression);
91181
- return factory2.updateBinaryExpression(node, left, node.operatorToken, right);
91197
+ return factory2.updateBinaryExpression(node, left2, node.operatorToken, right);
91182
91198
  }
91183
- if (isPrivateIdentifierPropertyAccessExpression(node.left)) {
91184
- const info = accessPrivateIdentifier2(node.left.name);
91199
+ const left = skipOuterExpressions(node.left, 8 /* PartiallyEmittedExpressions */ | 1 /* Parentheses */);
91200
+ if (isPrivateIdentifierPropertyAccessExpression(left)) {
91201
+ const info = accessPrivateIdentifier2(left.name);
91185
91202
  if (info) {
91186
91203
  return setTextRange(
91187
91204
  setOriginalNode(
91188
- createPrivateIdentifierAssignment(info, node.left.expression, node.right, node.operatorToken.kind),
91205
+ createPrivateIdentifierAssignment(info, left.expression, node.right, node.operatorToken.kind),
91189
91206
  node
91190
91207
  ),
91191
91208
  node
@@ -143565,8 +143582,7 @@ ${lanes.join("\n")}
143565
143582
  init_ts4();
143566
143583
  init_ts_codefix();
143567
143584
  errorCodes30 = [
143568
- Diagnostics.Non_abstract_class_0_does_not_implement_inherited_abstract_member_1_from_class_2.code,
143569
- Diagnostics.Non_abstract_class_expression_does_not_implement_inherited_abstract_member_0_from_class_1.code
143585
+ Diagnostics.Non_abstract_class_0_does_not_implement_all_abstract_members_of_1.code
143570
143586
  ];
143571
143587
  fixId25 = "fixClassDoesntImplementInheritedAbstractMember";
143572
143588
  registerCodeFix({
@@ -151586,34 +151602,10 @@ ${lanes.join("\n")}
151586
151602
  switch (parent2.kind) {
151587
151603
  case 199 /* LiteralType */: {
151588
151604
  const grandParent = walkUpParentheses(parent2.parent);
151589
- switch (grandParent.kind) {
151590
- case 231 /* ExpressionWithTypeArguments */:
151591
- case 181 /* TypeReference */: {
151592
- const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
151593
- if (typeArgument) {
151594
- return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
151595
- }
151596
- return void 0;
151597
- }
151598
- case 197 /* IndexedAccessType */:
151599
- const { indexType, objectType } = grandParent;
151600
- if (!rangeContainsPosition(indexType, position)) {
151601
- return void 0;
151602
- }
151603
- return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
151604
- case 203 /* ImportType */:
151605
- return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
151606
- case 190 /* UnionType */: {
151607
- if (!isTypeReferenceNode(grandParent.parent)) {
151608
- return void 0;
151609
- }
151610
- const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
151611
- const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent)).filter((t) => !contains(alreadyUsedTypes, t.value));
151612
- return { kind: 2 /* Types */, types, isNewIdentifier: false };
151613
- }
151614
- default:
151615
- return void 0;
151605
+ if (grandParent.kind === 203 /* ImportType */) {
151606
+ return { kind: 0 /* Paths */, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker, preferences) };
151616
151607
  }
151608
+ return fromUnionableLiteralType(grandParent);
151617
151609
  }
151618
151610
  case 300 /* PropertyAssignment */:
151619
151611
  if (isObjectLiteralExpression(parent2.parent) && parent2.name === node) {
@@ -151649,6 +151641,37 @@ ${lanes.join("\n")}
151649
151641
  default:
151650
151642
  return fromContextualType() || fromContextualType(0 /* None */);
151651
151643
  }
151644
+ function fromUnionableLiteralType(grandParent) {
151645
+ switch (grandParent.kind) {
151646
+ case 231 /* ExpressionWithTypeArguments */:
151647
+ case 181 /* TypeReference */: {
151648
+ const typeArgument = findAncestor(parent2, (n) => n.parent === grandParent);
151649
+ if (typeArgument) {
151650
+ return { kind: 2 /* Types */, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false };
151651
+ }
151652
+ return void 0;
151653
+ }
151654
+ case 197 /* IndexedAccessType */:
151655
+ const { indexType, objectType } = grandParent;
151656
+ if (!rangeContainsPosition(indexType, position)) {
151657
+ return void 0;
151658
+ }
151659
+ return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType));
151660
+ case 190 /* UnionType */: {
151661
+ const result = fromUnionableLiteralType(walkUpParentheses(grandParent.parent));
151662
+ if (!result) {
151663
+ return void 0;
151664
+ }
151665
+ const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent, parent2);
151666
+ if (result.kind === 1 /* Properties */) {
151667
+ return { kind: 1 /* Properties */, symbols: result.symbols.filter((sym) => !contains(alreadyUsedTypes, sym.name)), hasIndexSignature: result.hasIndexSignature };
151668
+ }
151669
+ return { kind: 2 /* Types */, types: result.types.filter((t) => !contains(alreadyUsedTypes, t.value)), isNewIdentifier: false };
151670
+ }
151671
+ default:
151672
+ return void 0;
151673
+ }
151674
+ }
151652
151675
  function fromContextualType(contextFlags = 4 /* Completions */) {
151653
151676
  const types = getStringLiteralTypes(getContextualTypeFromParent(node, typeChecker, contextFlags));
151654
151677
  if (!types.length) {
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.1";
57
- var version = `${versionMajorMinor}.0-dev.20230328`;
57
+ var version = `${versionMajorMinor}.0-dev.20230330`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -7120,7 +7120,8 @@ var Diagnostics = {
7120
7120
  _0_is_possibly_undefined: diag(18048, 1 /* Error */, "_0_is_possibly_undefined_18048", "'{0}' is possibly 'undefined'."),
7121
7121
  _0_is_possibly_null_or_undefined: diag(18049, 1 /* Error */, "_0_is_possibly_null_or_undefined_18049", "'{0}' is possibly 'null' or 'undefined'."),
7122
7122
  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."),
7123
- 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.")
7123
+ 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."),
7124
+ 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}'")
7124
7125
  };
7125
7126
 
7126
7127
  // src/compiler/scanner.ts
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.1.0-dev.20230328",
5
+ "version": "5.1.0-dev.20230330",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [
@@ -54,7 +54,7 @@
54
54
  "@typescript-eslint/eslint-plugin": "^5.33.1",
55
55
  "@typescript-eslint/parser": "^5.33.1",
56
56
  "@typescript-eslint/utils": "^5.33.1",
57
- "azure-devops-node-api": "^11.2.0",
57
+ "azure-devops-node-api": "^12.0.0",
58
58
  "chai": "^4.3.7",
59
59
  "chalk": "^4.1.2",
60
60
  "chokidar": "^3.5.3",
@@ -113,5 +113,5 @@
113
113
  "node": "14.21.1",
114
114
  "npm": "8.19.3"
115
115
  },
116
- "gitHead": "647c587e46418063a1b13bdd6b4758ff90a75198"
116
+ "gitHead": "7bde5efe9431f6b7029a612b71a90896a07444b5"
117
117
  }