-
Notifications
You must be signed in to change notification settings - Fork 12.6k
/
Copy pathtypescript.d.ts
5902 lines (5898 loc) · 301 KB
/
typescript.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.
See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
declare namespace ts {
const versionMajorMinor = "3.8";
/** The version of the TypeScript compiler release */
const version: string;
}
declare namespace ts {
/**
* Type of objects whose values are all of the same type.
* The `in` and `for-in` operators can *not* be safely used,
* since `Object.prototype` may be modified by outside code.
*/
interface MapLike<T> {
[index: string]: T;
}
interface SortedReadonlyArray<T> extends ReadonlyArray<T> {
" __sortedArrayBrand": any;
}
interface SortedArray<T> extends Array<T> {
" __sortedArrayBrand": any;
}
/** ES6 Map interface, only read methods included. */
interface ReadonlyMap<T> {
get(key: string): T | undefined;
has(key: string): boolean;
forEach(action: (value: T, key: string) => void): void;
readonly size: number;
keys(): Iterator<string>;
values(): Iterator<T>;
entries(): Iterator<[string, T]>;
}
/** ES6 Map interface. */
interface Map<T> extends ReadonlyMap<T> {
set(key: string, value: T): this;
delete(key: string): boolean;
clear(): void;
}
/** ES6 Iterator type. */
interface Iterator<T> {
next(): {
value: T;
done?: false;
} | {
value: never;
done: true;
};
}
/** Array that is only intended to be pushed to, never read. */
interface Push<T> {
push(...values: T[]): void;
}
}
declare namespace ts {
export type Path = string & {
__pathBrand: any;
};
export interface TextRange {
pos: number;
end: number;
}
export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind;
export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InKeyword | SyntaxKind.InferKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.OfKeyword;
export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken;
export enum SyntaxKind {
Unknown = 0,
EndOfFileToken = 1,
SingleLineCommentTrivia = 2,
MultiLineCommentTrivia = 3,
NewLineTrivia = 4,
WhitespaceTrivia = 5,
ShebangTrivia = 6,
ConflictMarkerTrivia = 7,
NumericLiteral = 8,
BigIntLiteral = 9,
StringLiteral = 10,
JsxText = 11,
JsxTextAllWhiteSpaces = 12,
RegularExpressionLiteral = 13,
NoSubstitutionTemplateLiteral = 14,
TemplateHead = 15,
TemplateMiddle = 16,
TemplateTail = 17,
OpenBraceToken = 18,
CloseBraceToken = 19,
OpenParenToken = 20,
CloseParenToken = 21,
OpenBracketToken = 22,
CloseBracketToken = 23,
DotToken = 24,
DotDotDotToken = 25,
SemicolonToken = 26,
CommaToken = 27,
QuestionDotToken = 28,
LessThanToken = 29,
LessThanSlashToken = 30,
GreaterThanToken = 31,
LessThanEqualsToken = 32,
GreaterThanEqualsToken = 33,
EqualsEqualsToken = 34,
ExclamationEqualsToken = 35,
EqualsEqualsEqualsToken = 36,
ExclamationEqualsEqualsToken = 37,
EqualsGreaterThanToken = 38,
PlusToken = 39,
MinusToken = 40,
AsteriskToken = 41,
AsteriskAsteriskToken = 42,
SlashToken = 43,
PercentToken = 44,
PlusPlusToken = 45,
MinusMinusToken = 46,
LessThanLessThanToken = 47,
GreaterThanGreaterThanToken = 48,
GreaterThanGreaterThanGreaterThanToken = 49,
AmpersandToken = 50,
BarToken = 51,
CaretToken = 52,
ExclamationToken = 53,
TildeToken = 54,
AmpersandAmpersandToken = 55,
BarBarToken = 56,
QuestionToken = 57,
ColonToken = 58,
AtToken = 59,
QuestionQuestionToken = 60,
/** Only the JSDoc scanner produces BacktickToken. The normal scanner produces NoSubstitutionTemplateLiteral and related kinds. */
BacktickToken = 61,
EqualsToken = 62,
PlusEqualsToken = 63,
MinusEqualsToken = 64,
AsteriskEqualsToken = 65,
AsteriskAsteriskEqualsToken = 66,
SlashEqualsToken = 67,
PercentEqualsToken = 68,
LessThanLessThanEqualsToken = 69,
GreaterThanGreaterThanEqualsToken = 70,
GreaterThanGreaterThanGreaterThanEqualsToken = 71,
AmpersandEqualsToken = 72,
BarEqualsToken = 73,
CaretEqualsToken = 74,
Identifier = 75,
BreakKeyword = 76,
CaseKeyword = 77,
CatchKeyword = 78,
ClassKeyword = 79,
ConstKeyword = 80,
ContinueKeyword = 81,
DebuggerKeyword = 82,
DefaultKeyword = 83,
DeleteKeyword = 84,
DoKeyword = 85,
ElseKeyword = 86,
EnumKeyword = 87,
ExportKeyword = 88,
ExtendsKeyword = 89,
FalseKeyword = 90,
FinallyKeyword = 91,
ForKeyword = 92,
FunctionKeyword = 93,
IfKeyword = 94,
ImportKeyword = 95,
InKeyword = 96,
InstanceOfKeyword = 97,
NewKeyword = 98,
NullKeyword = 99,
ReturnKeyword = 100,
SuperKeyword = 101,
SwitchKeyword = 102,
ThisKeyword = 103,
ThrowKeyword = 104,
TrueKeyword = 105,
TryKeyword = 106,
TypeOfKeyword = 107,
VarKeyword = 108,
VoidKeyword = 109,
WhileKeyword = 110,
WithKeyword = 111,
ImplementsKeyword = 112,
InterfaceKeyword = 113,
LetKeyword = 114,
PackageKeyword = 115,
PrivateKeyword = 116,
ProtectedKeyword = 117,
PublicKeyword = 118,
StaticKeyword = 119,
YieldKeyword = 120,
AbstractKeyword = 121,
AsKeyword = 122,
AssertsKeyword = 123,
AnyKeyword = 124,
AsyncKeyword = 125,
AwaitKeyword = 126,
BooleanKeyword = 127,
ConstructorKeyword = 128,
DeclareKeyword = 129,
GetKeyword = 130,
InferKeyword = 131,
IsKeyword = 132,
KeyOfKeyword = 133,
ModuleKeyword = 134,
NamespaceKeyword = 135,
NeverKeyword = 136,
ReadonlyKeyword = 137,
RequireKeyword = 138,
NumberKeyword = 139,
ObjectKeyword = 140,
SetKeyword = 141,
StringKeyword = 142,
SymbolKeyword = 143,
TypeKeyword = 144,
UndefinedKeyword = 145,
UniqueKeyword = 146,
UnknownKeyword = 147,
FromKeyword = 148,
GlobalKeyword = 149,
BigIntKeyword = 150,
OfKeyword = 151,
QualifiedName = 152,
ComputedPropertyName = 153,
TypeParameter = 154,
Parameter = 155,
Decorator = 156,
PropertySignature = 157,
PropertyDeclaration = 158,
MethodSignature = 159,
MethodDeclaration = 160,
Constructor = 161,
GetAccessor = 162,
SetAccessor = 163,
CallSignature = 164,
ConstructSignature = 165,
IndexSignature = 166,
TypePredicate = 167,
TypeReference = 168,
FunctionType = 169,
ConstructorType = 170,
TypeQuery = 171,
TypeLiteral = 172,
ArrayType = 173,
TupleType = 174,
OptionalType = 175,
RestType = 176,
UnionType = 177,
IntersectionType = 178,
ConditionalType = 179,
InferType = 180,
ParenthesizedType = 181,
ThisType = 182,
TypeOperator = 183,
IndexedAccessType = 184,
MappedType = 185,
LiteralType = 186,
ImportType = 187,
ObjectBindingPattern = 188,
ArrayBindingPattern = 189,
BindingElement = 190,
ArrayLiteralExpression = 191,
ObjectLiteralExpression = 192,
PropertyAccessExpression = 193,
ElementAccessExpression = 194,
CallExpression = 195,
NewExpression = 196,
TaggedTemplateExpression = 197,
TypeAssertionExpression = 198,
ParenthesizedExpression = 199,
FunctionExpression = 200,
ArrowFunction = 201,
DeleteExpression = 202,
TypeOfExpression = 203,
VoidExpression = 204,
AwaitExpression = 205,
PrefixUnaryExpression = 206,
PostfixUnaryExpression = 207,
BinaryExpression = 208,
ConditionalExpression = 209,
TemplateExpression = 210,
YieldExpression = 211,
SpreadElement = 212,
ClassExpression = 213,
OmittedExpression = 214,
ExpressionWithTypeArguments = 215,
AsExpression = 216,
NonNullExpression = 217,
MetaProperty = 218,
SyntheticExpression = 219,
TemplateSpan = 220,
SemicolonClassElement = 221,
Block = 222,
EmptyStatement = 223,
VariableStatement = 224,
ExpressionStatement = 225,
IfStatement = 226,
DoStatement = 227,
WhileStatement = 228,
ForStatement = 229,
ForInStatement = 230,
ForOfStatement = 231,
ContinueStatement = 232,
BreakStatement = 233,
ReturnStatement = 234,
WithStatement = 235,
SwitchStatement = 236,
LabeledStatement = 237,
ThrowStatement = 238,
TryStatement = 239,
DebuggerStatement = 240,
VariableDeclaration = 241,
VariableDeclarationList = 242,
FunctionDeclaration = 243,
ClassDeclaration = 244,
InterfaceDeclaration = 245,
TypeAliasDeclaration = 246,
EnumDeclaration = 247,
ModuleDeclaration = 248,
ModuleBlock = 249,
CaseBlock = 250,
NamespaceExportDeclaration = 251,
ImportEqualsDeclaration = 252,
ImportDeclaration = 253,
ImportClause = 254,
NamespaceImport = 255,
NamedImports = 256,
ImportSpecifier = 257,
ExportAssignment = 258,
ExportDeclaration = 259,
NamedExports = 260,
ExportSpecifier = 261,
MissingDeclaration = 262,
ExternalModuleReference = 263,
JsxElement = 264,
JsxSelfClosingElement = 265,
JsxOpeningElement = 266,
JsxClosingElement = 267,
JsxFragment = 268,
JsxOpeningFragment = 269,
JsxClosingFragment = 270,
JsxAttribute = 271,
JsxAttributes = 272,
JsxSpreadAttribute = 273,
JsxExpression = 274,
CaseClause = 275,
DefaultClause = 276,
HeritageClause = 277,
CatchClause = 278,
PropertyAssignment = 279,
ShorthandPropertyAssignment = 280,
SpreadAssignment = 281,
EnumMember = 282,
UnparsedPrologue = 283,
UnparsedPrepend = 284,
UnparsedText = 285,
UnparsedInternalText = 286,
UnparsedSyntheticReference = 287,
SourceFile = 288,
Bundle = 289,
UnparsedSource = 290,
InputFiles = 291,
JSDocTypeExpression = 292,
JSDocAllType = 293,
JSDocUnknownType = 294,
JSDocNullableType = 295,
JSDocNonNullableType = 296,
JSDocOptionalType = 297,
JSDocFunctionType = 298,
JSDocVariadicType = 299,
JSDocNamepathType = 300,
JSDocComment = 301,
JSDocTypeLiteral = 302,
JSDocSignature = 303,
JSDocTag = 304,
JSDocAugmentsTag = 305,
JSDocAuthorTag = 306,
JSDocClassTag = 307,
JSDocCallbackTag = 308,
JSDocEnumTag = 309,
JSDocParameterTag = 310,
JSDocReturnTag = 311,
JSDocThisTag = 312,
JSDocTypeTag = 313,
JSDocTemplateTag = 314,
JSDocTypedefTag = 315,
JSDocPropertyTag = 316,
SyntaxList = 317,
NotEmittedStatement = 318,
PartiallyEmittedExpression = 319,
CommaListExpression = 320,
MergeDeclarationMarker = 321,
EndOfDeclarationMarker = 322,
SyntheticReferenceExpression = 323,
Count = 324,
FirstAssignment = 62,
LastAssignment = 74,
FirstCompoundAssignment = 63,
LastCompoundAssignment = 74,
FirstReservedWord = 76,
LastReservedWord = 111,
FirstKeyword = 76,
LastKeyword = 151,
FirstFutureReservedWord = 112,
LastFutureReservedWord = 120,
FirstTypeNode = 167,
LastTypeNode = 187,
FirstPunctuation = 18,
LastPunctuation = 74,
FirstToken = 0,
LastToken = 151,
FirstTriviaToken = 2,
LastTriviaToken = 7,
FirstLiteralToken = 8,
LastLiteralToken = 14,
FirstTemplateToken = 14,
LastTemplateToken = 17,
FirstBinaryOperator = 29,
LastBinaryOperator = 74,
FirstStatement = 224,
LastStatement = 240,
FirstNode = 152,
FirstJSDocNode = 292,
LastJSDocNode = 316,
FirstJSDocTagNode = 304,
LastJSDocTagNode = 316,
}
export enum NodeFlags {
None = 0,
Let = 1,
Const = 2,
NestedNamespace = 4,
Synthesized = 8,
Namespace = 16,
OptionalChain = 32,
ExportContext = 64,
ContainsThis = 128,
HasImplicitReturn = 256,
HasExplicitReturn = 512,
GlobalAugmentation = 1024,
HasAsyncFunctions = 2048,
DisallowInContext = 4096,
YieldContext = 8192,
DecoratorContext = 16384,
AwaitContext = 32768,
ThisNodeHasError = 65536,
JavaScriptFile = 131072,
ThisNodeOrAnySubNodesHasError = 262144,
HasAggregatedChildData = 524288,
JSDoc = 4194304,
JsonFile = 33554432,
BlockScoped = 3,
ReachabilityCheckFlags = 768,
ReachabilityAndEmitFlags = 2816,
ContextFlags = 25358336,
TypeExcludesFlags = 40960,
}
export enum ModifierFlags {
None = 0,
Export = 1,
Ambient = 2,
Public = 4,
Private = 8,
Protected = 16,
Static = 32,
Readonly = 64,
Abstract = 128,
Async = 256,
Default = 512,
Const = 2048,
HasComputedFlags = 536870912,
AccessibilityModifier = 28,
ParameterPropertyModifier = 92,
NonPublicAccessibilityModifier = 24,
TypeScriptModifier = 2270,
ExportDefault = 513,
All = 3071
}
export enum JsxFlags {
None = 0,
/** An element from a named property of the JSX.IntrinsicElements interface */
IntrinsicNamedElement = 1,
/** An element inferred from the string index signature of the JSX.IntrinsicElements interface */
IntrinsicIndexedElement = 2,
IntrinsicElement = 3
}
export interface Node extends TextRange {
kind: SyntaxKind;
flags: NodeFlags;
decorators?: NodeArray<Decorator>;
modifiers?: ModifiersArray;
parent: Node;
}
export interface JSDocContainer {
}
export type HasJSDoc = ParameterDeclaration | CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | PropertySignature | ArrowFunction | ParenthesizedExpression | SpreadAssignment | ShorthandPropertyAssignment | PropertyAssignment | FunctionExpression | LabeledStatement | ExpressionStatement | VariableStatement | FunctionDeclaration | ConstructorDeclaration | MethodDeclaration | PropertyDeclaration | AccessorDeclaration | ClassLikeDeclaration | InterfaceDeclaration | TypeAliasDeclaration | EnumMember | EnumDeclaration | ModuleDeclaration | ImportEqualsDeclaration | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | ExportDeclaration | EndOfFileToken;
export type HasType = SignatureDeclaration | VariableDeclaration | ParameterDeclaration | PropertySignature | PropertyDeclaration | TypePredicateNode | ParenthesizedTypeNode | TypeOperatorNode | MappedTypeNode | AssertionExpression | TypeAliasDeclaration | JSDocTypeExpression | JSDocNonNullableType | JSDocNullableType | JSDocOptionalType | JSDocVariadicType;
export type HasInitializer = HasExpressionInitializer | ForStatement | ForInStatement | ForOfStatement | JsxAttribute;
export type HasExpressionInitializer = VariableDeclaration | ParameterDeclaration | BindingElement | PropertySignature | PropertyDeclaration | PropertyAssignment | EnumMember;
export interface NodeArray<T extends Node> extends ReadonlyArray<T>, TextRange {
hasTrailingComma?: boolean;
}
export interface Token<TKind extends SyntaxKind> extends Node {
kind: TKind;
}
export type DotToken = Token<SyntaxKind.DotToken>;
export type DotDotDotToken = Token<SyntaxKind.DotDotDotToken>;
export type QuestionToken = Token<SyntaxKind.QuestionToken>;
export type QuestionDotToken = Token<SyntaxKind.QuestionDotToken>;
export type ExclamationToken = Token<SyntaxKind.ExclamationToken>;
export type ColonToken = Token<SyntaxKind.ColonToken>;
export type EqualsToken = Token<SyntaxKind.EqualsToken>;
export type AsteriskToken = Token<SyntaxKind.AsteriskToken>;
export type EqualsGreaterThanToken = Token<SyntaxKind.EqualsGreaterThanToken>;
export type EndOfFileToken = Token<SyntaxKind.EndOfFileToken> & JSDocContainer;
export type ReadonlyToken = Token<SyntaxKind.ReadonlyKeyword>;
export type AwaitKeywordToken = Token<SyntaxKind.AwaitKeyword>;
export type PlusToken = Token<SyntaxKind.PlusToken>;
export type MinusToken = Token<SyntaxKind.MinusToken>;
export type AssertsToken = Token<SyntaxKind.AssertsKeyword>;
export type Modifier = Token<SyntaxKind.AbstractKeyword> | Token<SyntaxKind.AsyncKeyword> | Token<SyntaxKind.ConstKeyword> | Token<SyntaxKind.DeclareKeyword> | Token<SyntaxKind.DefaultKeyword> | Token<SyntaxKind.ExportKeyword> | Token<SyntaxKind.PublicKeyword> | Token<SyntaxKind.PrivateKeyword> | Token<SyntaxKind.ProtectedKeyword> | Token<SyntaxKind.ReadonlyKeyword> | Token<SyntaxKind.StaticKeyword>;
export type ModifiersArray = NodeArray<Modifier>;
export interface Identifier extends PrimaryExpression, Declaration {
kind: SyntaxKind.Identifier;
/**
* Prefer to use `id.unescapedText`. (Note: This is available only in services, not internally to the TypeScript compiler.)
* Text of identifier, but if the identifier begins with two underscores, this will begin with three.
*/
escapedText: __String;
originalKeywordKind?: SyntaxKind;
isInJSDocNamespace?: boolean;
}
export interface TransientIdentifier extends Identifier {
resolvedSymbol: Symbol;
}
export interface QualifiedName extends Node {
kind: SyntaxKind.QualifiedName;
left: EntityName;
right: Identifier;
}
export type EntityName = Identifier | QualifiedName;
export type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropertyName;
export type DeclarationName = Identifier | StringLiteralLike | NumericLiteral | ComputedPropertyName | ElementAccessExpression | BindingPattern | EntityNameExpression;
export interface Declaration extends Node {
_declarationBrand: any;
}
export interface NamedDeclaration extends Declaration {
name?: DeclarationName;
}
export interface DeclarationStatement extends NamedDeclaration, Statement {
name?: Identifier | StringLiteral | NumericLiteral;
}
export interface ComputedPropertyName extends Node {
parent: Declaration;
kind: SyntaxKind.ComputedPropertyName;
expression: Expression;
}
export interface Decorator extends Node {
kind: SyntaxKind.Decorator;
parent: NamedDeclaration;
expression: LeftHandSideExpression;
}
export interface TypeParameterDeclaration extends NamedDeclaration {
kind: SyntaxKind.TypeParameter;
parent: DeclarationWithTypeParameterChildren | InferTypeNode;
name: Identifier;
/** Note: Consider calling `getEffectiveConstraintOfTypeParameter` */
constraint?: TypeNode;
default?: TypeNode;
expression?: Expression;
}
export interface SignatureDeclarationBase extends NamedDeclaration, JSDocContainer {
kind: SignatureDeclaration["kind"];
name?: PropertyName;
typeParameters?: NodeArray<TypeParameterDeclaration>;
parameters: NodeArray<ParameterDeclaration>;
type?: TypeNode;
}
export type SignatureDeclaration = CallSignatureDeclaration | ConstructSignatureDeclaration | MethodSignature | IndexSignatureDeclaration | FunctionTypeNode | ConstructorTypeNode | JSDocFunctionType | FunctionDeclaration | MethodDeclaration | ConstructorDeclaration | AccessorDeclaration | FunctionExpression | ArrowFunction;
export interface CallSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
kind: SyntaxKind.CallSignature;
}
export interface ConstructSignatureDeclaration extends SignatureDeclarationBase, TypeElement {
kind: SyntaxKind.ConstructSignature;
}
export type BindingName = Identifier | BindingPattern;
export interface VariableDeclaration extends NamedDeclaration {
kind: SyntaxKind.VariableDeclaration;
parent: VariableDeclarationList | CatchClause;
name: BindingName;
exclamationToken?: ExclamationToken;
type?: TypeNode;
initializer?: Expression;
}
export interface VariableDeclarationList extends Node {
kind: SyntaxKind.VariableDeclarationList;
parent: VariableStatement | ForStatement | ForOfStatement | ForInStatement;
declarations: NodeArray<VariableDeclaration>;
}
export interface ParameterDeclaration extends NamedDeclaration, JSDocContainer {
kind: SyntaxKind.Parameter;
parent: SignatureDeclaration;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
questionToken?: QuestionToken;
type?: TypeNode;
initializer?: Expression;
}
export interface BindingElement extends NamedDeclaration {
kind: SyntaxKind.BindingElement;
parent: BindingPattern;
propertyName?: PropertyName;
dotDotDotToken?: DotDotDotToken;
name: BindingName;
initializer?: Expression;
}
export interface PropertySignature extends TypeElement, JSDocContainer {
kind: SyntaxKind.PropertySignature;
name: PropertyName;
questionToken?: QuestionToken;
type?: TypeNode;
initializer?: Expression;
}
export interface PropertyDeclaration extends ClassElement, JSDocContainer {
kind: SyntaxKind.PropertyDeclaration;
parent: ClassLikeDeclaration;
name: PropertyName;
questionToken?: QuestionToken;
exclamationToken?: ExclamationToken;
type?: TypeNode;
initializer?: Expression;
}
export interface ObjectLiteralElement extends NamedDeclaration {
_objectLiteralBrand: any;
name?: PropertyName;
}
/** Unlike ObjectLiteralElement, excludes JSXAttribute and JSXSpreadAttribute. */
export type ObjectLiteralElementLike = PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | MethodDeclaration | AccessorDeclaration;
export interface PropertyAssignment extends ObjectLiteralElement, JSDocContainer {
parent: ObjectLiteralExpression;
kind: SyntaxKind.PropertyAssignment;
name: PropertyName;
questionToken?: QuestionToken;
initializer: Expression;
}
export interface ShorthandPropertyAssignment extends ObjectLiteralElement, JSDocContainer {
parent: ObjectLiteralExpression;
kind: SyntaxKind.ShorthandPropertyAssignment;
name: Identifier;
questionToken?: QuestionToken;
exclamationToken?: ExclamationToken;
equalsToken?: Token<SyntaxKind.EqualsToken>;
objectAssignmentInitializer?: Expression;
}
export interface SpreadAssignment extends ObjectLiteralElement, JSDocContainer {
parent: ObjectLiteralExpression;
kind: SyntaxKind.SpreadAssignment;
expression: Expression;
}
export type VariableLikeDeclaration = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyDeclaration | PropertyAssignment | PropertySignature | JsxAttribute | ShorthandPropertyAssignment | EnumMember | JSDocPropertyTag | JSDocParameterTag;
export interface PropertyLikeDeclaration extends NamedDeclaration {
name: PropertyName;
}
export interface ObjectBindingPattern extends Node {
kind: SyntaxKind.ObjectBindingPattern;
parent: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<BindingElement>;
}
export interface ArrayBindingPattern extends Node {
kind: SyntaxKind.ArrayBindingPattern;
parent: VariableDeclaration | ParameterDeclaration | BindingElement;
elements: NodeArray<ArrayBindingElement>;
}
export type BindingPattern = ObjectBindingPattern | ArrayBindingPattern;
export type ArrayBindingElement = BindingElement | OmittedExpression;
/**
* Several node kinds share function-like features such as a signature,
* a name, and a body. These nodes should extend FunctionLikeDeclarationBase.
* Examples:
* - FunctionDeclaration
* - MethodDeclaration
* - AccessorDeclaration
*/
export interface FunctionLikeDeclarationBase extends SignatureDeclarationBase {
_functionLikeDeclarationBrand: any;
asteriskToken?: AsteriskToken;
questionToken?: QuestionToken;
exclamationToken?: ExclamationToken;
body?: Block | Expression;
}
export type FunctionLikeDeclaration = FunctionDeclaration | MethodDeclaration | GetAccessorDeclaration | SetAccessorDeclaration | ConstructorDeclaration | FunctionExpression | ArrowFunction;
/** @deprecated Use SignatureDeclaration */
export type FunctionLike = SignatureDeclaration;
export interface FunctionDeclaration extends FunctionLikeDeclarationBase, DeclarationStatement {
kind: SyntaxKind.FunctionDeclaration;
name?: Identifier;
body?: FunctionBody;
}
export interface MethodSignature extends SignatureDeclarationBase, TypeElement {
kind: SyntaxKind.MethodSignature;
parent: ObjectTypeDeclaration;
name: PropertyName;
}
export interface MethodDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
kind: SyntaxKind.MethodDeclaration;
parent: ClassLikeDeclaration | ObjectLiteralExpression;
name: PropertyName;
body?: FunctionBody;
}
export interface ConstructorDeclaration extends FunctionLikeDeclarationBase, ClassElement, JSDocContainer {
kind: SyntaxKind.Constructor;
parent: ClassLikeDeclaration;
body?: FunctionBody;
}
/** For when we encounter a semicolon in a class declaration. ES6 allows these as class elements. */
export interface SemicolonClassElement extends ClassElement {
kind: SyntaxKind.SemicolonClassElement;
parent: ClassLikeDeclaration;
}
export interface GetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
kind: SyntaxKind.GetAccessor;
parent: ClassLikeDeclaration | ObjectLiteralExpression;
name: PropertyName;
body?: FunctionBody;
}
export interface SetAccessorDeclaration extends FunctionLikeDeclarationBase, ClassElement, ObjectLiteralElement, JSDocContainer {
kind: SyntaxKind.SetAccessor;
parent: ClassLikeDeclaration | ObjectLiteralExpression;
name: PropertyName;
body?: FunctionBody;
}
export type AccessorDeclaration = GetAccessorDeclaration | SetAccessorDeclaration;
export interface IndexSignatureDeclaration extends SignatureDeclarationBase, ClassElement, TypeElement {
kind: SyntaxKind.IndexSignature;
parent: ObjectTypeDeclaration;
}
export interface TypeNode extends Node {
_typeNodeBrand: any;
}
export interface KeywordTypeNode extends TypeNode {
kind: SyntaxKind.AnyKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.NumberKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.VoidKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.NullKeyword | SyntaxKind.NeverKeyword;
}
export interface ImportTypeNode extends NodeWithTypeArguments {
kind: SyntaxKind.ImportType;
isTypeOf?: boolean;
argument: TypeNode;
qualifier?: EntityName;
}
export interface ThisTypeNode extends TypeNode {
kind: SyntaxKind.ThisType;
}
export type FunctionOrConstructorTypeNode = FunctionTypeNode | ConstructorTypeNode;
export interface FunctionOrConstructorTypeNodeBase extends TypeNode, SignatureDeclarationBase {
kind: SyntaxKind.FunctionType | SyntaxKind.ConstructorType;
type: TypeNode;
}
export interface FunctionTypeNode extends FunctionOrConstructorTypeNodeBase {
kind: SyntaxKind.FunctionType;
}
export interface ConstructorTypeNode extends FunctionOrConstructorTypeNodeBase {
kind: SyntaxKind.ConstructorType;
}
export interface NodeWithTypeArguments extends TypeNode {
typeArguments?: NodeArray<TypeNode>;
}
export type TypeReferenceType = TypeReferenceNode | ExpressionWithTypeArguments;
export interface TypeReferenceNode extends NodeWithTypeArguments {
kind: SyntaxKind.TypeReference;
typeName: EntityName;
}
export interface TypePredicateNode extends TypeNode {
kind: SyntaxKind.TypePredicate;
parent: SignatureDeclaration | JSDocTypeExpression;
assertsModifier?: AssertsToken;
parameterName: Identifier | ThisTypeNode;
type?: TypeNode;
}
export interface TypeQueryNode extends TypeNode {
kind: SyntaxKind.TypeQuery;
exprName: EntityName;
}
export interface TypeLiteralNode extends TypeNode, Declaration {
kind: SyntaxKind.TypeLiteral;
members: NodeArray<TypeElement>;
}
export interface ArrayTypeNode extends TypeNode {
kind: SyntaxKind.ArrayType;
elementType: TypeNode;
}
export interface TupleTypeNode extends TypeNode {
kind: SyntaxKind.TupleType;
elementTypes: NodeArray<TypeNode>;
}
export interface OptionalTypeNode extends TypeNode {
kind: SyntaxKind.OptionalType;
type: TypeNode;
}
export interface RestTypeNode extends TypeNode {
kind: SyntaxKind.RestType;
type: TypeNode;
}
export type UnionOrIntersectionTypeNode = UnionTypeNode | IntersectionTypeNode;
export interface UnionTypeNode extends TypeNode {
kind: SyntaxKind.UnionType;
types: NodeArray<TypeNode>;
}
export interface IntersectionTypeNode extends TypeNode {
kind: SyntaxKind.IntersectionType;
types: NodeArray<TypeNode>;
}
export interface ConditionalTypeNode extends TypeNode {
kind: SyntaxKind.ConditionalType;
checkType: TypeNode;
extendsType: TypeNode;
trueType: TypeNode;
falseType: TypeNode;
}
export interface InferTypeNode extends TypeNode {
kind: SyntaxKind.InferType;
typeParameter: TypeParameterDeclaration;
}
export interface ParenthesizedTypeNode extends TypeNode {
kind: SyntaxKind.ParenthesizedType;
type: TypeNode;
}
export interface TypeOperatorNode extends TypeNode {
kind: SyntaxKind.TypeOperator;
operator: SyntaxKind.KeyOfKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.ReadonlyKeyword;
type: TypeNode;
}
export interface IndexedAccessTypeNode extends TypeNode {
kind: SyntaxKind.IndexedAccessType;
objectType: TypeNode;
indexType: TypeNode;
}
export interface MappedTypeNode extends TypeNode, Declaration {
kind: SyntaxKind.MappedType;
readonlyToken?: ReadonlyToken | PlusToken | MinusToken;
typeParameter: TypeParameterDeclaration;
questionToken?: QuestionToken | PlusToken | MinusToken;
type?: TypeNode;
}
export interface LiteralTypeNode extends TypeNode {
kind: SyntaxKind.LiteralType;
literal: BooleanLiteral | LiteralExpression | PrefixUnaryExpression;
}
export interface StringLiteral extends LiteralExpression, Declaration {
kind: SyntaxKind.StringLiteral;
}
export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral;
export interface Expression extends Node {
_expressionBrand: any;
}
export interface OmittedExpression extends Expression {
kind: SyntaxKind.OmittedExpression;
}
export interface PartiallyEmittedExpression extends LeftHandSideExpression {
kind: SyntaxKind.PartiallyEmittedExpression;
expression: Expression;
}
export interface UnaryExpression extends Expression {
_unaryExpressionBrand: any;
}
/** Deprecated, please use UpdateExpression */
export type IncrementExpression = UpdateExpression;
export interface UpdateExpression extends UnaryExpression {
_updateExpressionBrand: any;
}
export type PrefixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.TildeToken | SyntaxKind.ExclamationToken;
export interface PrefixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PrefixUnaryExpression;
operator: PrefixUnaryOperator;
operand: UnaryExpression;
}
export type PostfixUnaryOperator = SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken;
export interface PostfixUnaryExpression extends UpdateExpression {
kind: SyntaxKind.PostfixUnaryExpression;
operand: LeftHandSideExpression;
operator: PostfixUnaryOperator;
}
export interface LeftHandSideExpression extends UpdateExpression {
_leftHandSideExpressionBrand: any;
}
export interface MemberExpression extends LeftHandSideExpression {
_memberExpressionBrand: any;
}
export interface PrimaryExpression extends MemberExpression {
_primaryExpressionBrand: any;
}
export interface NullLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.NullKeyword;
}
export interface BooleanLiteral extends PrimaryExpression, TypeNode {
kind: SyntaxKind.TrueKeyword | SyntaxKind.FalseKeyword;
}
export interface ThisExpression extends PrimaryExpression, KeywordTypeNode {
kind: SyntaxKind.ThisKeyword;
}
export interface SuperExpression extends PrimaryExpression {
kind: SyntaxKind.SuperKeyword;
}
export interface ImportExpression extends PrimaryExpression {
kind: SyntaxKind.ImportKeyword;
}
export interface DeleteExpression extends UnaryExpression {
kind: SyntaxKind.DeleteExpression;
expression: UnaryExpression;
}
export interface TypeOfExpression extends UnaryExpression {
kind: SyntaxKind.TypeOfExpression;
expression: UnaryExpression;
}
export interface VoidExpression extends UnaryExpression {
kind: SyntaxKind.VoidExpression;
expression: UnaryExpression;
}
export interface AwaitExpression extends UnaryExpression {
kind: SyntaxKind.AwaitExpression;
expression: UnaryExpression;
}
export interface YieldExpression extends Expression {
kind: SyntaxKind.YieldExpression;
asteriskToken?: AsteriskToken;
expression?: Expression;
}
export interface SyntheticExpression extends Expression {
kind: SyntaxKind.SyntheticExpression;
isSpread: boolean;
type: Type;
}
export type ExponentiationOperator = SyntaxKind.AsteriskAsteriskToken;
export type MultiplicativeOperator = SyntaxKind.AsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken;
export type MultiplicativeOperatorOrHigher = ExponentiationOperator | MultiplicativeOperator;
export type AdditiveOperator = SyntaxKind.PlusToken | SyntaxKind.MinusToken;
export type AdditiveOperatorOrHigher = MultiplicativeOperatorOrHigher | AdditiveOperator;
export type ShiftOperator = SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken;
export type ShiftOperatorOrHigher = AdditiveOperatorOrHigher | ShiftOperator;
export type RelationalOperator = SyntaxKind.LessThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.InstanceOfKeyword | SyntaxKind.InKeyword;
export type RelationalOperatorOrHigher = ShiftOperatorOrHigher | RelationalOperator;
export type EqualityOperator = SyntaxKind.EqualsEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.ExclamationEqualsToken;
export type EqualityOperatorOrHigher = RelationalOperatorOrHigher | EqualityOperator;
export type BitwiseOperator = SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken;
export type BitwiseOperatorOrHigher = EqualityOperatorOrHigher | BitwiseOperator;
export type LogicalOperator = SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken;
export type LogicalOperatorOrHigher = BitwiseOperatorOrHigher | LogicalOperator;
export type CompoundAssignmentOperator = SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken;
export type AssignmentOperator = SyntaxKind.EqualsToken | CompoundAssignmentOperator;
export type AssignmentOperatorOrHigher = SyntaxKind.QuestionQuestionToken | LogicalOperatorOrHigher | AssignmentOperator;
export type BinaryOperator = AssignmentOperatorOrHigher | SyntaxKind.CommaToken;
export type BinaryOperatorToken = Token<BinaryOperator>;
export interface BinaryExpression extends Expression, Declaration {
kind: SyntaxKind.BinaryExpression;
left: Expression;
operatorToken: BinaryOperatorToken;
right: Expression;
}
export type AssignmentOperatorToken = Token<AssignmentOperator>;
export interface AssignmentExpression<TOperator extends AssignmentOperatorToken> extends BinaryExpression {
left: LeftHandSideExpression;
operatorToken: TOperator;
}
export interface ObjectDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ObjectLiteralExpression;
}
export interface ArrayDestructuringAssignment extends AssignmentExpression<EqualsToken> {
left: ArrayLiteralExpression;
}
export type DestructuringAssignment = ObjectDestructuringAssignment | ArrayDestructuringAssignment;
export type BindingOrAssignmentElement = VariableDeclaration | ParameterDeclaration | BindingElement | PropertyAssignment | ShorthandPropertyAssignment | SpreadAssignment | OmittedExpression | SpreadElement | ArrayLiteralExpression | ObjectLiteralExpression | AssignmentExpression<EqualsToken> | Identifier | PropertyAccessExpression | ElementAccessExpression;
export type BindingOrAssignmentElementRestIndicator = DotDotDotToken | SpreadElement | SpreadAssignment;
export type BindingOrAssignmentElementTarget = BindingOrAssignmentPattern | Identifier | PropertyAccessExpression | ElementAccessExpression | OmittedExpression;
export type ObjectBindingOrAssignmentPattern = ObjectBindingPattern | ObjectLiteralExpression;
export type ArrayBindingOrAssignmentPattern = ArrayBindingPattern | ArrayLiteralExpression;
export type AssignmentPattern = ObjectLiteralExpression | ArrayLiteralExpression;
export type BindingOrAssignmentPattern = ObjectBindingOrAssignmentPattern | ArrayBindingOrAssignmentPattern;
export interface ConditionalExpression extends Expression {
kind: SyntaxKind.ConditionalExpression;
condition: Expression;
questionToken: QuestionToken;
whenTrue: Expression;
colonToken: ColonToken;
whenFalse: Expression;
}
export type FunctionBody = Block;
export type ConciseBody = FunctionBody | Expression;
export interface FunctionExpression extends PrimaryExpression, FunctionLikeDeclarationBase, JSDocContainer {
kind: SyntaxKind.FunctionExpression;
name?: Identifier;
body: FunctionBody;
}
export interface ArrowFunction extends Expression, FunctionLikeDeclarationBase, JSDocContainer {