1 | declare namespace ESTree {
|
2 | interface FlowTypeAnnotation extends Node {}
|
3 |
|
4 | interface FlowBaseTypeAnnotation extends FlowTypeAnnotation {}
|
5 |
|
6 | interface FlowLiteralTypeAnnotation extends FlowTypeAnnotation, Literal {}
|
7 |
|
8 | interface FlowDeclaration extends Declaration {}
|
9 |
|
10 | interface AnyTypeAnnotation extends FlowBaseTypeAnnotation {}
|
11 |
|
12 | interface ArrayTypeAnnotation extends FlowTypeAnnotation {
|
13 | elementType: FlowTypeAnnotation;
|
14 | }
|
15 |
|
16 | interface BooleanLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
17 |
|
18 | interface BooleanTypeAnnotation extends FlowBaseTypeAnnotation {}
|
19 |
|
20 | interface ClassImplements extends Node {
|
21 | id: Identifier;
|
22 | typeParameters?: TypeParameterInstantiation | null;
|
23 | }
|
24 |
|
25 | interface ClassProperty {
|
26 | key: Expression;
|
27 | value?: Expression | null;
|
28 | typeAnnotation?: TypeAnnotation | null;
|
29 | computed: boolean;
|
30 | static: boolean;
|
31 | }
|
32 |
|
33 | interface DeclareClass extends FlowDeclaration {
|
34 | id: Identifier;
|
35 | typeParameters?: TypeParameterDeclaration | null;
|
36 | body: ObjectTypeAnnotation;
|
37 | extends: InterfaceExtends[];
|
38 | }
|
39 |
|
40 | interface DeclareFunction extends FlowDeclaration {
|
41 | id: Identifier;
|
42 | }
|
43 |
|
44 | interface DeclareModule extends FlowDeclaration {
|
45 | id: Literal | Identifier;
|
46 | body: BlockStatement;
|
47 | }
|
48 |
|
49 | interface DeclareVariable extends FlowDeclaration {
|
50 | id: Identifier;
|
51 | }
|
52 |
|
53 | interface FunctionTypeAnnotation extends FlowTypeAnnotation {
|
54 | params: FunctionTypeParam[];
|
55 | returnType: FlowTypeAnnotation;
|
56 | rest?: FunctionTypeParam | null;
|
57 | typeParameters?: TypeParameterDeclaration | null;
|
58 | }
|
59 |
|
60 | interface FunctionTypeParam {
|
61 | name: Identifier;
|
62 | typeAnnotation: FlowTypeAnnotation;
|
63 | optional: boolean;
|
64 | }
|
65 |
|
66 | interface GenericTypeAnnotation extends FlowTypeAnnotation {
|
67 | id: Identifier | QualifiedTypeIdentifier;
|
68 | typeParameters?: TypeParameterInstantiation | null;
|
69 | }
|
70 |
|
71 | interface InterfaceExtends extends Node {
|
72 | id: Identifier | QualifiedTypeIdentifier;
|
73 | typeParameters?: TypeParameterInstantiation | null;
|
74 | }
|
75 |
|
76 | interface InterfaceDeclaration extends FlowDeclaration {
|
77 | id: Identifier;
|
78 | typeParameters?: TypeParameterDeclaration | null;
|
79 | extends: InterfaceExtends[];
|
80 | body: ObjectTypeAnnotation;
|
81 | }
|
82 |
|
83 | interface IntersectionTypeAnnotation extends FlowTypeAnnotation {
|
84 | types: FlowTypeAnnotation[];
|
85 | }
|
86 |
|
87 | interface MixedTypeAnnotation extends FlowBaseTypeAnnotation {}
|
88 |
|
89 | interface NullableTypeAnnotation extends FlowTypeAnnotation {
|
90 | typeAnnotation: TypeAnnotation;
|
91 | }
|
92 |
|
93 | interface NumberLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
94 |
|
95 | interface NumberTypeAnnotation extends FlowBaseTypeAnnotation {}
|
96 |
|
97 | interface StringLiteralTypeAnnotation extends FlowLiteralTypeAnnotation {}
|
98 |
|
99 | interface StringTypeAnnotation extends FlowBaseTypeAnnotation {}
|
100 |
|
101 | interface TupleTypeAnnotation extends FlowTypeAnnotation {
|
102 | types: FlowTypeAnnotation[];
|
103 | }
|
104 |
|
105 | interface TypeofTypeAnnotation extends FlowTypeAnnotation {
|
106 | argument: FlowTypeAnnotation;
|
107 | }
|
108 |
|
109 | interface TypeAlias extends FlowDeclaration {
|
110 | id: Identifier;
|
111 | typeParameters?: TypeParameterDeclaration | null;
|
112 | right: FlowTypeAnnotation;
|
113 | }
|
114 |
|
115 | interface TypeAnnotation extends Node {
|
116 | typeAnnotation: FlowTypeAnnotation;
|
117 | }
|
118 |
|
119 | interface TypeCastExpression extends Expression {
|
120 | expression: Expression;
|
121 | typeAnnotation: TypeAnnotation;
|
122 | }
|
123 |
|
124 | interface TypeParameterDeclaration extends Node {
|
125 | params: Identifier[];
|
126 | }
|
127 |
|
128 | interface TypeParameterInstantiation extends Node {
|
129 | params: FlowTypeAnnotation[];
|
130 | }
|
131 |
|
132 | interface ObjectTypeAnnotation extends FlowTypeAnnotation {
|
133 | properties: ObjectTypeProperty[];
|
134 | indexers: ObjectTypeIndexer[];
|
135 | callProperties: ObjectTypeCallProperty[];
|
136 | }
|
137 |
|
138 | interface ObjectTypeCallProperty extends Node {
|
139 | value: FunctionTypeAnnotation;
|
140 | static: boolean;
|
141 | }
|
142 |
|
143 | interface ObjectTypeIndexer extends Node {
|
144 | id: Identifier;
|
145 | key: FlowTypeAnnotation;
|
146 | value: FlowTypeAnnotation;
|
147 | static: boolean;
|
148 | }
|
149 |
|
150 | interface ObjectTypeProperty extends Node {
|
151 | key: Expression;
|
152 | value: FlowTypeAnnotation;
|
153 | optional: boolean;
|
154 | static: boolean;
|
155 | }
|
156 |
|
157 | interface QualifiedTypeIdentifier extends Node {
|
158 | qualification: Identifier | QualifiedTypeIdentifier;
|
159 | id: Identifier;
|
160 | }
|
161 |
|
162 | interface UnionTypeAnnotation extends FlowTypeAnnotation {
|
163 | types: FlowTypeAnnotation[];
|
164 | }
|
165 |
|
166 | interface VoidTypeAnnotation extends FlowBaseTypeAnnotation {}
|
167 | }
|