typescript 5.0.0-dev.20230216 → 5.0.0-dev.20230217

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/typescript.js CHANGED
@@ -35,7 +35,7 @@ var ts = (() => {
35
35
  "src/compiler/corePublic.ts"() {
36
36
  "use strict";
37
37
  versionMajorMinor = "5.0";
38
- version = `${versionMajorMinor}.0-dev.20230216`;
38
+ version = `${versionMajorMinor}.0-dev.20230217`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -13027,6 +13027,36 @@ ${lanes.join("\n")}
13027
13027
  function nodeIsPresent(node) {
13028
13028
  return !nodeIsMissing(node);
13029
13029
  }
13030
+ function isGrammarError(parent2, child) {
13031
+ if (isTypeParameterDeclaration(parent2))
13032
+ return child === parent2.expression;
13033
+ if (isClassStaticBlockDeclaration(parent2))
13034
+ return child === parent2.modifiers;
13035
+ if (isPropertySignature(parent2))
13036
+ return child === parent2.initializer;
13037
+ if (isPropertyDeclaration(parent2))
13038
+ return child === parent2.questionToken && isAutoAccessorPropertyDeclaration(parent2);
13039
+ if (isPropertyAssignment(parent2))
13040
+ return child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
13041
+ if (isShorthandPropertyAssignment(parent2))
13042
+ return child === parent2.equalsToken || child === parent2.modifiers || child === parent2.questionToken || child === parent2.exclamationToken || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
13043
+ if (isMethodDeclaration(parent2))
13044
+ return child === parent2.exclamationToken;
13045
+ if (isConstructorDeclaration(parent2))
13046
+ return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
13047
+ if (isGetAccessorDeclaration(parent2))
13048
+ return child === parent2.typeParameters || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
13049
+ if (isSetAccessorDeclaration(parent2))
13050
+ return child === parent2.typeParameters || child === parent2.type || isGrammarErrorElement(parent2.typeParameters, child, isTypeParameterDeclaration);
13051
+ if (isNamespaceExportDeclaration(parent2))
13052
+ return child === parent2.modifiers || isGrammarErrorElement(parent2.modifiers, child, isModifierLike);
13053
+ return false;
13054
+ }
13055
+ function isGrammarErrorElement(nodeArray, child, isElement) {
13056
+ if (!nodeArray || isArray(child) || !isElement(child))
13057
+ return false;
13058
+ return contains(nodeArray, child);
13059
+ }
13030
13060
  function insertStatementsAfterPrologue(to, from, isPrologueDirective2) {
13031
13061
  if (from === void 0 || from.length === 0)
13032
13062
  return to;
@@ -27168,7 +27198,7 @@ ${lanes.join("\n")}
27168
27198
  }
27169
27199
  function canHaveIllegalModifiers(node) {
27170
27200
  const kind = node.kind;
27171
- return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 181 /* FunctionType */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */;
27201
+ return kind === 172 /* ClassStaticBlockDeclaration */ || kind === 299 /* PropertyAssignment */ || kind === 300 /* ShorthandPropertyAssignment */ || kind === 279 /* MissingDeclaration */ || kind === 267 /* NamespaceExportDeclaration */;
27172
27202
  }
27173
27203
  function isQuestionOrExclamationToken(node) {
27174
27204
  return isQuestionToken(node) || isExclamationToken(node);
@@ -30706,6 +30736,7 @@ ${lanes.join("\n")}
30706
30736
  const hasJSDoc = hasPrecedingJSDocComment();
30707
30737
  const modifiers = parseModifiersForConstructorType();
30708
30738
  const isConstructorType = parseOptional(103 /* NewKeyword */);
30739
+ Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");
30709
30740
  const typeParameters = parseTypeParameters();
30710
30741
  const parameters = parseParameters(4 /* Type */);
30711
30742
  const type = parseReturnType(
@@ -30714,8 +30745,6 @@ ${lanes.join("\n")}
30714
30745
  false
30715
30746
  );
30716
30747
  const node = isConstructorType ? factory2.createConstructorTypeNode(modifiers, typeParameters, parameters, type) : factory2.createFunctionTypeNode(typeParameters, parameters, type);
30717
- if (!isConstructorType)
30718
- node.modifiers = modifiers;
30719
30748
  return withJSDoc(finishNode(node, pos), hasJSDoc);
30720
30749
  }
30721
30750
  function parseKeywordAndNoDot() {
@@ -44970,6 +44999,7 @@ ${lanes.join("\n")}
44970
44999
  let inlineLevel = 0;
44971
45000
  let currentNode;
44972
45001
  let varianceTypeParameter;
45002
+ let isInferencePartiallyBlocked = false;
44973
45003
  const emptySymbols = createSymbolTable();
44974
45004
  const arrayVariances = [1 /* Covariant */];
44975
45005
  const compilerOptions = host.getCompilerOptions();
@@ -45401,7 +45431,9 @@ ${lanes.join("\n")}
45401
45431
  toMarkSkip = toMarkSkip.parent;
45402
45432
  } while (toMarkSkip && toMarkSkip !== containingCall);
45403
45433
  }
45434
+ isInferencePartiallyBlocked = true;
45404
45435
  const result = runWithoutResolvedSignatureCaching(node, fn);
45436
+ isInferencePartiallyBlocked = false;
45405
45437
  if (containingCall) {
45406
45438
  let toMarkSkip = node;
45407
45439
  do {
@@ -55447,6 +55479,7 @@ ${lanes.join("\n")}
55447
55479
  const typeParameter = getTypeParameterFromMappedType(type);
55448
55480
  const constraintType = getConstraintTypeFromMappedType(type);
55449
55481
  const nameType = getNameTypeFromMappedType(type.target || type);
55482
+ const isFilteringMappedType = nameType && isTypeAssignableTo(nameType, typeParameter);
55450
55483
  const templateType = getTemplateTypeFromMappedType(type.target || type);
55451
55484
  const modifiersType = getApparentType(getModifiersTypeFromMappedType(type));
55452
55485
  const templateModifiers = getMappedTypeModifiers(type);
@@ -55484,7 +55517,7 @@ ${lanes.join("\n")}
55484
55517
  prop.links.keyType = keyType;
55485
55518
  if (modifiersProp) {
55486
55519
  prop.links.syntheticOrigin = modifiersProp;
55487
- prop.declarations = nameType ? void 0 : modifiersProp.declarations;
55520
+ prop.declarations = !nameType || isFilteringMappedType ? modifiersProp.declarations : void 0;
55488
55521
  }
55489
55522
  members.set(propName, prop);
55490
55523
  }
@@ -64216,6 +64249,9 @@ ${lanes.join("\n")}
64216
64249
  const key = `B${getTypeId(type)}`;
64217
64250
  return (_a2 = getCachedType(key)) != null ? _a2 : setCachedType(key, mapType(type, getBaseTypeOfLiteralType));
64218
64251
  }
64252
+ function getBaseTypeOfLiteralTypeForComparison(type) {
64253
+ 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;
64254
+ }
64219
64255
  function getWidenedLiteralType(type) {
64220
64256
  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;
64221
64257
  }
@@ -72040,7 +72076,7 @@ ${lanes.join("\n")}
72040
72076
  const isTaggedTemplate = node.kind === 212 /* TaggedTemplateExpression */;
72041
72077
  const isDecorator2 = node.kind === 167 /* Decorator */;
72042
72078
  const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node);
72043
- const reportErrors2 = !candidatesOutArray;
72079
+ const reportErrors2 = !isInferencePartiallyBlocked && !candidatesOutArray;
72044
72080
  let typeArguments;
72045
72081
  if (!isDecorator2 && !isSuperCall(node)) {
72046
72082
  typeArguments = node.typeArguments;
@@ -75281,8 +75317,8 @@ ${lanes.join("\n")}
75281
75317
  case 32 /* LessThanEqualsToken */:
75282
75318
  case 33 /* GreaterThanEqualsToken */:
75283
75319
  if (checkForDisallowedESSymbolOperand(operator)) {
75284
- leftType = getBaseTypeOfLiteralType(checkNonNullType(leftType, left));
75285
- rightType = getBaseTypeOfLiteralType(checkNonNullType(rightType, right));
75320
+ leftType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(leftType, left));
75321
+ rightType = getBaseTypeOfLiteralTypeForComparison(checkNonNullType(rightType, right));
75286
75322
  reportOperatorErrorUnless((left2, right2) => {
75287
75323
  if (isTypeAny(left2) || isTypeAny(right2)) {
75288
75324
  return true;
@@ -77118,6 +77154,17 @@ ${lanes.join("\n")}
77118
77154
  lastSeenNonAmbientDeclaration = node;
77119
77155
  }
77120
77156
  }
77157
+ if (isInJSFile(current) && isFunctionLike(current) && current.jsDoc) {
77158
+ for (const node2 of current.jsDoc) {
77159
+ if (node2.tags) {
77160
+ for (const tag of node2.tags) {
77161
+ if (isJSDocOverloadTag(tag)) {
77162
+ hasOverloads = true;
77163
+ }
77164
+ }
77165
+ }
77166
+ }
77167
+ }
77121
77168
  }
77122
77169
  }
77123
77170
  if (multipleConstructorImplementation) {
@@ -77155,8 +77202,9 @@ ${lanes.join("\n")}
77155
77202
  const bodySignature = getSignatureFromDeclaration(bodyDeclaration);
77156
77203
  for (const signature of signatures) {
77157
77204
  if (!isImplementationCompatibleWithOverload(bodySignature, signature)) {
77205
+ const errorNode = signature.declaration && isJSDocSignature(signature.declaration) ? signature.declaration.parent.tagName : signature.declaration;
77158
77206
  addRelatedInfo(
77159
- error(signature.declaration, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
77207
+ error(errorNode, Diagnostics.This_overload_signature_is_not_compatible_with_its_implementation_signature),
77160
77208
  createDiagnosticForNode(bodyDeclaration, Diagnostics.The_implementation_signature_is_declared_here)
77161
77209
  );
77162
77210
  break;
@@ -83772,7 +83820,6 @@ ${lanes.join("\n")}
83772
83820
  case 299 /* PropertyAssignment */:
83773
83821
  case 300 /* ShorthandPropertyAssignment */:
83774
83822
  case 267 /* NamespaceExportDeclaration */:
83775
- case 181 /* FunctionType */:
83776
83823
  case 279 /* MissingDeclaration */:
83777
83824
  return find(node.modifiers, isModifier);
83778
83825
  default:
@@ -90366,7 +90413,16 @@ ${lanes.join("\n")}
90366
90413
  visitNode(node.initializer, (child) => namedEvaluationVisitor(child, referencedName), isExpression)
90367
90414
  );
90368
90415
  }
90369
- return visitEachChild(node, visitor, context);
90416
+ return factory2.updatePropertyDeclaration(
90417
+ node,
90418
+ visitNodes2(node.modifiers, modifierVisitor, isModifier),
90419
+ visitNode(node.name, propertyNameVisitor, isPropertyName),
90420
+ /*questionOrExclamationToken*/
90421
+ void 0,
90422
+ /*type*/
90423
+ void 0,
90424
+ visitNode(node.initializer, visitor, isExpression)
90425
+ );
90370
90426
  }
90371
90427
  function transformPublicFieldInitializer(node) {
90372
90428
  if (shouldTransformInitializers && !isAutoAccessorPropertyDeclaration(node)) {
@@ -133210,7 +133266,8 @@ ${lanes.join("\n")}
133210
133266
  options.triggerCharacter,
133211
133267
  options.triggerKind,
133212
133268
  cancellationToken,
133213
- formattingSettings && ts_formatting_exports.getFormatContext(formattingSettings, host)
133269
+ formattingSettings && ts_formatting_exports.getFormatContext(formattingSettings, host),
133270
+ options.includeSymbol
133214
133271
  );
133215
133272
  }
133216
133273
  function getCompletionEntryDetails2(fileName, position, name, formattingOptions, source, preferences = emptyOptions, data) {
@@ -146134,7 +146191,14 @@ ${lanes.join("\n")}
146134
146191
  changeTracker.replaceNode(file, declaration, property);
146135
146192
  }
146136
146193
  function updatePropertyAssignmentDeclaration(changeTracker, file, declaration, fieldName) {
146137
- const assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer);
146194
+ let assignment = factory.updatePropertyAssignment(declaration, fieldName, declaration.initializer);
146195
+ if (assignment.modifiers || assignment.questionToken || assignment.exclamationToken) {
146196
+ if (assignment === declaration)
146197
+ assignment = factory.cloneNode(assignment);
146198
+ assignment.modifiers = void 0;
146199
+ assignment.questionToken = void 0;
146200
+ assignment.exclamationToken = void 0;
146201
+ }
146138
146202
  changeTracker.replacePropertyAssignment(file, declaration, assignment);
146139
146203
  }
146140
146204
  function updateFieldDeclaration(changeTracker, file, declaration, type, fieldName, modifiers) {
@@ -147325,7 +147389,7 @@ ${lanes.join("\n")}
147325
147389
  return result2 || (needsFullResolution ? "failed" : "skipped");
147326
147390
  }
147327
147391
  }
147328
- function getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext) {
147392
+ function getCompletionsAtPosition(host, program, log, sourceFile, position, preferences, triggerCharacter, completionKind, cancellationToken, formatContext, includeSymbol = false) {
147329
147393
  var _a2;
147330
147394
  const { previousToken } = getRelevantTokens(position, sourceFile);
147331
147395
  if (triggerCharacter && !isInString(sourceFile, position, previousToken) && !isValidTrigger(sourceFile, triggerCharacter, previousToken, position)) {
@@ -147347,7 +147411,7 @@ ${lanes.join("\n")}
147347
147411
  } else {
147348
147412
  incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.clear();
147349
147413
  }
147350
- const stringCompletions = ts_Completions_StringCompletions_exports.getStringLiteralCompletions(sourceFile, position, previousToken, compilerOptions, host, program, log, preferences);
147414
+ const stringCompletions = ts_Completions_StringCompletions_exports.getStringLiteralCompletions(sourceFile, position, previousToken, compilerOptions, host, program, log, preferences, includeSymbol);
147351
147415
  if (stringCompletions) {
147352
147416
  return stringCompletions;
147353
147417
  }
@@ -147372,7 +147436,7 @@ ${lanes.join("\n")}
147372
147436
  }
147373
147437
  switch (completionData.kind) {
147374
147438
  case 0 /* Data */:
147375
- const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position);
147439
+ const response = completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol);
147376
147440
  if (response == null ? void 0 : response.isIncomplete) {
147377
147441
  incompleteCompletionsCache == null ? void 0 : incompleteCompletionsCache.set(response);
147378
147442
  }
@@ -147502,7 +147566,7 @@ ${lanes.join("\n")}
147502
147566
  function getOptionalReplacementSpan(location) {
147503
147567
  return (location == null ? void 0 : location.kind) === 79 /* Identifier */ ? createTextSpanFromNode(location) : void 0;
147504
147568
  }
147505
- function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position) {
147569
+ function completionInfoFromData(sourceFile, host, program, compilerOptions, log, completionData, preferences, formatContext, position, includeSymbol) {
147506
147570
  const {
147507
147571
  symbols,
147508
147572
  contextToken,
@@ -147576,7 +147640,8 @@ ${lanes.join("\n")}
147576
147640
  symbolToOriginInfoMap,
147577
147641
  symbolToSortTextMap,
147578
147642
  isJsxIdentifierExpected,
147579
- isRightOfOpenTag
147643
+ isRightOfOpenTag,
147644
+ includeSymbol
147580
147645
  );
147581
147646
  if (keywordFilters !== 0 /* None */) {
147582
147647
  for (const keywordEntry of getKeywordCompletions(keywordFilters, !insideJsDocTagTypeExpression && isSourceFileJS(sourceFile))) {
@@ -147825,7 +147890,7 @@ ${lanes.join("\n")}
147825
147890
  function createCompletionEntryForLiteral(sourceFile, preferences, literal) {
147826
147891
  return { name: completionNameForLiteral(sourceFile, preferences, literal), kind: "string" /* string */, kindModifiers: "" /* none */, sortText: SortText.LocationPriority };
147827
147892
  }
147828
- function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag) {
147893
+ function createCompletionEntry(symbol, sortText, replacementToken, contextToken, location, position, sourceFile, host, program, name, needsConvertPropertyAccess, origin, recommendedCompletion, propertyAccessToConvert, isJsxInitializer, importStatementCompletion, useSemicolons, options, preferences, completionKind, formatContext, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol) {
147829
147894
  let insertText;
147830
147895
  let replacementSpan = getReplacementSpanForContextToken(replacementToken);
147831
147896
  let data;
@@ -147869,7 +147934,9 @@ ${lanes.join("\n")}
147869
147934
  }
147870
147935
  awaitText += `(await ${propertyAccessToConvert.expression.getText()})`;
147871
147936
  insertText = needsConvertPropertyAccess ? `${awaitText}${insertText}` : `${awaitText}${insertQuestionDot ? "?." : "."}${insertText}`;
147872
- replacementSpan = createTextSpanFromBounds(propertyAccessToConvert.getStart(sourceFile), propertyAccessToConvert.end);
147937
+ const isInAwaitExpression = tryCast(propertyAccessToConvert.parent, isAwaitExpression);
147938
+ const wrapNode = isInAwaitExpression ? propertyAccessToConvert.parent : propertyAccessToConvert.expression;
147939
+ replacementSpan = createTextSpanFromBounds(wrapNode.getStart(sourceFile), propertyAccessToConvert.end);
147873
147940
  }
147874
147941
  if (originIsResolvedExport(origin)) {
147875
147942
  sourceDisplay = [textPart(origin.moduleSpecifier)];
@@ -147937,7 +148004,8 @@ ${lanes.join("\n")}
147937
148004
  isSnippet,
147938
148005
  isPackageJsonImport: originIsPackageJsonImport(origin) || void 0,
147939
148006
  isImportStatementCompletion: !!importStatementCompletion || void 0,
147940
- data
148007
+ data,
148008
+ ...includeSymbol ? { symbol } : void 0
147941
148009
  };
147942
148010
  }
147943
148011
  function isClassLikeMemberCompletion(symbol, location, sourceFile) {
@@ -148407,7 +148475,7 @@ ${lanes.join("\n")}
148407
148475
  return "TypeOnlyAlias/" /* TypeOnlyAlias */;
148408
148476
  }
148409
148477
  }
148410
- function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag) {
148478
+ function getCompletionEntriesFromSymbols(symbols, entries, replacementToken, contextToken, location, position, sourceFile, host, program, target, log, kind, preferences, compilerOptions, formatContext, isTypeOnlyLocation, propertyAccessToConvert, jsxIdentifierExpected, isJsxInitializer, importStatementCompletion, recommendedCompletion, symbolToOriginInfoMap, symbolToSortTextMap, isJsxIdentifierExpected, isRightOfOpenTag, includeSymbol = false) {
148411
148479
  var _a2;
148412
148480
  const start = timestamp();
148413
148481
  const variableDeclaration = getVariableDeclaration(location);
@@ -148447,7 +148515,8 @@ ${lanes.join("\n")}
148447
148515
  kind,
148448
148516
  formatContext,
148449
148517
  isJsxIdentifierExpected,
148450
- isRightOfOpenTag
148518
+ isRightOfOpenTag,
148519
+ includeSymbol
148451
148520
  );
148452
148521
  if (!entry) {
148453
148522
  continue;
@@ -150688,7 +150757,7 @@ ${lanes.join("\n")}
150688
150757
  values: map2.values.bind(map2)
150689
150758
  };
150690
150759
  }
150691
- function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program, log, preferences) {
150760
+ function getStringLiteralCompletions(sourceFile, position, contextToken, options, host, program, log, preferences, includeSymbol) {
150692
150761
  if (isInReferenceComment(sourceFile, position)) {
150693
150762
  const entries = getTripleSlashReferenceCompletion(sourceFile, position, options, host);
150694
150763
  return entries && convertPathCompletions(entries);
@@ -150697,10 +150766,10 @@ ${lanes.join("\n")}
150697
150766
  if (!contextToken || !isStringLiteralLike(contextToken))
150698
150767
  return void 0;
150699
150768
  const entries = getStringLiteralCompletionEntries(sourceFile, contextToken, position, program.getTypeChecker(), options, host, preferences);
150700
- return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position);
150769
+ return convertStringLiteralCompletions(entries, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol);
150701
150770
  }
150702
150771
  }
150703
- function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position) {
150772
+ function convertStringLiteralCompletions(completion, contextToken, sourceFile, host, program, log, options, preferences, position, includeSymbol) {
150704
150773
  if (completion === void 0) {
150705
150774
  return void 0;
150706
150775
  }
@@ -150726,7 +150795,28 @@ ${lanes.join("\n")}
150726
150795
  preferences,
150727
150796
  options,
150728
150797
  /*formatContext*/
150729
- void 0
150798
+ void 0,
150799
+ /*isTypeOnlyLocation */
150800
+ void 0,
150801
+ /*propertyAccessToConvert*/
150802
+ void 0,
150803
+ /*jsxIdentifierExpected*/
150804
+ void 0,
150805
+ /*isJsxInitializer*/
150806
+ void 0,
150807
+ /*importStatementCompletion*/
150808
+ void 0,
150809
+ /*recommendedCompletion*/
150810
+ void 0,
150811
+ /*symbolToOriginInfoMap*/
150812
+ void 0,
150813
+ /*symbolToSortTextMap*/
150814
+ void 0,
150815
+ /*isJsxIdentifierExpected*/
150816
+ void 0,
150817
+ /*isRightOfOpenTag*/
150818
+ void 0,
150819
+ includeSymbol
150730
150820
  );
150731
150821
  return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries };
150732
150822
  }
@@ -165871,7 +165961,7 @@ ${options.prefix}` : "\n" : options.prefix
165871
165961
  }
165872
165962
  function processChildNode(child, inheritedIndentation, parent2, parentDynamicIndentation, parentStartLine, undecoratedParentStartLine, isListItem, isFirstListItem) {
165873
165963
  Debug.assert(!nodeIsSynthesized(child));
165874
- if (nodeIsMissing(child)) {
165964
+ if (nodeIsMissing(child) || isGrammarError(parent2, child)) {
165875
165965
  return inheritedIndentation;
165876
165966
  }
165877
165967
  const childStartPos = child.getStart(sourceFile);
@@ -168547,6 +168637,7 @@ ${options.prefix}` : "\n" : options.prefix
168547
168637
  isGetOrSetAccessorDeclaration: () => isGetOrSetAccessorDeclaration,
168548
168638
  isGlobalDeclaration: () => isGlobalDeclaration,
168549
168639
  isGlobalScopeAugmentation: () => isGlobalScopeAugmentation,
168640
+ isGrammarError: () => isGrammarError,
168550
168641
  isHeritageClause: () => isHeritageClause,
168551
168642
  isHoistedFunction: () => isHoistedFunction,
168552
168643
  isHoistedVariableStatement: () => isHoistedVariableStatement,
@@ -54,7 +54,7 @@ var path = __toESM(require("path"));
54
54
 
55
55
  // src/compiler/corePublic.ts
56
56
  var versionMajorMinor = "5.0";
57
- var version = `${versionMajorMinor}.0-dev.20230216`;
57
+ var version = `${versionMajorMinor}.0-dev.20230217`;
58
58
 
59
59
  // src/compiler/core.ts
60
60
  var emptyArray = [];
@@ -21124,6 +21124,7 @@ var Parser;
21124
21124
  const hasJSDoc = hasPrecedingJSDocComment();
21125
21125
  const modifiers = parseModifiersForConstructorType();
21126
21126
  const isConstructorType = parseOptional(103 /* NewKeyword */);
21127
+ Debug.assert(!modifiers || isConstructorType, "Per isStartOfFunctionOrConstructorType, a function type cannot have modifiers.");
21127
21128
  const typeParameters = parseTypeParameters();
21128
21129
  const parameters = parseParameters(4 /* Type */);
21129
21130
  const type = parseReturnType(
@@ -21132,8 +21133,6 @@ var Parser;
21132
21133
  false
21133
21134
  );
21134
21135
  const node = isConstructorType ? factory2.createConstructorTypeNode(modifiers, typeParameters, parameters, type) : factory2.createFunctionTypeNode(typeParameters, parameters, type);
21135
- if (!isConstructorType)
21136
- node.modifiers = modifiers;
21137
21136
  return withJSDoc(finishNode(node, pos), hasJSDoc);
21138
21137
  }
21139
21138
  function parseKeywordAndNoDot() {
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.0.0-dev.20230216",
5
+ "version": "5.0.0-dev.20230217",
6
6
  "license": "Apache-2.0",
7
7
  "description": "TypeScript is a language for application scale JavaScript development",
8
8
  "keywords": [