typescript 5.1.0-dev.20230426 → 5.1.0-dev.20230428

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.
@@ -550,7 +550,7 @@ declare namespace ts {
550
550
  interface FlowContainer extends Node {
551
551
  _flowContainerBrand: any;
552
552
  }
553
- type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
553
+ type HasJSDoc = AccessorDeclaration | ArrowFunction | BinaryExpression | Block | BreakStatement | CallSignatureDeclaration | CaseClause | ClassLikeDeclaration | ClassStaticBlockDeclaration | ConstructorDeclaration | ConstructorTypeNode | ConstructSignatureDeclaration | ContinueStatement | DebuggerStatement | DoStatement | ElementAccessExpression | EmptyStatement | EndOfFileToken | EnumDeclaration | EnumMember | ExportAssignment | ExportDeclaration | ExportSpecifier | ExpressionStatement | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeNode | Identifier | IfStatement | ImportDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | InterfaceDeclaration | JSDocFunctionType | JSDocSignature | LabeledStatement | MethodDeclaration | MethodSignature | ModuleDeclaration | NamedTupleMember | NamespaceExportDeclaration | ObjectLiteralExpression | ParameterDeclaration | ParenthesizedExpression | PropertyAccessExpression | PropertyAssignment | PropertyDeclaration | PropertySignature | ReturnStatement | SemicolonClassElement | ShorthandPropertyAssignment | SpreadAssignment | SwitchStatement | ThrowStatement | TryStatement | TypeAliasDeclaration | TypeParameterDeclaration | VariableDeclaration | VariableStatement | WhileStatement | WithStatement;
554
554
  type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
555
555
  type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
556
556
  type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -829,7 +829,7 @@ declare namespace ts {
829
829
  readonly body?: FunctionBody | undefined;
830
830
  }
831
831
  /** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
832
- interface SemicolonClassElement extends ClassElement {
832
+ interface SemicolonClassElement extends ClassElement, JSDocContainer {
833
833
  readonly kind: SyntaxKind.SemicolonClassElement;
834
834
  readonly parent: ClassLikeDeclaration;
835
835
  }
@@ -5893,8 +5893,9 @@ declare namespace ts {
5893
5893
  type EventBeginInstallTypes = "event::beginInstallTypes";
5894
5894
  type EventEndInstallTypes = "event::endInstallTypes";
5895
5895
  type EventInitializationFailed = "event::initializationFailed";
5896
+ type ActionWatchTypingLocations = "action::watchTypingLocations";
5896
5897
  interface TypingInstallerResponse {
5897
- readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed;
5898
+ readonly kind: ActionSet | ActionInvalidate | EventTypesRegistry | ActionPackageInstalled | EventBeginInstallTypes | EventEndInstallTypes | EventInitializationFailed | ActionWatchTypingLocations;
5898
5899
  }
5899
5900
  interface TypingInstallerRequestWithProjectName {
5900
5901
  readonly projectName: string;
@@ -5903,7 +5904,6 @@ declare namespace ts {
5903
5904
  readonly fileNames: string[];
5904
5905
  readonly projectRootPath: Path;
5905
5906
  readonly compilerOptions: CompilerOptions;
5906
- readonly watchOptions?: WatchOptions;
5907
5907
  readonly typeAcquisition: TypeAcquisition;
5908
5908
  readonly unresolvedImports: SortedReadonlyArray<string>;
5909
5909
  readonly cachePath?: string;
@@ -5955,8 +5955,6 @@ declare namespace ts {
5955
5955
  writeFile(path: string, content: string): void;
5956
5956
  createDirectory(path: string): void;
5957
5957
  getCurrentDirectory?(): string;
5958
- watchFile?(path: string, callback: FileWatcherCallback, pollingInterval?: number, options?: WatchOptions): FileWatcher;
5959
- watchDirectory?(path: string, callback: DirectoryWatcherCallback, recursive?: boolean, options?: WatchOptions): FileWatcher;
5960
5958
  }
5961
5959
  interface SetTypings extends ProjectResponse {
5962
5960
  readonly typeAcquisition: TypeAcquisition;
@@ -5965,6 +5963,11 @@ declare namespace ts {
5965
5963
  readonly unresolvedImports: SortedReadonlyArray<string>;
5966
5964
  readonly kind: ActionSet;
5967
5965
  }
5966
+ interface WatchTypingLocations extends ProjectResponse {
5967
+ /** if files is undefined, retain same set of watchers */
5968
+ readonly files: readonly string[] | undefined;
5969
+ readonly kind: ActionWatchTypingLocations;
5970
+ }
5968
5971
  }
5969
5972
  function getDefaultFormatCodeSettings(newLineCharacter?: string): FormatCodeSettings;
5970
5973
  /**
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.20230426`;
38
+ version = `${versionMajorMinor}.0-dev.20230428`;
39
39
  Comparison = /* @__PURE__ */ ((Comparison3) => {
40
40
  Comparison3[Comparison3["LessThan"] = -1] = "LessThan";
41
41
  Comparison3[Comparison3["EqualTo"] = 0] = "EqualTo";
@@ -15388,6 +15388,7 @@ ${lanes.join("\n")}
15388
15388
  case 171 /* PropertyDeclaration */:
15389
15389
  case 170 /* PropertySignature */:
15390
15390
  case 252 /* ReturnStatement */:
15391
+ case 239 /* SemicolonClassElement */:
15391
15392
  case 177 /* SetAccessor */:
15392
15393
  case 303 /* ShorthandPropertyAssignment */:
15393
15394
  case 304 /* SpreadAssignment */:
@@ -33583,11 +33584,11 @@ ${lanes.join("\n")}
33583
33584
  }
33584
33585
  function parseClassElement() {
33585
33586
  const pos = getNodePos();
33587
+ const hasJSDoc = hasPrecedingJSDocComment();
33586
33588
  if (token() === 27 /* SemicolonToken */) {
33587
33589
  nextToken();
33588
- return finishNode(factory2.createSemicolonClassElement(), pos);
33590
+ return withJSDoc(finishNode(factory2.createSemicolonClassElement(), pos), hasJSDoc);
33589
33591
  }
33590
- const hasJSDoc = hasPrecedingJSDocComment();
33591
33592
  const modifiers = parseModifiers(
33592
33593
  /*allowDecorators*/
33593
33594
  true,
@@ -46083,13 +46084,14 @@ ${lanes.join("\n")}
46083
46084
  return diagnostic;
46084
46085
  }
46085
46086
  function isDeprecatedSymbol(symbol) {
46086
- if (length(symbol.declarations) > 1) {
46087
- const parentSymbol = getParentOfSymbol(symbol);
46088
- if (parentSymbol && parentSymbol.flags & 64 /* Interface */) {
46089
- return some(symbol.declarations, (d) => !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */));
46090
- }
46087
+ const parentSymbol = getParentOfSymbol(symbol);
46088
+ if (parentSymbol && length(symbol.declarations) > 1) {
46089
+ return parentSymbol.flags & 64 /* Interface */ ? some(symbol.declarations, isDeprecatedDeclaration2) : every(symbol.declarations, isDeprecatedDeclaration2);
46091
46090
  }
46092
- return !!(getDeclarationNodeFlagsFromSymbol(symbol) & 268435456 /* Deprecated */);
46091
+ return !!symbol.valueDeclaration && isDeprecatedDeclaration2(symbol.valueDeclaration) || length(symbol.declarations) && every(symbol.declarations, isDeprecatedDeclaration2);
46092
+ }
46093
+ function isDeprecatedDeclaration2(declaration) {
46094
+ return !!(getCombinedNodeFlags(declaration) & 268435456 /* Deprecated */);
46093
46095
  }
46094
46096
  function addDeprecatedSuggestion(location, declarations, deprecatedEntity) {
46095
46097
  const diagnostic = createDiagnosticForNode(location, Diagnostics._0_is_deprecated, deprecatedEntity);
@@ -56982,16 +56984,16 @@ ${lanes.join("\n")}
56982
56984
  if (declaration.kind === 175 /* Constructor */) {
56983
56985
  return getDeclaredTypeOfClassOrInterface(getMergedSymbol(declaration.parent.symbol));
56984
56986
  }
56987
+ const typeNode = getEffectiveReturnTypeNode(declaration);
56985
56988
  if (isJSDocSignature(declaration)) {
56986
56989
  const root = getJSDocRoot(declaration);
56987
- if (root && isConstructorDeclaration(root.parent)) {
56990
+ if (root && isConstructorDeclaration(root.parent) && !typeNode) {
56988
56991
  return getDeclaredTypeOfClassOrInterface(getMergedSymbol(root.parent.parent.symbol));
56989
56992
  }
56990
56993
  }
56991
56994
  if (isJSDocConstructSignature(declaration)) {
56992
56995
  return getTypeFromTypeNode(declaration.parameters[0].type);
56993
56996
  }
56994
- const typeNode = getEffectiveReturnTypeNode(declaration);
56995
56997
  if (typeNode) {
56996
56998
  return getTypeFromTypeNode(typeNode);
56997
56999
  }
@@ -68249,7 +68251,7 @@ ${lanes.join("\n")}
68249
68251
  markAliasReferenced(symbol, node);
68250
68252
  }
68251
68253
  const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol);
68252
- const targetSymbol = checkDeprecatedAliasedSymbol(localOrExportSymbol, node);
68254
+ const targetSymbol = resolveAliasWithDeprecationCheck(localOrExportSymbol, node);
68253
68255
  if (isDeprecatedSymbol(targetSymbol) && isUncalledFunctionReference(node, targetSymbol) && targetSymbol.declarations) {
68254
68256
  addDeprecatedSuggestion(node, targetSymbol.declarations, node.escapedText);
68255
68257
  }
@@ -69418,6 +69420,7 @@ ${lanes.join("\n")}
69418
69420
  );
69419
69421
  }
69420
69422
  function discriminateContextualTypeByJSXAttributes(node, contextualType) {
69423
+ const jsxChildrenPropertyName = getJsxElementChildrenPropertyName(getJsxNamespaceAt(node));
69421
69424
  return discriminateTypeByDiscriminableItems(
69422
69425
  contextualType,
69423
69426
  concatenate(
@@ -69428,7 +69431,14 @@ ${lanes.join("\n")}
69428
69431
  map(
69429
69432
  filter(getPropertiesOfType(contextualType), (s) => {
69430
69433
  var _a;
69431
- return !!(s.flags & 16777216 /* Optional */) && !!((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members) && !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);
69434
+ if (!(s.flags & 16777216 /* Optional */) || !((_a = node == null ? void 0 : node.symbol) == null ? void 0 : _a.members)) {
69435
+ return false;
69436
+ }
69437
+ const element = node.parent.parent;
69438
+ if (s.escapedName === jsxChildrenPropertyName && isJsxElement(element) && getSemanticJsxChildren(element.children).length) {
69439
+ return false;
69440
+ }
69441
+ return !node.symbol.members.has(s.escapedName) && isDiscriminantProperty(contextualType, s.escapedName);
69432
69442
  }),
69433
69443
  (s) => [() => undefinedType, s.escapedName]
69434
69444
  )
@@ -71245,8 +71255,9 @@ ${lanes.join("\n")}
71245
71255
  addDeprecatedSuggestion(right, [indexInfo.declaration], right.escapedText);
71246
71256
  }
71247
71257
  } else {
71248
- if (isDeprecatedSymbol(prop) && isUncalledFunctionReference(node, prop) && prop.declarations) {
71249
- addDeprecatedSuggestion(right, prop.declarations, right.escapedText);
71258
+ const targetPropSymbol = resolveAliasWithDeprecationCheck(prop, right);
71259
+ if (isDeprecatedSymbol(targetPropSymbol) && isUncalledFunctionReference(node, targetPropSymbol) && targetPropSymbol.declarations) {
71260
+ addDeprecatedSuggestion(right, targetPropSymbol.declarations, right.escapedText);
71250
71261
  }
71251
71262
  checkPropertyNotUsedBeforeDeclaration(prop, node, right);
71252
71263
  markPropertyAsReferenced(prop, node, isSelfTypeAccess(left, parentSymbol));
@@ -81522,19 +81533,17 @@ ${lanes.join("\n")}
81522
81533
  }
81523
81534
  }
81524
81535
  if (isImportSpecifier(node)) {
81525
- const targetSymbol = checkDeprecatedAliasedSymbol(symbol, node);
81526
- if (isDeprecatedAliasedSymbol(targetSymbol) && targetSymbol.declarations) {
81536
+ const targetSymbol = resolveAliasWithDeprecationCheck(symbol, node);
81537
+ if (isDeprecatedSymbol(targetSymbol) && targetSymbol.declarations) {
81527
81538
  addDeprecatedSuggestion(node, targetSymbol.declarations, targetSymbol.escapedName);
81528
81539
  }
81529
81540
  }
81530
81541
  }
81531
81542
  }
81532
- function isDeprecatedAliasedSymbol(symbol) {
81533
- return !!symbol.declarations && every(symbol.declarations, (d) => !!(getCombinedNodeFlags(d) & 268435456 /* Deprecated */));
81534
- }
81535
- function checkDeprecatedAliasedSymbol(symbol, location) {
81536
- if (!(symbol.flags & 2097152 /* Alias */))
81543
+ function resolveAliasWithDeprecationCheck(symbol, location) {
81544
+ if (!(symbol.flags & 2097152 /* Alias */) || isDeprecatedSymbol(symbol) || !getDeclarationOfAliasSymbol(symbol)) {
81537
81545
  return symbol;
81546
+ }
81538
81547
  const targetSymbol = resolveAlias(symbol);
81539
81548
  if (targetSymbol === unknownSymbol)
81540
81549
  return targetSymbol;
@@ -81544,7 +81553,7 @@ ${lanes.join("\n")}
81544
81553
  if (target === targetSymbol)
81545
81554
  break;
81546
81555
  if (target.declarations && length(target.declarations)) {
81547
- if (isDeprecatedAliasedSymbol(target)) {
81556
+ if (isDeprecatedSymbol(target)) {
81548
81557
  addDeprecatedSuggestion(location, target.declarations, target.escapedName);
81549
81558
  break;
81550
81559
  } else {
@@ -104283,12 +104292,56 @@ ${lanes.join("\n")}
104283
104292
  return visitExportDeclaration(node);
104284
104293
  case 276 /* ExportAssignment */:
104285
104294
  return visitExportAssignment(node);
104295
+ case 261 /* FunctionDeclaration */:
104296
+ return visitFunctionDeclaration(node);
104297
+ case 262 /* ClassDeclaration */:
104298
+ return visitClassDeclaration(node);
104299
+ default:
104300
+ return topLevelNestedVisitor(node);
104301
+ }
104302
+ }
104303
+ function topLevelNestedVisitor(node) {
104304
+ switch (node.kind) {
104286
104305
  case 242 /* VariableStatement */:
104287
104306
  return visitVariableStatement(node);
104288
104307
  case 261 /* FunctionDeclaration */:
104289
104308
  return visitFunctionDeclaration(node);
104290
104309
  case 262 /* ClassDeclaration */:
104291
104310
  return visitClassDeclaration(node);
104311
+ case 247 /* ForStatement */:
104312
+ return visitForStatement(
104313
+ node,
104314
+ /*isTopLevel*/
104315
+ true
104316
+ );
104317
+ case 248 /* ForInStatement */:
104318
+ return visitForInStatement(node);
104319
+ case 249 /* ForOfStatement */:
104320
+ return visitForOfStatement(node);
104321
+ case 245 /* DoStatement */:
104322
+ return visitDoStatement(node);
104323
+ case 246 /* WhileStatement */:
104324
+ return visitWhileStatement(node);
104325
+ case 255 /* LabeledStatement */:
104326
+ return visitLabeledStatement(node);
104327
+ case 253 /* WithStatement */:
104328
+ return visitWithStatement(node);
104329
+ case 244 /* IfStatement */:
104330
+ return visitIfStatement(node);
104331
+ case 254 /* SwitchStatement */:
104332
+ return visitSwitchStatement(node);
104333
+ case 268 /* CaseBlock */:
104334
+ return visitCaseBlock(node);
104335
+ case 295 /* CaseClause */:
104336
+ return visitCaseClause(node);
104337
+ case 296 /* DefaultClause */:
104338
+ return visitDefaultClause(node);
104339
+ case 257 /* TryStatement */:
104340
+ return visitTryStatement(node);
104341
+ case 298 /* CatchClause */:
104342
+ return visitCatchClause(node);
104343
+ case 240 /* Block */:
104344
+ return visitBlock(node);
104292
104345
  default:
104293
104346
  return visitor(node);
104294
104347
  }
@@ -104299,7 +104352,11 @@ ${lanes.join("\n")}
104299
104352
  }
104300
104353
  switch (node.kind) {
104301
104354
  case 247 /* ForStatement */:
104302
- return visitForStatement(node);
104355
+ return visitForStatement(
104356
+ node,
104357
+ /*isTopLevel*/
104358
+ false
104359
+ );
104303
104360
  case 243 /* ExpressionStatement */:
104304
104361
  return visitExpressionStatement(node);
104305
104362
  case 216 /* ParenthesizedExpression */:
@@ -104384,15 +104441,177 @@ ${lanes.join("\n")}
104384
104441
  }
104385
104442
  return visitEachChild(node, visitor, context);
104386
104443
  }
104387
- function visitForStatement(node) {
104444
+ function visitForStatement(node, isTopLevel) {
104445
+ if (isTopLevel && node.initializer && isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
104446
+ const exportStatements = appendExportsOfVariableDeclarationList(
104447
+ /*statements*/
104448
+ void 0,
104449
+ node.initializer,
104450
+ /*isForInOrOfInitializer*/
104451
+ false
104452
+ );
104453
+ if (exportStatements) {
104454
+ const statements = [];
104455
+ const varDeclList = visitNode(node.initializer, discardedValueVisitor, isVariableDeclarationList);
104456
+ const varStatement = factory2.createVariableStatement(
104457
+ /*modifiers*/
104458
+ void 0,
104459
+ varDeclList
104460
+ );
104461
+ statements.push(varStatement);
104462
+ addRange(statements, exportStatements);
104463
+ const condition = visitNode(node.condition, visitor, isExpression);
104464
+ const incrementor = visitNode(node.incrementor, discardedValueVisitor, isExpression);
104465
+ const body = visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context);
104466
+ statements.push(factory2.updateForStatement(
104467
+ node,
104468
+ /*initializer*/
104469
+ void 0,
104470
+ condition,
104471
+ incrementor,
104472
+ body
104473
+ ));
104474
+ return statements;
104475
+ }
104476
+ }
104388
104477
  return factory2.updateForStatement(
104389
104478
  node,
104390
104479
  visitNode(node.initializer, discardedValueVisitor, isForInitializer),
104391
104480
  visitNode(node.condition, visitor, isExpression),
104392
104481
  visitNode(node.incrementor, discardedValueVisitor, isExpression),
104393
- visitIterationBody(node.statement, visitor, context)
104482
+ visitIterationBody(node.statement, isTopLevel ? topLevelNestedVisitor : visitor, context)
104483
+ );
104484
+ }
104485
+ function visitForInStatement(node) {
104486
+ if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
104487
+ const exportStatements = appendExportsOfVariableDeclarationList(
104488
+ /*statements*/
104489
+ void 0,
104490
+ node.initializer,
104491
+ /*isForInOrOfInitializer*/
104492
+ true
104493
+ );
104494
+ if (some(exportStatements)) {
104495
+ const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);
104496
+ const expression = visitNode(node.expression, visitor, isExpression);
104497
+ const body = visitIterationBody(node.statement, topLevelNestedVisitor, context);
104498
+ const mergedBody = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(
104499
+ [...exportStatements, body],
104500
+ /*multiLine*/
104501
+ true
104502
+ );
104503
+ return factory2.updateForInStatement(node, initializer, expression, mergedBody);
104504
+ }
104505
+ }
104506
+ return factory2.updateForInStatement(
104507
+ node,
104508
+ visitNode(node.initializer, discardedValueVisitor, isForInitializer),
104509
+ visitNode(node.expression, visitor, isExpression),
104510
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
104511
+ );
104512
+ }
104513
+ function visitForOfStatement(node) {
104514
+ if (isVariableDeclarationList(node.initializer) && !(node.initializer.flags & 3 /* BlockScoped */)) {
104515
+ const exportStatements = appendExportsOfVariableDeclarationList(
104516
+ /*statements*/
104517
+ void 0,
104518
+ node.initializer,
104519
+ /*isForInOrOfInitializer*/
104520
+ true
104521
+ );
104522
+ const initializer = visitNode(node.initializer, discardedValueVisitor, isForInitializer);
104523
+ const expression = visitNode(node.expression, visitor, isExpression);
104524
+ let body = visitIterationBody(node.statement, topLevelNestedVisitor, context);
104525
+ if (some(exportStatements)) {
104526
+ body = isBlock(body) ? factory2.updateBlock(body, [...exportStatements, ...body.statements]) : factory2.createBlock(
104527
+ [...exportStatements, body],
104528
+ /*multiLine*/
104529
+ true
104530
+ );
104531
+ }
104532
+ return factory2.updateForOfStatement(node, node.awaitModifier, initializer, expression, body);
104533
+ }
104534
+ return factory2.updateForOfStatement(
104535
+ node,
104536
+ node.awaitModifier,
104537
+ visitNode(node.initializer, discardedValueVisitor, isForInitializer),
104538
+ visitNode(node.expression, visitor, isExpression),
104539
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
104540
+ );
104541
+ }
104542
+ function visitDoStatement(node) {
104543
+ return factory2.updateDoStatement(
104544
+ node,
104545
+ visitIterationBody(node.statement, topLevelNestedVisitor, context),
104546
+ visitNode(node.expression, visitor, isExpression)
104547
+ );
104548
+ }
104549
+ function visitWhileStatement(node) {
104550
+ return factory2.updateWhileStatement(
104551
+ node,
104552
+ visitNode(node.expression, visitor, isExpression),
104553
+ visitIterationBody(node.statement, topLevelNestedVisitor, context)
104554
+ );
104555
+ }
104556
+ function visitLabeledStatement(node) {
104557
+ return factory2.updateLabeledStatement(
104558
+ node,
104559
+ node.label,
104560
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
104561
+ );
104562
+ }
104563
+ function visitWithStatement(node) {
104564
+ return factory2.updateWithStatement(
104565
+ node,
104566
+ visitNode(node.expression, visitor, isExpression),
104567
+ Debug.checkDefined(visitNode(node.statement, topLevelNestedVisitor, isStatement, factory2.liftToBlock))
104394
104568
  );
104395
104569
  }
104570
+ function visitIfStatement(node) {
104571
+ return factory2.updateIfStatement(
104572
+ node,
104573
+ visitNode(node.expression, visitor, isExpression),
104574
+ Debug.checkDefined(visitNode(node.thenStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)),
104575
+ visitNode(node.elseStatement, topLevelNestedVisitor, isStatement, factory2.liftToBlock)
104576
+ );
104577
+ }
104578
+ function visitSwitchStatement(node) {
104579
+ return factory2.updateSwitchStatement(
104580
+ node,
104581
+ visitNode(node.expression, visitor, isExpression),
104582
+ Debug.checkDefined(visitNode(node.caseBlock, topLevelNestedVisitor, isCaseBlock))
104583
+ );
104584
+ }
104585
+ function visitCaseBlock(node) {
104586
+ return factory2.updateCaseBlock(
104587
+ node,
104588
+ visitNodes2(node.clauses, topLevelNestedVisitor, isCaseOrDefaultClause)
104589
+ );
104590
+ }
104591
+ function visitCaseClause(node) {
104592
+ return factory2.updateCaseClause(
104593
+ node,
104594
+ visitNode(node.expression, visitor, isExpression),
104595
+ visitNodes2(node.statements, topLevelNestedVisitor, isStatement)
104596
+ );
104597
+ }
104598
+ function visitDefaultClause(node) {
104599
+ return visitEachChild(node, topLevelNestedVisitor, context);
104600
+ }
104601
+ function visitTryStatement(node) {
104602
+ return visitEachChild(node, topLevelNestedVisitor, context);
104603
+ }
104604
+ function visitCatchClause(node) {
104605
+ return factory2.updateCatchClause(
104606
+ node,
104607
+ node.variableDeclaration,
104608
+ Debug.checkDefined(visitNode(node.block, topLevelNestedVisitor, isBlock))
104609
+ );
104610
+ }
104611
+ function visitBlock(node) {
104612
+ node = visitEachChild(node, topLevelNestedVisitor, context);
104613
+ return node;
104614
+ }
104396
104615
  function visitExpressionStatement(node) {
104397
104616
  return factory2.updateExpressionStatement(
104398
104617
  node,
@@ -105185,25 +105404,33 @@ ${lanes.join("\n")}
105185
105404
  return appendExportsOfDeclaration(statements, decl);
105186
105405
  }
105187
105406
  function appendExportsOfVariableStatement(statements, node) {
105407
+ return appendExportsOfVariableDeclarationList(
105408
+ statements,
105409
+ node.declarationList,
105410
+ /*isForInOrOfInitializer*/
105411
+ false
105412
+ );
105413
+ }
105414
+ function appendExportsOfVariableDeclarationList(statements, node, isForInOrOfInitializer) {
105188
105415
  if (currentModuleInfo.exportEquals) {
105189
105416
  return statements;
105190
105417
  }
105191
- for (const decl of node.declarationList.declarations) {
105192
- statements = appendExportsOfBindingElement(statements, decl);
105418
+ for (const decl of node.declarations) {
105419
+ statements = appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer);
105193
105420
  }
105194
105421
  return statements;
105195
105422
  }
105196
- function appendExportsOfBindingElement(statements, decl) {
105423
+ function appendExportsOfBindingElement(statements, decl, isForInOrOfInitializer) {
105197
105424
  if (currentModuleInfo.exportEquals) {
105198
105425
  return statements;
105199
105426
  }
105200
105427
  if (isBindingPattern(decl.name)) {
105201
105428
  for (const element of decl.name.elements) {
105202
105429
  if (!isOmittedExpression(element)) {
105203
- statements = appendExportsOfBindingElement(statements, element);
105430
+ statements = appendExportsOfBindingElement(statements, element, isForInOrOfInitializer);
105204
105431
  }
105205
105432
  }
105206
- } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer)) {
105433
+ } else if (!isGeneratedIdentifier(decl.name) && (!isVariableDeclaration(decl) || decl.initializer || isForInOrOfInitializer)) {
105207
105434
  statements = appendExportsOfDeclaration(statements, decl);
105208
105435
  }
105209
105436
  return statements;
@@ -122901,7 +123128,9 @@ ${lanes.join("\n")}
122901
123128
  MissingSourceMapFile: "Missing source map file",
122902
123129
  NoopConfigFileForInferredRoot: "Noop Config file for the inferred project root",
122903
123130
  MissingGeneratedFile: "Missing generated file",
122904
- NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation"
123131
+ NodeModulesForModuleSpecifierCache: "node_modules for module specifier cache invalidation",
123132
+ TypingInstallerLocationFile: "File location for typing installer",
123133
+ TypingInstallerLocationDirectory: "Directory location for typing installer"
122905
123134
  };
122906
123135
  }
122907
123136
  });
@@ -126118,7 +126347,7 @@ ${lanes.join("\n")}
126118
126347
  const d = /* @__PURE__ */ new Date();
126119
126348
  return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`;
126120
126349
  }
126121
- var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, Arguments;
126350
+ var ActionSet, ActionInvalidate, ActionPackageInstalled, EventTypesRegistry, EventBeginInstallTypes, EventEndInstallTypes, EventInitializationFailed, ActionWatchTypingLocations, Arguments;
126122
126351
  var init_shared = __esm({
126123
126352
  "src/jsTyping/shared.ts"() {
126124
126353
  "use strict";
@@ -126130,6 +126359,7 @@ ${lanes.join("\n")}
126130
126359
  EventBeginInstallTypes = "event::beginInstallTypes";
126131
126360
  EventEndInstallTypes = "event::endInstallTypes";
126132
126361
  EventInitializationFailed = "event::initializationFailed";
126362
+ ActionWatchTypingLocations = "action::watchTypingLocations";
126133
126363
  ((Arguments2) => {
126134
126364
  Arguments2.GlobalCacheLocation = "--globalTypingsCacheLocation";
126135
126365
  Arguments2.LogFile = "--logFile";
@@ -126155,6 +126385,7 @@ ${lanes.join("\n")}
126155
126385
  ActionInvalidate: () => ActionInvalidate,
126156
126386
  ActionPackageInstalled: () => ActionPackageInstalled,
126157
126387
  ActionSet: () => ActionSet,
126388
+ ActionWatchTypingLocations: () => ActionWatchTypingLocations,
126158
126389
  Arguments: () => Arguments,
126159
126390
  EventBeginInstallTypes: () => EventBeginInstallTypes,
126160
126391
  EventEndInstallTypes: () => EventEndInstallTypes,