@typescript-deploys/pr-build 5.0.0-pr-52807-23 → 5.0.0-pr-50431-13

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/tsserver.js CHANGED
@@ -1351,6 +1351,7 @@ __export(server_exports, {
1351
1351
  isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration,
1352
1352
  isGlobalDeclaration: () => isGlobalDeclaration,
1353
1353
  isGlobalScopeAugmentation: () => isGlobalScopeAugmentation,
1354
+ isGrammarError: () => isGrammarError,
1354
1355
  isHeritageClause: () => isHeritageClause,
1355
1356
  isHoistedFunction: () => isHoistedFunction,
1356
1357
  isHoistedVariableStatement: () => isHoistedVariableStatement,
@@ -1796,6 +1797,8 @@ __export(server_exports, {
1796
1797
  isWithStatement: () => isWithStatement,
1797
1798
  isWriteAccess: () => isWriteAccess,
1798
1799
  isWriteOnlyAccess: () => isWriteOnlyAccess,
1800
+ isWriteOnlyUsage: () => isWriteOnlyUsage,
1801
+ isWriteUsage: () => isWriteUsage,
1799
1802
  isYieldExpression: () => isYieldExpression,
1800
1803
  jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport,
1801
1804
  keywordPart: () => keywordPart,
@@ -2287,7 +2290,7 @@ module.exports = __toCommonJS(server_exports);
2287
2290
 
2288
2291
  // src/compiler/corePublic.ts
2289
2292
  var versionMajorMinor = "5.0";
2290
- var version = `${versionMajorMinor}.0-insiders.20230216`;
2293
+ var version = `${versionMajorMinor}.0-insiders.20230217`;
2291
2294
  var Comparison = /* @__PURE__ */ ((Comparison3) => {
2292
2295
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
2293
2296
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -15193,6 +15196,36 @@ function nodeIsMissing(node) {
15193
15196
  function nodeIsPresent(node) {
15194
15197
  return !nodeIsMissing(node);
15195
15198
  }
15199
+ function isGrammarError(parent2, child) {
15200
+ if (isTypeParameterDeclaration(parent2))
15201
+ return child === parent2.expression;
15202
+ if (isClassStaticBlockDeclaration(parent2))
15203
+ return child === parent2.modifiers;
15204
+ if (isPropertySignature(parent2))
15205
+ return child === parent2.initializer;
15206
+ if (isPropertyDeclaration(parent2))
15207
+ return child === parent2.questionToken && isAutoAccessorPropertyDeclaration(parent2);
15208
+ if (isPropertyAssignment(parent2))
15209
+ return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
15210
+ if (isShorthandPropertyAssignment(parent2))
15211
+ return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
15212
+ if (isMethodDeclaration(parent2))
15213
+ return child === parent2.exclamationToken;
15214
+ if (isConstructorDeclaration(parent2))
15215
+ return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
15216
+ if (isGetAccessorDeclaration(parent2))
15217
+ return child === parent2.typeParameters || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
15218
+ if (isSetAccessorDeclaration(parent2))
15219
+ return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
15220
+ if (isNamespaceExportDeclaration(parent2))
15221
+ return child === parent2.modifiers || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
15222
+ return false;
15223
+ }
15224
+ function isGrammarErrorElement(nodeArray, child, isElement) {
15225
+ if (!nodeArray || isArray(child) || !isElement(child))
15226
+ return false;
15227
+ return contains(nodeArray, child);
15228
+ }
15196
15229
  function insertStatementsAfterPrologue(to, from, isPrologueDirective2) {
15197
15230
  if (from === void 0 || from.length === 0)
15198
15231
  return to;
@@ -19621,20 +19654,39 @@ function isWriteOnlyAccess(node) {
19621
19654
  function isWriteAccess(node) {
19622
19655
  return accessKind(node) !== 0 /* Read */;
19623
19656
  }
19657
+ function isWriteOnlyUsage(node) {
19658
+ return accessKindForUsageChecks(node) === 1 /* Write */;
19659
+ }
19660
+ function isWriteUsage(node) {
19661
+ return accessKindForUsageChecks(node) !== 0 /* Read */;
19662
+ }
19663
+ function accessKindForUsageChecks(node) {
19664
+ const kind = accessKind(node);
19665
+ const { parent: parent2 } = node;
19666
+ switch (parent2 == null ? void 0 : parent2.kind) {
19667
+ case 222 /* PostfixUnaryExpression */:
19668
+ case 221 /* PrefixUnaryExpression */:
19669
+ case 223 /* BinaryExpression */:
19670
+ return kind === 2 /* ReadWrite */ ? writeOrReadWrite() : kind;
19671
+ default:
19672
+ return kind;
19673
+ }
19674
+ function writeOrReadWrite() {
19675
+ return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */;
19676
+ }
19677
+ }
19624
19678
  function accessKind(node) {
19625
19679
  const { parent: parent2 } = node;
19626
- if (!parent2)
19627
- return 0 /* Read */;
19628
- switch (parent2.kind) {
19680
+ switch (parent2 == null ? void 0 : parent2.kind) {
19629
19681
  case 214 /* ParenthesizedExpression */:
19630
19682
  return accessKind(parent2);
19631
19683
  case 222 /* PostfixUnaryExpression */:
19632
19684
  case 221 /* PrefixUnaryExpression */:
19633
19685
  const { operator } = parent2;
19634
- return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? writeOrReadWrite() : 0 /* Read */;
19686
+ return operator === 45 /* PlusPlusToken */ || operator === 46 /* MinusMinusToken */ ? 2 /* ReadWrite */ : 0 /* Read */;
19635
19687
  case 223 /* BinaryExpression */:
19636
19688
  const { left, operatorToken } = parent2;
19637
- return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : writeOrReadWrite() : 0 /* Read */;
19689
+ return left === node && isAssignmentOperator(operatorToken.kind) ? operatorToken.kind === 63 /* EqualsToken */ ? 1 /* Write */ : 2 /* ReadWrite */ : 0 /* Read */;
19638
19690
  case 208 /* PropertyAccessExpression */:
19639
19691
  return parent2.name !== node ? 0 /* Read */ : accessKind(parent2);
19640
19692
  case 299 /* PropertyAssignment */: {
@@ -19648,9 +19700,6 @@ function accessKind(node) {
19648
19700
  default:
19649
19701
  return 0 /* Read */;
19650
19702
  }
19651
- function writeOrReadWrite() {
19652
- return parent2.parent && walkUpParenthesizedExpressions(parent2.parent).kind === 241 /* ExpressionStatement */ ? 1 /* Write */ : 2 /* ReadWrite */;
19653
- }
19654
19703
  }
19655
19704
  function reverseAccessKind(a) {
19656
19705
  switch (a) {
@@ -29280,7 +29329,7 @@ function canHaveIllegalDecorators(node) {
29280
29329
  }
29281
29330
  function canHaveIllegalModifiers(node) {
29282
29331
  const kind = node.kind;
29283
- return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 181 /* FunctionType */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */;
29332
+ return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */;
29284
29333
  }
29285
29334
  function isQuestionOrExclamationToken(node) {
29286
29335
  return isQuestionToken(node) || isExclamationToken(node);
@@ -32595,6 +32644,7 @@ var Parser;
32595
32644
  const hasJSDoc = hasPrecedingJSDocComment();
32596
32645
  const modifiers = parseModifiersForConstructorType();
32597
32646
  const isConstructorType = parseOptional(103 /* NewKeyword */);
32647
+ Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");
32598
32648
  const typeParameters = parseTypeParameters();
32599
32649
  const parameters = parseParameters(4 /* Type */);
32600
32650
  const type = parseReturnType(
@@ -32603,8 +32653,6 @@ var Parser;
32603
32653
  false
32604
32654
  );
32605
32655
  const node = isConstructorType ? factory2.createConstructorTypeNode(modifiers, typeParameters, parameters, type) : factory2.createFunctionTypeNode(typeParameters, parameters, type);
32606
- if (!isConstructorType)
32607
- node.modifiers = modifiers;
32608
32656
  return withJSDoc(finishNode(node, pos), hasJSDoc);
32609
32657
  }
32610
32658
  function parseKeywordAndNoDot() {
@@ -47161,6 +47209,7 @@ function createTypeChecker(host) {
47161
47209
  let inlineLevel = 0;
47162
47210
  let currentNode;
47163
47211
  let varianceTypeParameter;
47212
+ let isInferencePartiallyBlocked = false;
47164
47213
  const emptySymbols = createSymbolTable();
47165
47214
  const arrayVariances = [1 /* Covariant */];
47166
47215
  const compilerOptions = host.getCompilerOptions();
@@ -47592,7 +47641,9 @@ function createTypeChecker(host) {
47592
47641
  toMarkSkip = toMarkSkip.parent;
47593
47642
  } while (toMarkSkip && toMarkSkip !== containingCall);
47594
47643
  }
47644
+ isInferencePartiallyBlocked = true;
47595
47645
  const result = runWithoutResolvedSignatureCaching(node, fn);
47646
+ isInferencePartiallyBlocked = false;
47596
47647
  if (containingCall) {
47597
47648
  let toMarkSkip = node;
47598
47649
  do {
@@ -57638,6 +57689,7 @@ function createTypeChecker(host) {
57638
57689
  const typeParameter = getTypeParameterFromMappedType(type);
57639
57690
  const constraintType = getConstraintTypeFromMappedType(type);
57640
57691
  const nameType = getNameTypeFromMappedType(type.target || type);
57692
+ const isFilteringMappedType = nameType && isTypeAssignableTo(nameType, typeParameter);
57641
57693
  const templateType = getTemplateTypeFromMappedType(type.target || type);
57642
57694
  const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
57643
57695
  const templateModifiers = getMappedTypeModifiers(type);
@@ -57675,7 +57727,7 @@ function createTypeChecker(host) {
57675
57727
  prop.links.keyType = keyType;
57676
57728
  if (modifiersProp) {
57677
57729
  prop.links.syntheticOrigin = modifiersProp;
57678
- prop.declarations = nameType ? void 0 : modifiersProp.declarations;
57730
+ prop.declarations = !nameType || isFilteringMappedType ? modifiersProp.declarations : void 0;
57679
57731
  }
57680
57732
  members.set(propName, prop);
57681
57733
  }
@@ -66410,17 +66462,6 @@ function createTypeChecker(host) {
66410
66462
  function getBaseTypeOfLiteralTypeForComparison(type) {
66411
66463
  return type.flags & (128 /* StringLiteral */ | 134217728 /* TemplateLiteral */ | 268435456 /* StringMapping */) ? stringType : type.flags & (256 /* NumberLiteral */ | 32 /* Enum */) ? numberType : type.flags & 2048 /* BigIntLiteral */ ? bigintType : type.flags & 512 /* BooleanLiteral */ ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getBaseTypeOfLiteralTypeForComparison) : type;
66412
66464
  }
66413
- function getValueOfResult(type) {
66414
- const valueOf = getPropertyOfType(type, "valueOf");
66415
- if (valueOf) {
66416
- const signatures = getSignaturesOfType(getTypeOfSymbol(valueOf), 0 /* Call */);
66417
- if (signatures && signatures.length > 0) {
66418
- const returnType = getReturnTypeOfSignature(signatures[0]);
66419
- return returnType;
66420
- }
66421
- }
66422
- return type;
66423
- }
66424
66465
  function getWidenedLiteralType(type) {
66425
66466
  return type.flags & 1056 /* EnumLike */ && isFreshLiteralType(type) ? getBaseTypeOfEnumLikeType(type) : type.flags & 128 /* StringLiteral */ && isFreshLiteralType(type) ? stringType : type.flags & 256 /* NumberLiteral */ && isFreshLiteralType(type) ? numberType : type.flags & 2048 /* BigIntLiteral */ && isFreshLiteralType(type) ? bigintType : type.flags & 512 /* BooleanLiteral */ && isFreshLiteralType(type) ? booleanType : type.flags & 1048576 /* Union */ ? mapType(type, getWidenedLiteralType) : type;
66426
66467
  }
@@ -67939,7 +67980,7 @@ function createTypeChecker(host) {
67939
67980
  111551 /* Value */ | 1048576 /* ExportValue */,
67940
67981
  getCannotFindNameDiagnosticForName(node),
67941
67982
  node,
67942
- !isWriteOnlyAccess(node),
67983
+ !isWriteOnlyUsage(node),
67943
67984
  /*excludeGlobals*/
67944
67985
  false
67945
67986
  ) || unknownSymbol;
@@ -72757,8 +72798,8 @@ function createTypeChecker(host) {
72757
72798
  }
72758
72799
  return nonNullType;
72759
72800
  }
72760
- function checkPropertyAccessExpression(node, checkMode) {
72761
- return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode);
72801
+ function checkPropertyAccessExpression(node, checkMode, writeOnly) {
72802
+ return node.flags & 32 /* OptionalChain */ ? checkPropertyAccessChain(node, checkMode) : checkPropertyAccessExpressionOrQualifiedName(node, node.expression, checkNonNullExpression(node.expression), node.name, checkMode, writeOnly);
72762
72803
  }
72763
72804
  function checkPropertyAccessChain(node, checkMode) {
72764
72805
  const leftType = checkExpression(node.expression);
@@ -72889,7 +72930,7 @@ function createTypeChecker(host) {
72889
72930
  false
72890
72931
  ) === getDeclaringConstructor(prop);
72891
72932
  }
72892
- function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode) {
72933
+ function checkPropertyAccessExpressionOrQualifiedName(node, left, leftType, right, checkMode, writeOnly) {
72893
72934
  const parentSymbol = getNodeLinks(left).resolvedSymbol;
72894
72935
  const assignmentKind = getAssignmentTargetKind(node);
72895
72936
  const apparentType = getApparentType(assignmentKind !== 0 /* None */ || isMethodAccessForCall(node) ? getWidenedType(leftType) : leftType);
@@ -72988,13 +73029,12 @@ function createTypeChecker(host) {
72988
73029
  checkPropertyNotUsedBeforeDeclaration(prop, node, right);
72989
73030
  markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol));
72990
73031
  getNodeLinks(node).resolvedSymbol = prop;
72991
- const writing = isWriteAccess(node);
72992
- checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, writing, apparentType, prop);
73032
+ checkPropertyAccessibility(node, left.kind === 106 /* SuperKeyword */, isWriteAccess(node), apparentType, prop);
72993
73033
  if (isAssignmentToReadonlyEntity(node, prop, assignmentKind)) {
72994
73034
  error(right, Diagnostics.Cannot_assign_to_0_because_it_is_a_read_only_property, idText(right));
72995
73035
  return errorType;
72996
73036
  }
72997
- propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writing ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
73037
+ propType = isThisPropertyAccessInConstructor(node, prop) ? autoType : writeOnly || isWriteOnlyAccess(node) ? getWriteTypeOfSymbol(prop) : getTypeOfSymbol(prop);
72998
73038
  }
72999
73039
  return getFlowTypeOfAccessExpression(node, prop, propType, right, checkMode);
73000
73040
  }
@@ -73310,7 +73350,7 @@ function createTypeChecker(host) {
73310
73350
  if (!hasPrivateModifier && !hasPrivateIdentifier) {
73311
73351
  return;
73312
73352
  }
73313
- if (nodeForCheckWriteOnly && isWriteOnlyAccess(nodeForCheckWriteOnly) && !(prop.flags & 65536 /* SetAccessor */)) {
73353
+ if (nodeForCheckWriteOnly && isWriteOnlyUsage(nodeForCheckWriteOnly) && !(prop.flags & 65536 /* SetAccessor */)) {
73314
73354
  return;
73315
73355
  }
73316
73356
  if (isSelfTypeAccess2) {
@@ -74245,7 +74285,7 @@ function createTypeChecker(host) {
74245
74285
  const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */;
74246
74286
  const isDecorator2 = node.kind === 167 /* Decorator */;
74247
74287
  const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node);
74248
- const reportErrors2 = !candidatesOutArray;
74288
+ const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray;
74249
74289
  let typeArguments;
74250
74290
  if (!isDecorator2 && !isSuperCall(node)) {
74251
74291
  typeArguments = node.typeArguments;
@@ -77492,17 +77532,9 @@ function createTypeChecker(host) {
77492
77532
  if (isTypeAny(left2) || isTypeAny(right2)) {
77493
77533
  return true;
77494
77534
  }
77495
- if (!(left2.flags & 134348796 /* Primitive */))
77496
- left2 = getValueOfResult(left2);
77497
- if (!(right2.flags & 134348796 /* Primitive */))
77498
- right2 = getValueOfResult(right2);
77499
77535
  const leftAssignableToNumber = isTypeAssignableTo(left2, numberOrBigIntType);
77500
- if (leftAssignableToNumber) {
77501
- const rightAssignableToNumber = isTypeAssignableTo(right2, numberOrBigIntType);
77502
- if (rightAssignableToNumber)
77503
- return true;
77504
- }
77505
- return isTypeAssignableTo(left2, stringType) && isTypeAssignableTo(right2, stringType);
77536
+ const rightAssignableToNumber = isTypeAssignableTo(right2, numberOrBigIntType);
77537
+ return leftAssignableToNumber && rightAssignableToNumber || !leftAssignableToNumber && !rightAssignableToNumber && areTypesComparable(left2, right2);
77506
77538
  });
77507
77539
  }
77508
77540
  return booleanType;
@@ -77632,6 +77664,16 @@ function createTypeChecker(host) {
77632
77664
  addLazyDiagnostic(checkAssignmentOperatorWorker);
77633
77665
  }
77634
77666
  function checkAssignmentOperatorWorker() {
77667
+ let assigneeType = leftType;
77668
+ if (isCompoundAssignment(operatorToken.kind) && left.kind === 208 /* PropertyAccessExpression */) {
77669
+ assigneeType = checkPropertyAccessExpression(
77670
+ left,
77671
+ /*checkMode*/
77672
+ void 0,
77673
+ /*writeOnly*/
77674
+ true
77675
+ );
77676
+ }
77635
77677
  if (checkReferenceExpression(
77636
77678
  left,
77637
77679
  Diagnostics.The_left_hand_side_of_an_assignment_expression_must_be_a_variable_or_a_property_access,
@@ -77644,7 +77686,7 @@ function createTypeChecker(host) {
77644
77686
  headMessage = Diagnostics.Type_0_is_not_assignable_to_type_1_with_exactOptionalPropertyTypes_Colon_true_Consider_adding_undefined_to_the_type_of_the_target;
77645
77687
  }
77646
77688
  }
77647
- checkTypeAssignableToAndOptionallyElaborate(valueType, leftType, left, right, headMessage);
77689
+ checkTypeAssignableToAndOptionallyElaborate(valueType, assigneeType, left, right, headMessage);
77648
77690
  }
77649
77691
  }
77650
77692
  }
@@ -79331,6 +79373,17 @@ function createTypeChecker(host) {
79331
79373
  lastSeenNonAmbientDeclaration = node;
79332
79374
  }
79333
79375
  }
79376
+ if (isInJSFile(current) && isFunctionLike(current) && current.jsDoc) {
79377
+ for (const node2 of current.jsDoc) {
79378
+ if (node2.tags) {
79379
+ for (const tag of node2.tags) {
79380
+ if (isJSDocOverloadTag(tag)) {
79381
+ hasOverloads = true;
79382
+ }
79383
+ }
79384
+ }
79385
+ }
79386
+ }
79334
79387
  }
79335
79388
  }
79336
79389
  if (multipleConstructorImplementation) {
@@ -79368,8 +79421,9 @@ function createTypeChecker(host) {
79368
79421
  const bodySignature = getSignatureFromDeclaration(bodyDeclaration);
79369
79422
  for (const signature of signatures) {
79370
79423
  if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
79424
+ const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
79371
79425
  addRelatedInfo(
79372
- error(signature.declaration, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
79426
+ error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
79373
79427
  createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
79374
79428
  );
79375
79429
  break;
@@ -85985,7 +86039,6 @@ function createTypeChecker(host) {
85985
86039
  case 299 /* PropertyAssignment */:
85986
86040
  case 300 /* ShorthandPropertyAssignment */:
85987
86041
  case 267 /* NamespaceExportDeclaration */:
85988
- case 181 /* FunctionType */:
85989
86042
  case 279 /* MissingDeclaration */:
85990
86043
  return find(node.modifiers, isModifier);
85991
86044
  default:
@@ -147268,7 +147321,14 @@ function updatePropertyDeclaration(changeTracker, file, declaration, type, field
147268
147321
  changeTracker.replaceNode(file, declaration, property);
147269
147322
  }
147270
147323
  function updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName) {
147271
- const assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer);
147324
+ let assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer);
147325
+ if (assignment.modifiers || assignment.questionToken || assignment.exclamationToken) {
147326
+ if (assignment === declaration)
147327
+ assignment = factory.cloneNode(assignment);
147328
+ assignment.modifiers = void 0;
147329
+ assignment.questionToken = void 0;
147330
+ assignment.exclamationToken = void 0;
147331
+ }
147272
147332
  changeTracker.replacePropertyAssignment(file, declaration, assignment);
147273
147333
  }
147274
147334
  function updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) {
@@ -166424,7 +166484,7 @@ function formatSpanWorker(originalRange, enclosingNode, initialIndentation, delt
166424
166484
  }
166425
166485
  function processChildNode(child, inheritedIndentation, parent2, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
166426
166486
  Debug.assert(!nodeIsSynthesized(child));
166427
- if (nodeIsMissing(child)) {
166487
+ if (nodeIsMissing(child) || isGrammarError(parent2, child)) {
166428
166488
  return inheritedIndentation;
166429
166489
  }
166430
166490
  const childStartPos = child.getStart(sourceFile);
@@ -168837,6 +168897,7 @@ __export(ts_exports3, {
168837
168897
  isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration,
168838
168898
  isGlobalDeclaration: () => isGlobalDeclaration,
168839
168899
  isGlobalScopeAugmentation: () => isGlobalScopeAugmentation,
168900
+ isGrammarError: () => isGrammarError,
168840
168901
  isHeritageClause: () => isHeritageClause,
168841
168902
  isHoistedFunction: () => isHoistedFunction,
168842
168903
  isHoistedVariableStatement: () => isHoistedVariableStatement,
@@ -169282,6 +169343,8 @@ __export(ts_exports3, {
169282
169343
  isWithStatement: () => isWithStatement,
169283
169344
  isWriteAccess: () => isWriteAccess,
169284
169345
  isWriteOnlyAccess: () => isWriteOnlyAccess,
169346
+ isWriteOnlyUsage: () => isWriteOnlyUsage,
169347
+ isWriteUsage: () => isWriteUsage,
169285
169348
  isYieldExpression: () => isYieldExpression,
169286
169349
  jsxModeNeedsExplicitImport: () => jsxModeNeedsExplicitImport,
169287
169350
  keywordPart: () => keywordPart,
@@ -182786,6 +182849,7 @@ start(initializeNodeSystem(), require("os").platform());
182786
182849
  isGetOrSetAccessorDeclaration,
182787
182850
  isGlobalDeclaration,
182788
182851
  isGlobalScopeAugmentation,
182852
+ isGrammarError,
182789
182853
  isHeritageClause,
182790
182854
  isHoistedFunction,
182791
182855
  isHoistedVariableStatement,
@@ -183231,6 +183295,8 @@ start(initializeNodeSystem(), require("os").platform());
183231
183295
  isWithStatement,
183232
183296
  isWriteAccess,
183233
183297
  isWriteOnlyAccess,
183298
+ isWriteOnlyUsage,
183299
+ isWriteUsage,
183234
183300
  isYieldExpression,
183235
183301
  jsxModeNeedsExplicitImport,
183236
183302
  keywordPart,