typescript 5.0.0-dev.20221213 → 5.0.0-dev.20221214

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.
@@ -404,24 +404,25 @@ declare namespace ts {
404
404
  JSDocReadonlyTag = 339,
405
405
  JSDocOverrideTag = 340,
406
406
  JSDocCallbackTag = 341,
407
- JSDocEnumTag = 342,
408
- JSDocParameterTag = 343,
409
- JSDocReturnTag = 344,
410
- JSDocThisTag = 345,
411
- JSDocTypeTag = 346,
412
- JSDocTemplateTag = 347,
413
- JSDocTypedefTag = 348,
414
- JSDocSeeTag = 349,
415
- JSDocPropertyTag = 350,
416
- JSDocThrowsTag = 351,
417
- SyntaxList = 352,
418
- NotEmittedStatement = 353,
419
- PartiallyEmittedExpression = 354,
420
- CommaListExpression = 355,
421
- MergeDeclarationMarker = 356,
422
- EndOfDeclarationMarker = 357,
423
- SyntheticReferenceExpression = 358,
424
- Count = 359,
407
+ JSDocOverloadTag = 342,
408
+ JSDocEnumTag = 343,
409
+ JSDocParameterTag = 344,
410
+ JSDocReturnTag = 345,
411
+ JSDocThisTag = 346,
412
+ JSDocTypeTag = 347,
413
+ JSDocTemplateTag = 348,
414
+ JSDocTypedefTag = 349,
415
+ JSDocSeeTag = 350,
416
+ JSDocPropertyTag = 351,
417
+ JSDocThrowsTag = 352,
418
+ SyntaxList = 353,
419
+ NotEmittedStatement = 354,
420
+ PartiallyEmittedExpression = 355,
421
+ CommaListExpression = 356,
422
+ MergeDeclarationMarker = 357,
423
+ EndOfDeclarationMarker = 358,
424
+ SyntheticReferenceExpression = 359,
425
+ Count = 360,
425
426
  FirstAssignment = 63,
426
427
  LastAssignment = 78,
427
428
  FirstCompoundAssignment = 64,
@@ -450,9 +451,9 @@ declare namespace ts {
450
451
  LastStatement = 256,
451
452
  FirstNode = 163,
452
453
  FirstJSDocNode = 312,
453
- LastJSDocNode = 351,
454
+ LastJSDocNode = 352,
454
455
  FirstJSDocTagNode = 330,
455
- LastJSDocTagNode = 351
456
+ LastJSDocTagNode = 352
456
457
  }
457
458
  type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia;
458
459
  type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral;
@@ -578,9 +579,16 @@ declare namespace ts {
578
579
  */
579
580
  readonly modifiers?: NodeArray<ModifierLike> | undefined;
580
581
  }
581
- interface JSDocContainer {
582
+ interface JSDocContainer extends Node {
583
+ _jsdocContainerBrand: any;
582
584
  }
583
- type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ClassStaticBlockDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | EmptyStatement | DebuggerStatement | Block | VariableStatement | ExpressionStatement | IfStatement | DoStatement | WhileStatement | ForStatement | ForInStatement | ForOfStatement | BreakStatement | ContinueStatement | ReturnStatement | WithStatement | SwitchStatement | LabeledStatement | ThrowStatement | TryStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | VariableDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | ImportDeclaration | NamespaceExportDeclaration | ExportAssignment | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | NamedTupleMember | ExportSpecifier | CaseClause | EndOfFileToken;
585
+ interface LocalsContainer extends Node {
586
+ _localsContainerBrand: any;
587
+ }
588
+ interface FlowContainer extends Node {
589
+ _flowContainerBrand: any;
590
+ }
591
+ 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;
584
592
  type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
585
593
  type HasTypeArguments = CallExpression | NewExpression | TaggedTemplateExpression | JsxOpeningElement | JsxSelfClosingElement;
586
594
  type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
@@ -612,6 +620,7 @@ declare namespace ts {
612
620
  type AssertsKeyword = KeywordToken<SyntaxKind.AssertsKeyword>;
613
621
  type AssertKeyword = KeywordToken<SyntaxKind.AssertKeyword>;
614
622
  type AwaitKeyword = KeywordToken<SyntaxKind.AwaitKeyword>;
623
+ type CaseKeyword = KeywordToken<SyntaxKind.CaseKeyword>;
615
624
  /** @deprecated Use `AwaitKeyword` instead. */
616
625
  type AwaitKeywordToken = AwaitKeyword;
617
626
  /** @deprecated Use `AssertsKeyword` instead. */
@@ -648,7 +657,7 @@ declare namespace ts {
648
657
  FileLevel = 32,
649
658
  AllowNameSubstitution = 64
650
659
  }
651
- interface Identifier extends PrimaryExpression, Declaration {
660
+ interface Identifier extends PrimaryExpression, Declaration, JSDocContainer, FlowContainer {
652
661
  readonly kind: SyntaxKind.Identifier;
653
662
  /**
654
663
  * Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
@@ -664,7 +673,7 @@ declare namespace ts {
664
673
  interface TransientIdentifier extends Identifier {
665
674
  resolvedSymbol: Symbol;
666
675
  }
667
- interface QualifiedName extends Node {
676
+ interface QualifiedName extends Node, FlowContainer {
668
677
  readonly kind: SyntaxKind.QualifiedName;
669
678
  readonly left: EntityName;
670
679
  readonly right: Identifier;
@@ -699,7 +708,7 @@ declare namespace ts {
699
708
  readonly parent: NamedDeclaration;
700
709
  readonly expression: LeftHandSideExpression;
701
710
  }
702
- interface TypeParameterDeclaration extends NamedDeclaration {
711
+ interface TypeParameterDeclaration extends NamedDeclaration, JSDocContainer {
703
712
  readonly kind: SyntaxKind.TypeParameter;
704
713
  readonly parent: DeclarationWithTypeParameterChildren | InferTypeNode;
705
714
  readonly modifiers?: NodeArray<Modifier>;
@@ -717,10 +726,10 @@ declare namespace ts {
717
726
  readonly type?: TypeNode | undefined;
718
727
  }
719
728
  type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
720
- interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
729
+ interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
721
730
  readonly kind: SyntaxKind.CallSignature;
722
731
  }
723
- interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
732
+ interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement, LocalsContainer {
724
733
  readonly kind: SyntaxKind.ConstructSignature;
725
734
  }
726
735
  type BindingName = Identifier | BindingPattern;
@@ -747,7 +756,7 @@ declare namespace ts {
747
756
  readonly type?: TypeNode;
748
757
  readonly initializer?: Expression;
749
758
  }
750
- interface BindingElement extends NamedDeclaration {
759
+ interface BindingElement extends NamedDeclaration, FlowContainer {
751
760
  readonly kind: SyntaxKind.BindingElement;
752
761
  readonly parent: BindingPattern;
753
762
  readonly propertyName?: PropertyName;
@@ -757,6 +766,7 @@ declare namespace ts {
757
766
  }
758
767
  interface PropertySignature extends TypeElement, JSDocContainer {
759
768
  readonly kind: SyntaxKind.PropertySignature;
769
+ readonly parent: TypeLiteralNode | InterfaceDeclaration;
760
770
  readonly modifiers?: NodeArray<Modifier>;
761
771
  readonly name: PropertyName;
762
772
  readonly questionToken?: QuestionToken;
@@ -818,9 +828,6 @@ declare namespace ts {
818
828
  readonly expression: Expression;
819
829
  }
820
830
  type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
821
- interface PropertyLikeDeclaration extends NamedDeclaration {
822
- readonly name: PropertyName;
823
- }
824
831
  interface ObjectBindingPattern extends Node {
825
832
  readonly kind: SyntaxKind.ObjectBindingPattern;
826
833
  readonly parent: VariableDeclaration | ParameterDeclaration | BindingElement;
@@ -851,26 +858,26 @@ declare namespace ts {
851
858
  type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
852
859
  /** @deprecated Use SignatureDeclaration */
853
860
  type FunctionLike = SignatureDeclaration;
854
- interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
861
+ interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement, LocalsContainer {
855
862
  readonly kind: SyntaxKind.FunctionDeclaration;
856
863
  readonly modifiers?: NodeArray<Modifier>;
857
864
  readonly name?: Identifier;
858
865
  readonly body?: FunctionBody;
859
866
  }
860
- interface MethodSignature extends SignatureDeclarationBase, TypeElement {
867
+ interface MethodSignature extends SignatureDeclarationBase, TypeElement, LocalsContainer {
861
868
  readonly kind: SyntaxKind.MethodSignature;
862
- readonly parent: ObjectTypeDeclaration;
869
+ readonly parent: TypeLiteralNode | InterfaceDeclaration;
863
870
  readonly modifiers?: NodeArray<Modifier>;
864
871
  readonly name: PropertyName;
865
872
  }
866
- interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
873
+ interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
867
874
  readonly kind: SyntaxKind.MethodDeclaration;
868
875
  readonly parent: ClassLikeDeclaration | ObjectLiteralExpression;
869
876
  readonly modifiers?: NodeArray<ModifierLike> | undefined;
870
877
  readonly name: PropertyName;
871
878
  readonly body?: FunctionBody | undefined;
872
879
  }
873
- interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
880
+ interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer, LocalsContainer {
874
881
  readonly kind: SyntaxKind.Constructor;
875
882
  readonly parent: ClassLikeDeclaration;
876
883
  readonly modifiers?: NodeArray<Modifier> | undefined;
@@ -881,14 +888,14 @@ declare namespace ts {
881
888
  readonly kind: SyntaxKind.SemicolonClassElement;
882
889
  readonly parent: ClassLikeDeclaration;
883
890
  }
884
- interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
891
+ interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
885
892
  readonly kind: SyntaxKind.GetAccessor;
886
893
  readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
887
894
  readonly modifiers?: NodeArray<ModifierLike>;
888
895
  readonly name: PropertyName;
889
896
  readonly body?: FunctionBody;
890
897
  }
891
- interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer {
898
+ interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, TypeElement, ObjectLiteralElement, JSDocContainer, LocalsContainer, FlowContainer {
892
899
  readonly kind: SyntaxKind.SetAccessor;
893
900
  readonly parent: ClassLikeDeclaration | ObjectLiteralExpression | TypeLiteralNode | InterfaceDeclaration;
894
901
  readonly modifiers?: NodeArray<ModifierLike>;
@@ -896,13 +903,13 @@ declare namespace ts {
896
903
  readonly body?: FunctionBody;
897
904
  }
898
905
  type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
899
- interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
906
+ interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement, LocalsContainer {
900
907
  readonly kind: SyntaxKind.IndexSignature;
901
908
  readonly parent: ObjectTypeDeclaration;
902
909
  readonly modifiers?: NodeArray<Modifier>;
903
910
  readonly type: TypeNode;
904
911
  }
905
- interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer {
912
+ interface ClassStaticBlockDeclaration extends ClassElement, JSDocContainer, LocalsContainer {
906
913
  readonly kind: SyntaxKind.ClassStaticBlockDeclaration;
907
914
  readonly parent: ClassDeclaration | ClassExpression;
908
915
  readonly body: Block;
@@ -934,14 +941,14 @@ declare namespace ts {
934
941
  readonly kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
935
942
  readonly type: TypeNode;
936
943
  }
937
- interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
944
+ interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
938
945
  readonly kind: SyntaxKind.FunctionType;
939
946
  }
940
947
  interface FunctionTypeNode {
941
948
  /** @deprecated A function type cannot have modifiers */
942
949
  readonly modifiers?: NodeArray<Modifier> | undefined;
943
950
  }
944
- interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
951
+ interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase, LocalsContainer {
945
952
  readonly kind: SyntaxKind.ConstructorType;
946
953
  readonly modifiers?: NodeArray<Modifier>;
947
954
  }
@@ -976,7 +983,7 @@ declare namespace ts {
976
983
  readonly kind: SyntaxKind.TupleType;
977
984
  readonly elements: NodeArray<TypeNode | NamedTupleMember>;
978
985
  }
979
- interface NamedTupleMember extends TypeNode, JSDocContainer, Declaration {
986
+ interface NamedTupleMember extends TypeNode, Declaration, JSDocContainer {
980
987
  readonly kind: SyntaxKind.NamedTupleMember;
981
988
  readonly dotDotDotToken?: Token<SyntaxKind.DotDotDotToken>;
982
989
  readonly name: Identifier;
@@ -1000,7 +1007,7 @@ declare namespace ts {
1000
1007
  readonly kind: SyntaxKind.IntersectionType;
1001
1008
  readonly types: NodeArray<TypeNode>;
1002
1009
  }
1003
- interface ConditionalTypeNode extends TypeNode {
1010
+ interface ConditionalTypeNode extends TypeNode, LocalsContainer {
1004
1011
  readonly kind: SyntaxKind.ConditionalType;
1005
1012
  readonly checkType: TypeNode;
1006
1013
  readonly extendsType: TypeNode;
@@ -1025,7 +1032,7 @@ declare namespace ts {
1025
1032
  readonly objectType: TypeNode;
1026
1033
  readonly indexType: TypeNode;
1027
1034
  }
1028
- interface MappedTypeNode extends TypeNode, Declaration {
1035
+ interface MappedTypeNode extends TypeNode, Declaration, LocalsContainer {
1029
1036
  readonly kind: SyntaxKind.MappedType;
1030
1037
  readonly readonlyToken?: ReadonlyKeyword | PlusToken | MinusToken;
1031
1038
  readonly typeParameter: TypeParameterDeclaration;
@@ -1104,10 +1111,10 @@ declare namespace ts {
1104
1111
  readonly kind: SyntaxKind.FalseKeyword;
1105
1112
  }
1106
1113
  type BooleanLiteral = TrueLiteral | FalseLiteral;
1107
- interface ThisExpression extends PrimaryExpression {
1114
+ interface ThisExpression extends PrimaryExpression, FlowContainer {
1108
1115
  readonly kind: SyntaxKind.ThisKeyword;
1109
1116
  }
1110
- interface SuperExpression extends PrimaryExpression {
1117
+ interface SuperExpression extends PrimaryExpression, FlowContainer {
1111
1118
  readonly kind: SyntaxKind.SuperKeyword;
1112
1119
  }
1113
1120
  interface ImportExpression extends PrimaryExpression {
@@ -1161,7 +1168,7 @@ declare namespace ts {
1161
1168
  type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
1162
1169
  type LogicalOrCoalescingAssignmentOperator = SyntaxKind.AmpersandAmpersandEqualsToken | SyntaxKind.BarBarEqualsToken | SyntaxKind.QuestionQuestionEqualsToken;
1163
1170
  type BinaryOperatorToken = Token<BinaryOperator>;
1164
- interface BinaryExpression extends Expression, Declaration {
1171
+ interface BinaryExpression extends Expression, Declaration, JSDocContainer {
1165
1172
  readonly kind: SyntaxKind.BinaryExpression;
1166
1173
  readonly left: Expression;
1167
1174
  readonly operatorToken: BinaryOperatorToken;
@@ -1198,13 +1205,13 @@ declare namespace ts {
1198
1205
  }
1199
1206
  type FunctionBody = Block;
1200
1207
  type ConciseBody = FunctionBody | Expression;
1201
- interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
1208
+ interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
1202
1209
  readonly kind: SyntaxKind.FunctionExpression;
1203
1210
  readonly modifiers?: NodeArray<Modifier>;
1204
1211
  readonly name?: Identifier;
1205
1212
  readonly body: FunctionBody;
1206
1213
  }
1207
- interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {
1214
+ interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer, LocalsContainer, FlowContainer {
1208
1215
  readonly kind: SyntaxKind.ArrowFunction;
1209
1216
  readonly modifiers?: NodeArray<Modifier>;
1210
1217
  readonly equalsGreaterThanToken: EqualsGreaterThanToken;
@@ -1291,13 +1298,13 @@ declare namespace ts {
1291
1298
  interface ObjectLiteralExpressionBase<T extends ObjectLiteralElement> extends PrimaryExpression, Declaration {
1292
1299
  readonly properties: NodeArray<T>;
1293
1300
  }
1294
- interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike> {
1301
+ interface ObjectLiteralExpression extends ObjectLiteralExpressionBase<ObjectLiteralElementLike>, JSDocContainer {
1295
1302
  readonly kind: SyntaxKind.ObjectLiteralExpression;
1296
1303
  }
1297
1304
  type EntityNameExpression = Identifier | PropertyAccessEntityNameExpression;
1298
1305
  type EntityNameOrEntityNameExpression = EntityName | EntityNameExpression;
1299
1306
  type AccessExpression = PropertyAccessExpression | ElementAccessExpression;
1300
- interface PropertyAccessExpression extends MemberExpression, NamedDeclaration {
1307
+ interface PropertyAccessExpression extends MemberExpression, NamedDeclaration, JSDocContainer, FlowContainer {
1301
1308
  readonly kind: SyntaxKind.PropertyAccessExpression;
1302
1309
  readonly expression: LeftHandSideExpression;
1303
1310
  readonly questionDotToken?: QuestionDotToken;
@@ -1316,7 +1323,7 @@ declare namespace ts {
1316
1323
  readonly expression: EntityNameExpression;
1317
1324
  readonly name: Identifier;
1318
1325
  }
1319
- interface ElementAccessExpression extends MemberExpression {
1326
+ interface ElementAccessExpression extends MemberExpression, Declaration, JSDocContainer, FlowContainer {
1320
1327
  readonly kind: SyntaxKind.ElementAccessExpression;
1321
1328
  readonly expression: LeftHandSideExpression;
1322
1329
  readonly questionDotToken?: QuestionDotToken;
@@ -1386,7 +1393,7 @@ declare namespace ts {
1386
1393
  interface NonNullChain extends NonNullExpression {
1387
1394
  _optionalChainBrand: any;
1388
1395
  }
1389
- interface MetaProperty extends PrimaryExpression {
1396
+ interface MetaProperty extends PrimaryExpression, FlowContainer {
1390
1397
  readonly kind: SyntaxKind.MetaProperty;
1391
1398
  readonly keywordToken: SyntaxKind.NewKeyword | SyntaxKind.ImportKeyword;
1392
1399
  readonly name: Identifier;
@@ -1479,7 +1486,7 @@ declare namespace ts {
1479
1486
  interface EmptyStatement extends Statement {
1480
1487
  readonly kind: SyntaxKind.EmptyStatement;
1481
1488
  }
1482
- interface DebuggerStatement extends Statement {
1489
+ interface DebuggerStatement extends Statement, FlowContainer {
1483
1490
  readonly kind: SyntaxKind.DebuggerStatement;
1484
1491
  }
1485
1492
  interface MissingDeclaration extends DeclarationStatement {
@@ -1487,20 +1494,20 @@ declare namespace ts {
1487
1494
  readonly name?: Identifier;
1488
1495
  }
1489
1496
  type BlockLike = SourceFile | Block | ModuleBlock | CaseOrDefaultClause;
1490
- interface Block extends Statement {
1497
+ interface Block extends Statement, LocalsContainer {
1491
1498
  readonly kind: SyntaxKind.Block;
1492
1499
  readonly statements: NodeArray<Statement>;
1493
1500
  }
1494
- interface VariableStatement extends Statement {
1501
+ interface VariableStatement extends Statement, FlowContainer {
1495
1502
  readonly kind: SyntaxKind.VariableStatement;
1496
1503
  readonly modifiers?: NodeArray<Modifier>;
1497
1504
  readonly declarationList: VariableDeclarationList;
1498
1505
  }
1499
- interface ExpressionStatement extends Statement {
1506
+ interface ExpressionStatement extends Statement, FlowContainer {
1500
1507
  readonly kind: SyntaxKind.ExpressionStatement;
1501
1508
  readonly expression: Expression;
1502
1509
  }
1503
- interface IfStatement extends Statement {
1510
+ interface IfStatement extends Statement, FlowContainer {
1504
1511
  readonly kind: SyntaxKind.IfStatement;
1505
1512
  readonly expression: Expression;
1506
1513
  readonly thenStatement: Statement;
@@ -1509,58 +1516,58 @@ declare namespace ts {
1509
1516
  interface IterationStatement extends Statement {
1510
1517
  readonly statement: Statement;
1511
1518
  }
1512
- interface DoStatement extends IterationStatement {
1519
+ interface DoStatement extends IterationStatement, FlowContainer {
1513
1520
  readonly kind: SyntaxKind.DoStatement;
1514
1521
  readonly expression: Expression;
1515
1522
  }
1516
- interface WhileStatement extends IterationStatement {
1523
+ interface WhileStatement extends IterationStatement, FlowContainer {
1517
1524
  readonly kind: SyntaxKind.WhileStatement;
1518
1525
  readonly expression: Expression;
1519
1526
  }
1520
1527
  type ForInitializer = VariableDeclarationList | Expression;
1521
- interface ForStatement extends IterationStatement {
1528
+ interface ForStatement extends IterationStatement, LocalsContainer, FlowContainer {
1522
1529
  readonly kind: SyntaxKind.ForStatement;
1523
1530
  readonly initializer?: ForInitializer;
1524
1531
  readonly condition?: Expression;
1525
1532
  readonly incrementor?: Expression;
1526
1533
  }
1527
1534
  type ForInOrOfStatement = ForInStatement | ForOfStatement;
1528
- interface ForInStatement extends IterationStatement {
1535
+ interface ForInStatement extends IterationStatement, LocalsContainer, FlowContainer {
1529
1536
  readonly kind: SyntaxKind.ForInStatement;
1530
1537
  readonly initializer: ForInitializer;
1531
1538
  readonly expression: Expression;
1532
1539
  }
1533
- interface ForOfStatement extends IterationStatement {
1540
+ interface ForOfStatement extends IterationStatement, LocalsContainer, FlowContainer {
1534
1541
  readonly kind: SyntaxKind.ForOfStatement;
1535
1542
  readonly awaitModifier?: AwaitKeyword;
1536
1543
  readonly initializer: ForInitializer;
1537
1544
  readonly expression: Expression;
1538
1545
  }
1539
- interface BreakStatement extends Statement {
1546
+ interface BreakStatement extends Statement, FlowContainer {
1540
1547
  readonly kind: SyntaxKind.BreakStatement;
1541
1548
  readonly label?: Identifier;
1542
1549
  }
1543
- interface ContinueStatement extends Statement {
1550
+ interface ContinueStatement extends Statement, FlowContainer {
1544
1551
  readonly kind: SyntaxKind.ContinueStatement;
1545
1552
  readonly label?: Identifier;
1546
1553
  }
1547
1554
  type BreakOrContinueStatement = BreakStatement | ContinueStatement;
1548
- interface ReturnStatement extends Statement {
1555
+ interface ReturnStatement extends Statement, FlowContainer {
1549
1556
  readonly kind: SyntaxKind.ReturnStatement;
1550
1557
  readonly expression?: Expression;
1551
1558
  }
1552
- interface WithStatement extends Statement {
1559
+ interface WithStatement extends Statement, FlowContainer {
1553
1560
  readonly kind: SyntaxKind.WithStatement;
1554
1561
  readonly expression: Expression;
1555
1562
  readonly statement: Statement;
1556
1563
  }
1557
- interface SwitchStatement extends Statement {
1564
+ interface SwitchStatement extends Statement, FlowContainer {
1558
1565
  readonly kind: SyntaxKind.SwitchStatement;
1559
1566
  readonly expression: Expression;
1560
1567
  readonly caseBlock: CaseBlock;
1561
1568
  possiblyExhaustive?: boolean;
1562
1569
  }
1563
- interface CaseBlock extends Node {
1570
+ interface CaseBlock extends Node, LocalsContainer {
1564
1571
  readonly kind: SyntaxKind.CaseBlock;
1565
1572
  readonly parent: SwitchStatement;
1566
1573
  readonly clauses: NodeArray<CaseOrDefaultClause>;
@@ -1577,22 +1584,22 @@ declare namespace ts {
1577
1584
  readonly statements: NodeArray<Statement>;
1578
1585
  }
1579
1586
  type CaseOrDefaultClause = CaseClause | DefaultClause;
1580
- interface LabeledStatement extends Statement {
1587
+ interface LabeledStatement extends Statement, FlowContainer {
1581
1588
  readonly kind: SyntaxKind.LabeledStatement;
1582
1589
  readonly label: Identifier;
1583
1590
  readonly statement: Statement;
1584
1591
  }
1585
- interface ThrowStatement extends Statement {
1592
+ interface ThrowStatement extends Statement, FlowContainer {
1586
1593
  readonly kind: SyntaxKind.ThrowStatement;
1587
1594
  readonly expression: Expression;
1588
1595
  }
1589
- interface TryStatement extends Statement {
1596
+ interface TryStatement extends Statement, FlowContainer {
1590
1597
  readonly kind: SyntaxKind.TryStatement;
1591
1598
  readonly tryBlock: Block;
1592
1599
  readonly catchClause?: CatchClause;
1593
1600
  readonly finallyBlock?: Block;
1594
1601
  }
1595
- interface CatchClause extends Node {
1602
+ interface CatchClause extends Node, LocalsContainer {
1596
1603
  readonly kind: SyntaxKind.CatchClause;
1597
1604
  readonly parent: TryStatement;
1598
1605
  readonly variableDeclaration?: VariableDeclaration;
@@ -1642,7 +1649,7 @@ declare namespace ts {
1642
1649
  readonly token: SyntaxKind.ExtendsKeyword | SyntaxKind.ImplementsKeyword;
1643
1650
  readonly types: NodeArray<ExpressionWithTypeArguments>;
1644
1651
  }
1645
- interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer {
1652
+ interface TypeAliasDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
1646
1653
  readonly kind: SyntaxKind.TypeAliasDeclaration;
1647
1654
  readonly modifiers?: NodeArray<Modifier>;
1648
1655
  readonly name: Identifier;
@@ -1663,7 +1670,7 @@ declare namespace ts {
1663
1670
  }
1664
1671
  type ModuleName = Identifier | StringLiteral;
1665
1672
  type ModuleBody = NamespaceBody | JSDocNamespaceBody;
1666
- interface ModuleDeclaration extends DeclarationStatement, JSDocContainer {
1673
+ interface ModuleDeclaration extends DeclarationStatement, JSDocContainer, LocalsContainer {
1667
1674
  readonly kind: SyntaxKind.ModuleDeclaration;
1668
1675
  readonly parent: ModuleBody | SourceFile;
1669
1676
  readonly modifiers?: NodeArray<Modifier>;
@@ -1879,7 +1886,7 @@ declare namespace ts {
1879
1886
  readonly kind: SyntaxKind.JSDocOptionalType;
1880
1887
  readonly type: TypeNode;
1881
1888
  }
1882
- interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase {
1889
+ interface JSDocFunctionType extends JSDocType, SignatureDeclarationBase, LocalsContainer {
1883
1890
  readonly kind: SyntaxKind.JSDocFunctionType;
1884
1891
  }
1885
1892
  interface JSDocVariadicType extends JSDocType {
@@ -1965,7 +1972,7 @@ declare namespace ts {
1965
1972
  interface JSDocOverrideTag extends JSDocTag {
1966
1973
  readonly kind: SyntaxKind.JSDocOverrideTag;
1967
1974
  }
1968
- interface JSDocEnumTag extends JSDocTag, Declaration {
1975
+ interface JSDocEnumTag extends JSDocTag, Declaration, LocalsContainer {
1969
1976
  readonly kind: SyntaxKind.JSDocEnumTag;
1970
1977
  readonly parent: JSDoc;
1971
1978
  readonly typeExpression: JSDocTypeExpression;
@@ -1991,25 +1998,30 @@ declare namespace ts {
1991
1998
  readonly kind: SyntaxKind.JSDocTypeTag;
1992
1999
  readonly typeExpression: JSDocTypeExpression;
1993
2000
  }
1994
- interface JSDocTypedefTag extends JSDocTag, NamedDeclaration {
2001
+ interface JSDocTypedefTag extends JSDocTag, NamedDeclaration, LocalsContainer {
1995
2002
  readonly kind: SyntaxKind.JSDocTypedefTag;
1996
2003
  readonly parent: JSDoc;
1997
2004
  readonly fullName?: JSDocNamespaceDeclaration | Identifier;
1998
2005
  readonly name?: Identifier;
1999
2006
  readonly typeExpression?: JSDocTypeExpression | JSDocTypeLiteral;
2000
2007
  }
2001
- interface JSDocCallbackTag extends JSDocTag, NamedDeclaration {
2008
+ interface JSDocCallbackTag extends JSDocTag, NamedDeclaration, LocalsContainer {
2002
2009
  readonly kind: SyntaxKind.JSDocCallbackTag;
2003
2010
  readonly parent: JSDoc;
2004
2011
  readonly fullName?: JSDocNamespaceDeclaration | Identifier;
2005
2012
  readonly name?: Identifier;
2006
2013
  readonly typeExpression: JSDocSignature;
2007
2014
  }
2015
+ interface JSDocOverloadTag extends JSDocTag {
2016
+ readonly kind: SyntaxKind.JSDocOverloadTag;
2017
+ readonly parent: JSDoc;
2018
+ readonly typeExpression: JSDocSignature;
2019
+ }
2008
2020
  interface JSDocThrowsTag extends JSDocTag {
2009
2021
  readonly kind: SyntaxKind.JSDocThrowsTag;
2010
2022
  readonly typeExpression?: JSDocTypeExpression;
2011
2023
  }
2012
- interface JSDocSignature extends JSDocType, Declaration {
2024
+ interface JSDocSignature extends JSDocType, Declaration, JSDocContainer, LocalsContainer {
2013
2025
  readonly kind: SyntaxKind.JSDocSignature;
2014
2026
  readonly typeParameters?: readonly JSDocTemplateTag[];
2015
2027
  readonly parameters: readonly JSDocParameterTag[];
@@ -2029,7 +2041,7 @@ declare namespace ts {
2029
2041
  interface JSDocParameterTag extends JSDocPropertyLikeTag {
2030
2042
  readonly kind: SyntaxKind.JSDocParameterTag;
2031
2043
  }
2032
- interface JSDocTypeLiteral extends JSDocType {
2044
+ interface JSDocTypeLiteral extends JSDocType, Declaration {
2033
2045
  readonly kind: SyntaxKind.JSDocTypeLiteral;
2034
2046
  readonly jsDocPropertyTags?: readonly JSDocPropertyLikeTag[];
2035
2047
  /** If true, then this type literal represents an *array* of its type. */
@@ -2109,7 +2121,7 @@ declare namespace ts {
2109
2121
  getLineAndCharacterOfPosition(pos: number): LineAndCharacter;
2110
2122
  }
2111
2123
  type ResolutionMode = ModuleKind.ESNext | ModuleKind.CommonJS | undefined;
2112
- interface SourceFile extends Declaration {
2124
+ interface SourceFile extends Declaration, LocalsContainer {
2113
2125
  readonly kind: SyntaxKind.SourceFile;
2114
2126
  readonly statements: NodeArray<Statement>;
2115
2127
  readonly endOfFileToken: Token<SyntaxKind.EndOfFileToken>;
@@ -3032,7 +3044,8 @@ declare namespace ts {
3032
3044
  Classic = 1,
3033
3045
  NodeJs = 2,
3034
3046
  Node16 = 3,
3035
- NodeNext = 99
3047
+ NodeNext = 99,
3048
+ Bundler = 100
3036
3049
  }
3037
3050
  enum ModuleDetectionKind {
3038
3051
  /**
@@ -3083,6 +3096,7 @@ declare namespace ts {
3083
3096
  }
3084
3097
  type CompilerOptionsValue = string | number | boolean | (string | number)[] | string[] | MapLike<string[]> | PluginImport[] | ProjectReference[] | null | undefined;
3085
3098
  interface CompilerOptions {
3099
+ allowImportingTsExtensions?: boolean;
3086
3100
  allowJs?: boolean;
3087
3101
  allowSyntheticDefaultImports?: boolean;
3088
3102
  allowUmdGlobalAccess?: boolean;
@@ -3092,6 +3106,7 @@ declare namespace ts {
3092
3106
  baseUrl?: string;
3093
3107
  charset?: string;
3094
3108
  checkJs?: boolean;
3109
+ customConditions?: string[];
3095
3110
  declaration?: boolean;
3096
3111
  declarationMap?: boolean;
3097
3112
  emitDeclarationOnly?: boolean;
@@ -3156,6 +3171,8 @@ declare namespace ts {
3156
3171
  incremental?: boolean;
3157
3172
  tsBuildInfoFile?: string;
3158
3173
  removeComments?: boolean;
3174
+ resolvePackageJsonExports?: boolean;
3175
+ resolvePackageJsonImports?: boolean;
3159
3176
  rootDir?: string;
3160
3177
  rootDirs?: string[];
3161
3178
  skipLibCheck?: boolean;
@@ -3327,6 +3344,11 @@ declare namespace ts {
3327
3344
  resolvedFileName: string;
3328
3345
  /** True if `resolvedFileName` comes from `node_modules`. */
3329
3346
  isExternalLibraryImport?: boolean;
3347
+ /**
3348
+ * True if the original module reference used a .ts extension to refer directly to a .ts file,
3349
+ * which should produce an error during checking if emit is enabled.
3350
+ */
3351
+ resolvedUsingTsExtension?: boolean;
3330
3352
  }
3331
3353
  /**
3332
3354
  * ResolvedModule with an explicitly provided `extension` property.
@@ -3535,11 +3557,12 @@ declare namespace ts {
3535
3557
  createToken(token: SyntaxKind.NullKeyword): NullLiteral;
3536
3558
  createToken(token: SyntaxKind.TrueKeyword): TrueLiteral;
3537
3559
  createToken(token: SyntaxKind.FalseKeyword): FalseLiteral;
3560
+ createToken(token: SyntaxKind.EndOfFileToken): EndOfFileToken;
3561
+ createToken(token: SyntaxKind.Unknown): Token<SyntaxKind.Unknown>;
3538
3562
  createToken<TKind extends PunctuationSyntaxKind>(token: TKind): PunctuationToken<TKind>;
3539
3563
  createToken<TKind extends KeywordTypeSyntaxKind>(token: TKind): KeywordTypeNode<TKind>;
3540
3564
  createToken<TKind extends ModifierSyntaxKind>(token: TKind): ModifierToken<TKind>;
3541
3565
  createToken<TKind extends KeywordSyntaxKind>(token: TKind): KeywordToken<TKind>;
3542
- createToken<TKind extends SyntaxKind.Unknown | SyntaxKind.EndOfFileToken>(token: TKind): Token<TKind>;
3543
3566
  createSuper(): SuperExpression;
3544
3567
  createThis(): ThisExpression;
3545
3568
  createNull(): NullLiteral;
@@ -3848,6 +3871,8 @@ declare namespace ts {
3848
3871
  updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | NodeArray<JSDocComment> | undefined): JSDocEnumTag;
3849
3872
  createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string | NodeArray<JSDocComment>): JSDocCallbackTag;
3850
3873
  updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | NodeArray<JSDocComment> | undefined): JSDocCallbackTag;
3874
+ createJSDocOverloadTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, comment?: string | NodeArray<JSDocComment>): JSDocOverloadTag;
3875
+ updateJSDocOverloadTag(node: JSDocOverloadTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, comment: string | NodeArray<JSDocComment> | undefined): JSDocOverloadTag;
3851
3876
  createJSDocAugmentsTag(tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocAugmentsTag;
3852
3877
  updateJSDocAugmentsTag(node: JSDocAugmentsTag, tagName: Identifier | undefined, className: JSDocAugmentsTag["class"], comment: string | NodeArray<JSDocComment> | undefined): JSDocAugmentsTag;
3853
3878
  createJSDocImplementsTag(tagName: Identifier | undefined, className: JSDocImplementsTag["class"], comment?: string | NodeArray<JSDocComment>): JSDocImplementsTag;
@@ -4442,6 +4467,7 @@ declare namespace ts {
4442
4467
  readonly includeInlayEnumMemberValueHints?: boolean;
4443
4468
  readonly allowRenameOfImportPath?: boolean;
4444
4469
  readonly autoImportFileExcludePatterns?: string[];
4470
+ readonly organizeImportsIgnoreCase?: "auto" | boolean;
4445
4471
  }
4446
4472
  /** Represents a bigint literal value without requiring bigint support */
4447
4473
  interface PseudoBigInt {
@@ -4832,6 +4858,7 @@ declare namespace ts {
4832
4858
  parent: ConstructorDeclaration;
4833
4859
  name: Identifier;
4834
4860
  };
4861
+ function emitModuleKindIsNonNodeESM(moduleKind: ModuleKind): boolean;
4835
4862
  function isJSDocOptionalParameter(node: ParameterDeclaration): boolean;
4836
4863
  function isOptionalDeclaration(declaration: Declaration): boolean;
4837
4864
  function createUnparsedSourceFile(text: string): UnparsedSource;
@@ -5102,6 +5129,7 @@ declare namespace ts {
5102
5129
  function isJSDocProtectedTag(node: Node): node is JSDocProtectedTag;
5103
5130
  function isJSDocReadonlyTag(node: Node): node is JSDocReadonlyTag;
5104
5131
  function isJSDocOverrideTag(node: Node): node is JSDocOverrideTag;
5132
+ function isJSDocOverloadTag(node: Node): node is JSDocOverloadTag;
5105
5133
  function isJSDocDeprecatedTag(node: Node): node is JSDocDeprecatedTag;
5106
5134
  function isJSDocSeeTag(node: Node): node is JSDocSeeTag;
5107
5135
  function isJSDocEnumTag(node: Node): node is JSDocEnumTag;
@@ -5236,7 +5264,7 @@ declare namespace ts {
5236
5264
  /**
5237
5265
  * Note that the case of the config path has not yet been normalized, as no files have been imported into the project yet
5238
5266
  */
5239
- extendedConfigPath?: string;
5267
+ extendedConfigPath?: string | string[];
5240
5268
  }
5241
5269
  interface ExtendedConfigCacheEntry {
5242
5270
  extendedResult: TsConfigSourceFile;
@@ -5262,8 +5290,11 @@ declare namespace ts {
5262
5290
  function createTypeReferenceDirectiveResolutionCache(currentDirectory: string, getCanonicalFileName: (s: string) => string, options?: CompilerOptions, packageJsonInfoCache?: PackageJsonInfoCache): TypeReferenceDirectiveResolutionCache;
5263
5291
  function resolveModuleNameFromCache(moduleName: string, containingFile: string, cache: ModuleResolutionCache, mode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations | undefined;
5264
5292
  function resolveModuleName(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference, resolutionMode?: ResolutionMode): ResolvedModuleWithFailedLookupLocations;
5293
+ function bundlerModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
5265
5294
  function nodeModuleNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: ModuleResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
5266
5295
  function classicNameResolver(moduleName: string, containingFile: string, compilerOptions: CompilerOptions, host: ModuleResolutionHost, cache?: NonRelativeModuleNameResolutionCache, redirectedReference?: ResolvedProjectReference): ResolvedModuleWithFailedLookupLocations;
5296
+ function moduleResolutionSupportsResolvingTsExtensions(compilerOptions: CompilerOptions): boolean;
5297
+ function shouldAllowImportingTsExtension(compilerOptions: CompilerOptions, fromFileName?: string): boolean | "" | undefined;
5267
5298
  interface TypeReferenceDirectiveResolutionCache extends PerDirectoryResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, NonRelativeNameResolutionCache<ResolvedTypeReferenceDirectiveWithFailedLookupLocations>, PackageJsonInfoCache {
5268
5299
  }
5269
5300
  interface ModeAwareCache<T> {