@jbpark/live-editor 4.6.1 → 6.0.0

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.
Files changed (91) hide show
  1. package/README.ko.md +37 -35
  2. package/README.md +37 -35
  3. package/dist/{boundary-BLB80tyw.js → boundary-CySnDUs2.js} +5 -4
  4. package/dist/boundary-CySnDUs2.js.map +1 -0
  5. package/dist/{compile-Dxas-D05.js → compile-my0AjsCw.js} +8 -7
  6. package/dist/compile-my0AjsCw.js.map +1 -0
  7. package/dist/constants-st9gnJ5g.js +55 -0
  8. package/dist/constants-st9gnJ5g.js.map +1 -0
  9. package/dist/{context-B8MzP7_p.js → context-Bjq0CvBE.js} +3 -3
  10. package/dist/{context-B8MzP7_p.js.map → context-Bjq0CvBE.js.map} +1 -1
  11. package/dist/{core-Bgfek364.js → core-BNVuH8-l.js} +51 -14
  12. package/dist/core-BNVuH8-l.js.map +1 -0
  13. package/dist/{detect-typescript-Dr_oLniM.js → detect-typescript-CMF0FVKD.js} +2 -2
  14. package/dist/{detect-typescript-Dr_oLniM.js.map → detect-typescript-CMF0FVKD.js.map} +1 -1
  15. package/dist/dnd/index.d.ts +3 -2
  16. package/dist/dnd/index.js +3 -2
  17. package/dist/dnd-BvjEDo-x.js +4197 -0
  18. package/dist/dnd-BvjEDo-x.js.map +1 -0
  19. package/dist/document-BQhb7YR8.d.ts +17 -0
  20. package/dist/{document-CHO215iP.js → document-uHqw0mvr.js} +194 -109
  21. package/dist/document-uHqw0mvr.js.map +1 -0
  22. package/dist/edit-options-C_r9aCz4.d.ts +100 -0
  23. package/dist/editor/index.d.ts +1 -1
  24. package/dist/editor/index.js +2 -2
  25. package/dist/{editor-CMElfHer.js → editor-CvnzrM9J.js} +2 -2
  26. package/dist/{editor-CMElfHer.js.map → editor-CvnzrM9J.js.map} +1 -1
  27. package/dist/error/index.d.ts +1 -1
  28. package/dist/error/index.js +2 -2
  29. package/dist/{error-CN_GCnXB.js → error-CFzvnLCf.js} +18 -32
  30. package/dist/error-CFzvnLCf.js.map +1 -0
  31. package/dist/{index-DpDU1IAw.d.ts → index-92L7F440.d.ts} +2 -2
  32. package/dist/{index-DrWtSKXu.d.ts → index-BZpZwrxT.d.ts} +2 -2
  33. package/dist/index-C8h8TcIl.d.ts +15 -0
  34. package/dist/{index-13BDSrQc.d.ts → index-C93npmTU.d.ts} +4 -6
  35. package/dist/{index-DQkL37eL.d.ts → index-CqsS207F.d.ts} +6 -12
  36. package/dist/{index-CiWB0zFb.d.ts → index-DQcdHg_V.d.ts} +18 -136
  37. package/dist/{index-CRwEhJ7w.d.ts → index-DfIvkht8.d.ts} +3 -3
  38. package/dist/index.d.ts +12 -11
  39. package/dist/index.js +6 -6
  40. package/dist/index.js.map +1 -1
  41. package/dist/{messages-IBPs4TkZ.d.ts → messages-BpN3QIhj.d.ts} +8 -2
  42. package/dist/{messages-CSrMI4Rm.js → messages-DrINcRdG.js} +8 -2
  43. package/dist/messages-DrINcRdG.js.map +1 -0
  44. package/dist/preview/index.d.ts +2 -2
  45. package/dist/preview/index.js +2 -3
  46. package/dist/{preview-CtyG5UbH.js → preview-B05MkVIQ.js} +16 -13
  47. package/dist/preview-B05MkVIQ.js.map +1 -0
  48. package/dist/provider/index.d.ts +2 -2
  49. package/dist/provider/index.js +2 -2
  50. package/dist/{sections-jYuqS4KB.js → sections-DhH_aVf5.js} +4 -7
  51. package/dist/sections-DhH_aVf5.js.map +1 -0
  52. package/dist/style.css +809 -4950
  53. package/dist/{validate-DB59Z_Nx.d.ts → types-Czps1Txy.d.ts} +12 -28
  54. package/dist/ui-kit/index.d.ts +22 -0
  55. package/dist/{constants-DU17Tdwo.js → ui-kit/index.js} +147 -54
  56. package/dist/ui-kit/index.js.map +1 -0
  57. package/dist/ui-kit/style.css +5039 -0
  58. package/dist/update-2PJbwoS8.d.ts +68 -0
  59. package/dist/{items-BXXtMUNI.js → update-BuYQJqjq.js} +143 -392
  60. package/dist/update-BuYQJqjq.js.map +1 -0
  61. package/dist/{use-dynamic-tailwind-BP1toJkW.js → use-dynamic-tailwind-B3l1qZRW.js} +318 -287
  62. package/dist/use-dynamic-tailwind-B3l1qZRW.js.map +1 -0
  63. package/dist/use-field-state-iQGW0vc6.js +131 -0
  64. package/dist/use-field-state-iQGW0vc6.js.map +1 -0
  65. package/dist/utils/ast/index.d.ts +47 -4
  66. package/dist/utils/ast/index.js +4 -64
  67. package/dist/utils/ast/index.js.map +1 -1
  68. package/dist/utils/index.d.ts +13 -32
  69. package/dist/utils/index.js +4 -26
  70. package/dist/validate-CZz30Pnb.js +122 -0
  71. package/dist/validate-CZz30Pnb.js.map +1 -0
  72. package/dist/validate-CiA1LF6S.d.ts +33 -0
  73. package/package.json +20 -10
  74. package/dist/boundary-BLB80tyw.js.map +0 -1
  75. package/dist/compile-Dxas-D05.js.map +0 -1
  76. package/dist/constants-DU17Tdwo.js.map +0 -1
  77. package/dist/core-Bgfek364.js.map +0 -1
  78. package/dist/dnd-V8NAxd_R.js +0 -2755
  79. package/dist/dnd-V8NAxd_R.js.map +0 -1
  80. package/dist/document-CHO215iP.js.map +0 -1
  81. package/dist/document-DqRSCtsx.d.ts +0 -1614
  82. package/dist/error-CN_GCnXB.js.map +0 -1
  83. package/dist/index-C_PfR4X9.d.ts +0 -734
  84. package/dist/items-BXXtMUNI.js.map +0 -1
  85. package/dist/messages-CSrMI4Rm.js.map +0 -1
  86. package/dist/preview-CtyG5UbH.js.map +0 -1
  87. package/dist/sections-jYuqS4KB.js.map +0 -1
  88. package/dist/use-dynamic-tailwind-BP1toJkW.js.map +0 -1
  89. package/dist/utils/index.js.map +0 -1
  90. package/dist/validate-iLo8IONY.js +0 -64
  91. package/dist/validate-iLo8IONY.js.map +0 -1
@@ -1,1614 +0,0 @@
1
- //#region node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts
2
- interface BaseComment {
3
- value: string;
4
- start?: number;
5
- end?: number;
6
- loc?: SourceLocation;
7
- ignore?: boolean;
8
- type: "CommentBlock" | "CommentLine";
9
- }
10
- interface Position {
11
- line: number;
12
- column: number;
13
- index: number;
14
- }
15
- interface CommentBlock extends BaseComment {
16
- type: "CommentBlock";
17
- }
18
- interface CommentLine extends BaseComment {
19
- type: "CommentLine";
20
- }
21
- type Comment = CommentBlock | CommentLine;
22
- interface SourceLocation {
23
- start: Position;
24
- end: Position;
25
- filename: string | undefined;
26
- identifierName: string | undefined | null;
27
- }
28
- interface BaseNode {
29
- leadingComments?: Comment[] | null;
30
- innerComments?: Comment[] | null;
31
- trailingComments?: Comment[] | null;
32
- start?: number | null;
33
- end?: number | null;
34
- loc?: SourceLocation | null;
35
- range?: [number, number];
36
- extra?: Record<string, unknown>;
37
- }
38
- type Node = AnyTypeAnnotation | ArgumentPlaceholder | ArrayExpression | ArrayPattern | ArrayTypeAnnotation | ArrowFunctionExpression | AssignmentExpression | AssignmentPattern | AwaitExpression | BigIntLiteral | BigIntLiteralTypeAnnotation | BinaryExpression | BindExpression | BlockStatement | BooleanLiteral | BooleanLiteralTypeAnnotation | BooleanTypeAnnotation | BreakStatement | CallExpression | CatchClause | ClassAccessorProperty | ClassBody | ClassDeclaration | ClassExpression | ClassImplements | ClassMethod | ClassPrivateMethod | ClassPrivateProperty | ClassProperty | ConditionalExpression | ContinueStatement | DebuggerStatement | DeclareClass | DeclareExportAllDeclaration | DeclareExportDeclaration | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareOpaqueType | DeclareTypeAlias | DeclareVariable | DeclaredPredicate | Decorator | Directive | DirectiveLiteral | DoExpression | DoWhileStatement | EmptyStatement | EmptyTypeAnnotation | EnumBooleanBody | EnumBooleanMember | EnumDeclaration | EnumDefaultedMember | EnumNumberBody | EnumNumberMember | EnumStringBody | EnumStringMember | EnumSymbolBody | ExistsTypeAnnotation | ExportAllDeclaration | ExportDefaultDeclaration | ExportDefaultSpecifier | ExportNamedDeclaration | ExportNamespaceSpecifier | ExportSpecifier | ExpressionStatement | File | ForInStatement | ForOfStatement | ForStatement | FunctionDeclaration | FunctionExpression | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | Identifier | IfStatement | Import | ImportAttribute | ImportDeclaration | ImportDefaultSpecifier | ImportExpression | ImportNamespaceSpecifier | ImportSpecifier | IndexedAccessType | InferredPredicate | InterfaceDeclaration | InterfaceExtends | InterfaceTypeAnnotation | InterpreterDirective | IntersectionTypeAnnotation | JSXAttribute | JSXClosingElement | JSXClosingFragment | JSXElement | JSXEmptyExpression | JSXExpressionContainer | JSXFragment | JSXIdentifier | JSXMemberExpression | JSXNamespacedName | JSXOpeningElement | JSXOpeningFragment | JSXSpreadAttribute | JSXSpreadChild | JSXText | LabeledStatement | LogicalExpression | MemberExpression | MetaProperty | MixedTypeAnnotation | ModuleExpression | NewExpression | NullLiteral | NullLiteralTypeAnnotation | NullableTypeAnnotation | NumberLiteral$1 | NumberLiteralTypeAnnotation | NumberTypeAnnotation | NumericLiteral | ObjectExpression | ObjectMethod | ObjectPattern | ObjectProperty | ObjectTypeAnnotation | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeInternalSlot | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | OptionalCallExpression | OptionalIndexedAccessType | OptionalMemberExpression | ParenthesizedExpression | Placeholder | PrivateName | Program | QualifiedTypeIdentifier | RegExpLiteral | RegexLiteral$1 | RestElement | RestProperty$1 | ReturnStatement | SequenceExpression | SpreadElement | SpreadProperty$1 | StaticBlock | StringLiteral | StringLiteralTypeAnnotation | StringTypeAnnotation | Super | SwitchCase | SwitchStatement | SymbolTypeAnnotation | TSAnyKeyword | TSArrayType | TSAsExpression | TSBigIntKeyword | TSBooleanKeyword | TSCallSignatureDeclaration | TSClassImplements | TSConditionalType | TSConstructSignatureDeclaration | TSConstructorType | TSDeclareFunction | TSDeclareMethod | TSEnumBody | TSEnumDeclaration | TSEnumMember | TSExportAssignment | TSExternalModuleReference | TSFunctionType | TSImportEqualsDeclaration | TSImportType | TSIndexSignature | TSIndexedAccessType | TSInferType | TSInstantiationExpression | TSInterfaceBody | TSInterfaceDeclaration | TSInterfaceHeritage | TSIntersectionType | TSIntrinsicKeyword | TSLiteralType | TSMappedType | TSMethodSignature | TSModuleBlock | TSModuleDeclaration | TSNamedTupleMember | TSNamespaceExportDeclaration | TSNeverKeyword | TSNonNullExpression | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSOptionalType | TSParameterProperty | TSParenthesizedType | TSPropertySignature | TSQualifiedName | TSRestType | TSSatisfiesExpression | TSStringKeyword | TSSymbolKeyword | TSTemplateLiteralType | TSThisType | TSTupleType | TSTypeAliasDeclaration | TSTypeAnnotation | TSTypeAssertion | TSTypeLiteral | TSTypeOperator | TSTypeParameter | TSTypeParameterDeclaration | TSTypeParameterInstantiation | TSTypePredicate | TSTypeQuery | TSTypeReference | TSUndefinedKeyword | TSUnionType | TSUnknownKeyword | TSVoidKeyword | TaggedTemplateExpression | TemplateElement | TemplateLiteral | ThisExpression | ThisTypeAnnotation | ThrowStatement | TopicReference | TryStatement | TupleTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | TypeofTypeAnnotation | UnaryExpression | UnionTypeAnnotation | UpdateExpression | V8IntrinsicIdentifier | VariableDeclaration | VariableDeclarator | Variance | VoidPattern | VoidTypeAnnotation | WhileStatement | WithStatement | YieldExpression;
39
- interface ArrayExpression extends BaseNode {
40
- type: "ArrayExpression";
41
- elements: (null | Expression | SpreadElement)[];
42
- }
43
- interface AssignmentExpression extends BaseNode {
44
- type: "AssignmentExpression";
45
- operator: "=" | "+=" | "-=" | "/=" | "%=" | "*=" | "**=" | "&=" | "|=" | ">>=" | ">>>=" | "<<=" | "^=" | "||=" | "&&=" | "??=";
46
- left: Identifier | MemberExpression | OptionalMemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
47
- right: Expression;
48
- }
49
- interface BinaryExpressionIn extends BaseNode {
50
- type: "BinaryExpression";
51
- right: Expression;
52
- operator: "in";
53
- left: Expression | PrivateName;
54
- }
55
- interface BinaryExpressionNotIn extends BaseNode {
56
- type: "BinaryExpression";
57
- right: Expression;
58
- operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "instanceof" | ">" | "<" | ">=" | "<=" | "|>";
59
- left: Expression;
60
- }
61
- type BinaryExpression = BinaryExpressionIn | BinaryExpressionNotIn;
62
- interface InterpreterDirective extends BaseNode {
63
- type: "InterpreterDirective";
64
- value: string;
65
- }
66
- interface Directive extends BaseNode {
67
- type: "Directive";
68
- value: DirectiveLiteral;
69
- }
70
- interface DirectiveLiteral extends BaseNode {
71
- type: "DirectiveLiteral";
72
- value: string;
73
- }
74
- interface BlockStatement extends BaseNode {
75
- type: "BlockStatement";
76
- body: Statement[];
77
- directives: Directive[];
78
- }
79
- interface BreakStatement extends BaseNode {
80
- type: "BreakStatement";
81
- label?: Identifier | null;
82
- }
83
- interface CallExpression extends BaseNode {
84
- type: "CallExpression";
85
- callee: Expression | Super | Import | V8IntrinsicIdentifier;
86
- arguments: (Expression | SpreadElement | ArgumentPlaceholder)[];
87
- typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
88
- }
89
- interface CatchClause extends BaseNode {
90
- type: "CatchClause";
91
- param?: Identifier | ArrayPattern | ObjectPattern | null;
92
- body: BlockStatement;
93
- }
94
- interface ConditionalExpression extends BaseNode {
95
- type: "ConditionalExpression";
96
- test: Expression;
97
- consequent: Expression;
98
- alternate: Expression;
99
- }
100
- interface ContinueStatement extends BaseNode {
101
- type: "ContinueStatement";
102
- label?: Identifier | null;
103
- }
104
- interface DebuggerStatement extends BaseNode {
105
- type: "DebuggerStatement";
106
- }
107
- interface DoWhileStatement extends BaseNode {
108
- type: "DoWhileStatement";
109
- test: Expression;
110
- body: Statement;
111
- }
112
- interface EmptyStatement extends BaseNode {
113
- type: "EmptyStatement";
114
- }
115
- interface ExpressionStatement extends BaseNode {
116
- type: "ExpressionStatement";
117
- expression: Expression;
118
- }
119
- interface File extends BaseNode {
120
- type: "File";
121
- program: Program;
122
- comments?: (CommentBlock | CommentLine)[] | null;
123
- tokens?: any[] | null;
124
- }
125
- interface ForInStatement extends BaseNode {
126
- type: "ForInStatement";
127
- left: VariableDeclaration | Identifier | MemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
128
- right: Expression;
129
- body: Statement;
130
- }
131
- interface ForStatement extends BaseNode {
132
- type: "ForStatement";
133
- init?: VariableDeclaration | Expression | null;
134
- test?: Expression | null;
135
- update?: Expression | null;
136
- body: Statement;
137
- }
138
- interface FunctionDeclaration extends BaseNode {
139
- type: "FunctionDeclaration";
140
- id?: Identifier | null;
141
- params: FunctionParameter[];
142
- body: BlockStatement;
143
- generator: boolean;
144
- async: boolean;
145
- declare?: boolean | null;
146
- predicate?: FlowPredicate | null;
147
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
148
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
149
- }
150
- interface FunctionExpression extends BaseNode {
151
- type: "FunctionExpression";
152
- id?: Identifier | null;
153
- params: FunctionParameter[];
154
- body: BlockStatement;
155
- generator: boolean;
156
- async: boolean;
157
- predicate?: FlowPredicate | null;
158
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
159
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
160
- }
161
- interface Identifier extends BaseNode {
162
- type: "Identifier";
163
- name: string;
164
- decorators?: Decorator[] | null;
165
- optional?: boolean | null;
166
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
167
- }
168
- interface IfStatement extends BaseNode {
169
- type: "IfStatement";
170
- test: Expression;
171
- consequent: Statement;
172
- alternate?: Statement | null;
173
- }
174
- interface LabeledStatement extends BaseNode {
175
- type: "LabeledStatement";
176
- label: Identifier;
177
- body: Statement;
178
- }
179
- interface StringLiteral extends BaseNode {
180
- type: "StringLiteral";
181
- value: string;
182
- }
183
- interface NumericLiteral extends BaseNode {
184
- type: "NumericLiteral";
185
- value: number;
186
- }
187
- /**
188
- * @deprecated Use `NumericLiteral`
189
- */
190
- interface NumberLiteral$1 extends BaseNode {
191
- type: "NumberLiteral";
192
- value: number;
193
- }
194
- interface NullLiteral extends BaseNode {
195
- type: "NullLiteral";
196
- }
197
- interface BooleanLiteral extends BaseNode {
198
- type: "BooleanLiteral";
199
- value: boolean;
200
- }
201
- interface RegExpLiteral extends BaseNode {
202
- type: "RegExpLiteral";
203
- pattern: string;
204
- flags: string;
205
- }
206
- /**
207
- * @deprecated Use `RegExpLiteral`
208
- */
209
- interface RegexLiteral$1 extends BaseNode {
210
- type: "RegexLiteral";
211
- pattern: string;
212
- flags: string;
213
- }
214
- interface LogicalExpression extends BaseNode {
215
- type: "LogicalExpression";
216
- operator: "||" | "&&" | "??";
217
- left: Expression;
218
- right: Expression;
219
- }
220
- interface MemberExpressionComputed extends BaseNode {
221
- type: "MemberExpression";
222
- object: Expression | Super;
223
- computed: true;
224
- property: Expression;
225
- }
226
- interface MemberExpressionNonComputed extends BaseNode {
227
- type: "MemberExpression";
228
- object: Expression | Super;
229
- computed: false;
230
- property: Identifier | PrivateName;
231
- }
232
- type MemberExpression = MemberExpressionComputed | MemberExpressionNonComputed;
233
- interface NewExpression extends BaseNode {
234
- type: "NewExpression";
235
- callee: Expression | V8IntrinsicIdentifier;
236
- arguments: (Expression | SpreadElement | ArgumentPlaceholder)[];
237
- typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
238
- }
239
- interface Program extends BaseNode {
240
- type: "Program";
241
- body: Statement[];
242
- directives: Directive[];
243
- sourceType: "script" | "module";
244
- interpreter?: InterpreterDirective | null;
245
- }
246
- interface ObjectExpression extends BaseNode {
247
- type: "ObjectExpression";
248
- properties: (ObjectMethod | ObjectProperty | SpreadElement)[];
249
- }
250
- interface ObjectMethodComputed extends BaseNode {
251
- type: "ObjectMethod";
252
- kind: "method" | "get" | "set";
253
- params: FunctionParameter[];
254
- body: BlockStatement;
255
- generator: boolean;
256
- async: boolean;
257
- decorators?: Decorator[] | null;
258
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
259
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
260
- computed: true;
261
- key: Expression;
262
- }
263
- interface ObjectMethodNonComputed extends BaseNode {
264
- type: "ObjectMethod";
265
- kind: "method" | "get" | "set";
266
- params: FunctionParameter[];
267
- body: BlockStatement;
268
- generator: boolean;
269
- async: boolean;
270
- decorators?: Decorator[] | null;
271
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
272
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
273
- computed: false;
274
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
275
- }
276
- type ObjectMethod = ObjectMethodComputed | ObjectMethodNonComputed;
277
- interface ObjectPropertyComputed extends BaseNode {
278
- type: "ObjectProperty";
279
- value: Expression | PatternLike;
280
- shorthand: boolean;
281
- decorators?: Decorator[] | null;
282
- computed: true;
283
- key: Expression;
284
- }
285
- interface ObjectPropertyNonComputed extends BaseNode {
286
- type: "ObjectProperty";
287
- value: Expression | PatternLike;
288
- shorthand: boolean;
289
- decorators?: Decorator[] | null;
290
- computed: false;
291
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
292
- }
293
- type ObjectProperty = ObjectPropertyComputed | ObjectPropertyNonComputed;
294
- interface RestElement extends BaseNode {
295
- type: "RestElement";
296
- argument: Identifier | ArrayPattern | ObjectPattern | MemberExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
297
- decorators?: Decorator[] | null;
298
- optional?: boolean | null;
299
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
300
- }
301
- /**
302
- * @deprecated Use `RestElement`
303
- */
304
- interface RestProperty$1 extends BaseNode {
305
- type: "RestProperty";
306
- argument: Identifier | ArrayPattern | ObjectPattern | MemberExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
307
- decorators?: Decorator[] | null;
308
- optional?: boolean | null;
309
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
310
- }
311
- interface ReturnStatement extends BaseNode {
312
- type: "ReturnStatement";
313
- argument?: Expression | null;
314
- }
315
- interface SequenceExpression extends BaseNode {
316
- type: "SequenceExpression";
317
- expressions: Expression[];
318
- }
319
- interface ParenthesizedExpression extends BaseNode {
320
- type: "ParenthesizedExpression";
321
- expression: Expression;
322
- }
323
- interface SwitchCase extends BaseNode {
324
- type: "SwitchCase";
325
- test?: Expression | null;
326
- consequent: Statement[];
327
- }
328
- interface SwitchStatement extends BaseNode {
329
- type: "SwitchStatement";
330
- discriminant: Expression;
331
- cases: SwitchCase[];
332
- }
333
- interface ThisExpression extends BaseNode {
334
- type: "ThisExpression";
335
- }
336
- interface ThrowStatement extends BaseNode {
337
- type: "ThrowStatement";
338
- argument: Expression;
339
- }
340
- interface TryStatement extends BaseNode {
341
- type: "TryStatement";
342
- block: BlockStatement;
343
- handler?: CatchClause | null;
344
- finalizer?: BlockStatement | null;
345
- }
346
- interface UnaryExpression extends BaseNode {
347
- type: "UnaryExpression";
348
- operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
349
- argument: Expression;
350
- prefix: boolean;
351
- }
352
- interface UpdateExpression extends BaseNode {
353
- type: "UpdateExpression";
354
- operator: "++" | "--";
355
- argument: Identifier | MemberExpression;
356
- prefix: boolean;
357
- }
358
- interface VariableDeclaration extends BaseNode {
359
- type: "VariableDeclaration";
360
- kind: "var" | "let" | "const" | "using" | "await using";
361
- declarations: VariableDeclarator[];
362
- declare?: boolean | null;
363
- }
364
- interface VariableDeclarator extends BaseNode {
365
- type: "VariableDeclarator";
366
- id: Identifier | ArrayPattern | ObjectPattern | VoidPattern;
367
- init?: Expression | null;
368
- definite?: boolean | null;
369
- }
370
- interface WhileStatement extends BaseNode {
371
- type: "WhileStatement";
372
- test: Expression;
373
- body: Statement;
374
- }
375
- interface WithStatement extends BaseNode {
376
- type: "WithStatement";
377
- object: Expression;
378
- body: Statement;
379
- }
380
- interface AssignmentPattern extends BaseNode {
381
- type: "AssignmentPattern";
382
- left: Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
383
- right: Expression;
384
- decorators?: Decorator[] | null;
385
- optional?: boolean | null;
386
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
387
- }
388
- interface ArrayPattern extends BaseNode {
389
- type: "ArrayPattern";
390
- elements: (null | PatternLike)[];
391
- decorators?: Decorator[] | null;
392
- optional?: boolean | null;
393
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
394
- }
395
- interface ArrowFunctionExpression extends BaseNode {
396
- type: "ArrowFunctionExpression";
397
- params: FunctionParameter[];
398
- body: BlockStatement | Expression;
399
- async: boolean;
400
- expression?: boolean | null;
401
- generator?: boolean | null;
402
- predicate?: FlowPredicate | null;
403
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
404
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
405
- }
406
- interface ClassBody extends BaseNode {
407
- type: "ClassBody";
408
- body: (ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock)[];
409
- }
410
- interface ClassExpression extends BaseNode {
411
- type: "ClassExpression";
412
- id?: Identifier | null;
413
- superClass?: Expression | null;
414
- body: ClassBody;
415
- decorators?: Decorator[] | null;
416
- implements?: (TSClassImplements | ClassImplements)[] | null;
417
- mixins?: InterfaceExtends | null;
418
- superTypeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
419
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
420
- }
421
- interface ClassDeclaration extends BaseNode {
422
- type: "ClassDeclaration";
423
- id?: Identifier | null;
424
- superClass?: Expression | null;
425
- body: ClassBody;
426
- decorators?: Decorator[] | null;
427
- abstract?: boolean | null;
428
- declare?: boolean | null;
429
- implements?: (TSClassImplements | ClassImplements)[] | null;
430
- mixins?: InterfaceExtends | null;
431
- superTypeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
432
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
433
- }
434
- interface ExportAllDeclaration extends BaseNode {
435
- type: "ExportAllDeclaration";
436
- source: StringLiteral;
437
- attributes?: ImportAttribute[] | null;
438
- exportKind?: "type" | "value" | null;
439
- }
440
- interface ExportDefaultDeclaration extends BaseNode {
441
- type: "ExportDefaultDeclaration";
442
- declaration: FunctionDeclaration | ClassDeclaration | Expression | TSDeclareFunction | TSInterfaceDeclaration | EnumDeclaration;
443
- exportKind?: "value" | null;
444
- }
445
- interface ExportNamedDeclaration extends BaseNode {
446
- type: "ExportNamedDeclaration";
447
- declaration?: VariableDeclaration | FunctionDeclaration | ClassDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | EnumDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | null;
448
- specifiers: (ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier)[];
449
- source?: StringLiteral | null;
450
- attributes?: ImportAttribute[] | null;
451
- exportKind?: "type" | "value" | null;
452
- }
453
- interface ExportSpecifier extends BaseNode {
454
- type: "ExportSpecifier";
455
- local: Identifier | StringLiteral;
456
- exported: Identifier | StringLiteral;
457
- exportKind?: "type" | "value" | null;
458
- }
459
- interface ForOfStatement extends BaseNode {
460
- type: "ForOfStatement";
461
- left: VariableDeclaration | Identifier | MemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
462
- right: Expression;
463
- body: Statement;
464
- await: boolean;
465
- }
466
- interface ImportDeclaration extends BaseNode {
467
- type: "ImportDeclaration";
468
- specifiers: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[];
469
- source: StringLiteral;
470
- attributes?: ImportAttribute[] | null;
471
- importKind?: "type" | "typeof" | "value" | null;
472
- module?: boolean | null;
473
- phase?: "source" | "defer" | null;
474
- }
475
- interface ImportDefaultSpecifier extends BaseNode {
476
- type: "ImportDefaultSpecifier";
477
- local: Identifier;
478
- }
479
- interface ImportNamespaceSpecifier extends BaseNode {
480
- type: "ImportNamespaceSpecifier";
481
- local: Identifier;
482
- }
483
- interface ImportSpecifier extends BaseNode {
484
- type: "ImportSpecifier";
485
- local: Identifier;
486
- imported: Identifier | StringLiteral;
487
- importKind?: "type" | "typeof" | "value" | null;
488
- }
489
- interface MetaProperty extends BaseNode {
490
- type: "MetaProperty";
491
- meta: Identifier;
492
- property: Identifier;
493
- }
494
- interface ClassMethodComputed extends BaseNode {
495
- type: "ClassMethod";
496
- kind: "get" | "set" | "method" | "constructor";
497
- params: (FunctionParameter | TSParameterProperty)[];
498
- body: BlockStatement;
499
- static: boolean;
500
- generator: boolean;
501
- async: boolean;
502
- abstract?: boolean | null;
503
- access?: "public" | "private" | "protected" | null;
504
- accessibility?: "public" | "private" | "protected" | null;
505
- decorators?: Decorator[] | null;
506
- optional?: boolean | null;
507
- override?: boolean | null;
508
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
509
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
510
- computed: true;
511
- key: Expression;
512
- }
513
- interface ClassMethodNonComputed extends BaseNode {
514
- type: "ClassMethod";
515
- kind: "get" | "set" | "method" | "constructor";
516
- params: (FunctionParameter | TSParameterProperty)[];
517
- body: BlockStatement;
518
- static: boolean;
519
- generator: boolean;
520
- async: boolean;
521
- abstract?: boolean | null;
522
- access?: "public" | "private" | "protected" | null;
523
- accessibility?: "public" | "private" | "protected" | null;
524
- decorators?: Decorator[] | null;
525
- optional?: boolean | null;
526
- override?: boolean | null;
527
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
528
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
529
- computed: false;
530
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
531
- }
532
- type ClassMethod = ClassMethodComputed | ClassMethodNonComputed;
533
- interface ObjectPattern extends BaseNode {
534
- type: "ObjectPattern";
535
- properties: (RestElement | ObjectProperty)[];
536
- decorators?: Decorator[] | null;
537
- optional?: boolean | null;
538
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
539
- }
540
- interface SpreadElement extends BaseNode {
541
- type: "SpreadElement";
542
- argument: Expression;
543
- }
544
- /**
545
- * @deprecated Use `SpreadElement`
546
- */
547
- interface SpreadProperty$1 extends BaseNode {
548
- type: "SpreadProperty";
549
- argument: Expression;
550
- }
551
- interface Super extends BaseNode {
552
- type: "Super";
553
- }
554
- interface TaggedTemplateExpression extends BaseNode {
555
- type: "TaggedTemplateExpression";
556
- tag: Expression;
557
- quasi: TemplateLiteral;
558
- typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
559
- }
560
- interface TemplateElement extends BaseNode {
561
- type: "TemplateElement";
562
- value: {
563
- raw: string;
564
- cooked?: string | null;
565
- };
566
- tail: boolean;
567
- }
568
- interface TemplateLiteral extends BaseNode {
569
- type: "TemplateLiteral";
570
- quasis: TemplateElement[];
571
- expressions: (Expression | TSType)[];
572
- }
573
- interface YieldExpression extends BaseNode {
574
- type: "YieldExpression";
575
- argument?: Expression | null;
576
- delegate: boolean;
577
- }
578
- interface AwaitExpression extends BaseNode {
579
- type: "AwaitExpression";
580
- argument: Expression;
581
- }
582
- interface ImportExpression extends BaseNode {
583
- type: "ImportExpression";
584
- source: Expression;
585
- options?: Expression | null;
586
- phase?: "source" | "defer" | null;
587
- }
588
- interface Import extends BaseNode {
589
- type: "Import";
590
- }
591
- interface BigIntLiteral extends BaseNode {
592
- type: "BigIntLiteral";
593
- value: bigint;
594
- }
595
- interface ExportNamespaceSpecifier extends BaseNode {
596
- type: "ExportNamespaceSpecifier";
597
- exported: Identifier | StringLiteral;
598
- }
599
- interface OptionalMemberExpressionComputed extends BaseNode {
600
- type: "OptionalMemberExpression";
601
- object: Expression;
602
- optional: boolean;
603
- computed: true;
604
- property: Expression;
605
- }
606
- interface OptionalMemberExpressionNonComputed extends BaseNode {
607
- type: "OptionalMemberExpression";
608
- object: Expression;
609
- optional: boolean;
610
- computed: false;
611
- property: Identifier | PrivateName;
612
- }
613
- type OptionalMemberExpression = OptionalMemberExpressionComputed | OptionalMemberExpressionNonComputed;
614
- interface OptionalCallExpression extends BaseNode {
615
- type: "OptionalCallExpression";
616
- callee: Expression;
617
- arguments: (Expression | SpreadElement | ArgumentPlaceholder)[];
618
- optional: boolean;
619
- typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
620
- }
621
- interface ClassPropertyComputed extends BaseNode {
622
- type: "ClassProperty";
623
- value?: Expression | null;
624
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
625
- decorators?: Decorator[] | null;
626
- static: boolean;
627
- abstract?: boolean | null;
628
- accessibility?: "public" | "private" | "protected" | null;
629
- declare?: boolean | null;
630
- definite?: boolean | null;
631
- optional?: boolean | null;
632
- override?: boolean | null;
633
- readonly?: boolean | null;
634
- variance?: Variance | null;
635
- computed: true;
636
- key: Expression;
637
- }
638
- interface ClassPropertyNonComputed extends BaseNode {
639
- type: "ClassProperty";
640
- value?: Expression | null;
641
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
642
- decorators?: Decorator[] | null;
643
- static: boolean;
644
- abstract?: boolean | null;
645
- accessibility?: "public" | "private" | "protected" | null;
646
- declare?: boolean | null;
647
- definite?: boolean | null;
648
- optional?: boolean | null;
649
- override?: boolean | null;
650
- readonly?: boolean | null;
651
- variance?: Variance | null;
652
- computed: false;
653
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
654
- }
655
- type ClassProperty = ClassPropertyComputed | ClassPropertyNonComputed;
656
- interface ClassPrivateProperty extends BaseNode {
657
- type: "ClassPrivateProperty";
658
- key: PrivateName;
659
- value?: Expression | null;
660
- decorators?: Decorator[] | null;
661
- static: boolean;
662
- definite?: boolean | null;
663
- optional?: boolean | null;
664
- readonly?: boolean | null;
665
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
666
- variance?: Variance | null;
667
- }
668
- interface ClassPrivateMethod extends BaseNode {
669
- type: "ClassPrivateMethod";
670
- kind: "get" | "set" | "method";
671
- key: PrivateName;
672
- params: (FunctionParameter | TSParameterProperty)[];
673
- body: BlockStatement;
674
- static: boolean;
675
- abstract?: boolean | null;
676
- access?: "public" | "private" | "protected" | null;
677
- accessibility?: "public" | "private" | "protected" | null;
678
- async: boolean;
679
- computed: boolean;
680
- decorators?: Decorator[] | null;
681
- generator: boolean;
682
- optional?: boolean | null;
683
- override?: boolean | null;
684
- returnType?: TypeAnnotation | TSTypeAnnotation | null;
685
- typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
686
- }
687
- interface PrivateName extends BaseNode {
688
- type: "PrivateName";
689
- id: Identifier;
690
- }
691
- interface StaticBlock extends BaseNode {
692
- type: "StaticBlock";
693
- body: Statement[];
694
- }
695
- interface ImportAttribute extends BaseNode {
696
- type: "ImportAttribute";
697
- key: Identifier | StringLiteral;
698
- value: StringLiteral;
699
- }
700
- interface AnyTypeAnnotation extends BaseNode {
701
- type: "AnyTypeAnnotation";
702
- }
703
- interface ArrayTypeAnnotation extends BaseNode {
704
- type: "ArrayTypeAnnotation";
705
- elementType: FlowType;
706
- }
707
- interface BooleanTypeAnnotation extends BaseNode {
708
- type: "BooleanTypeAnnotation";
709
- }
710
- interface BooleanLiteralTypeAnnotation extends BaseNode {
711
- type: "BooleanLiteralTypeAnnotation";
712
- value: boolean;
713
- }
714
- interface NullLiteralTypeAnnotation extends BaseNode {
715
- type: "NullLiteralTypeAnnotation";
716
- }
717
- interface ClassImplements extends BaseNode {
718
- type: "ClassImplements";
719
- id: Identifier;
720
- typeParameters?: TypeParameterInstantiation | null;
721
- }
722
- interface DeclareClass extends BaseNode {
723
- type: "DeclareClass";
724
- id: Identifier;
725
- typeParameters?: TypeParameterDeclaration | null;
726
- extends?: InterfaceExtends[] | null;
727
- body: ObjectTypeAnnotation;
728
- implements?: ClassImplements[] | null;
729
- mixins?: InterfaceExtends[] | null;
730
- }
731
- interface DeclareFunction extends BaseNode {
732
- type: "DeclareFunction";
733
- id: Identifier;
734
- predicate?: FlowPredicate | null;
735
- }
736
- interface DeclareInterface extends BaseNode {
737
- type: "DeclareInterface";
738
- id: Identifier;
739
- typeParameters?: TypeParameterDeclaration | null;
740
- extends?: InterfaceExtends[] | null;
741
- body: ObjectTypeAnnotation;
742
- }
743
- interface DeclareModule extends BaseNode {
744
- type: "DeclareModule";
745
- id: Identifier | StringLiteral;
746
- body: BlockStatement;
747
- kind?: "CommonJS" | "ES" | null;
748
- }
749
- interface DeclareModuleExports extends BaseNode {
750
- type: "DeclareModuleExports";
751
- typeAnnotation: TypeAnnotation;
752
- }
753
- interface DeclareTypeAlias extends BaseNode {
754
- type: "DeclareTypeAlias";
755
- id: Identifier;
756
- typeParameters?: TypeParameterDeclaration | null;
757
- right: FlowType;
758
- }
759
- interface DeclareOpaqueType extends BaseNode {
760
- type: "DeclareOpaqueType";
761
- id: Identifier;
762
- typeParameters?: TypeParameterDeclaration | null;
763
- supertype?: FlowType | null;
764
- impltype?: FlowType | null;
765
- }
766
- interface DeclareVariable extends BaseNode {
767
- type: "DeclareVariable";
768
- id: Identifier;
769
- }
770
- interface DeclareExportDeclaration extends BaseNode {
771
- type: "DeclareExportDeclaration";
772
- declaration?: Flow | null;
773
- specifiers?: (ExportSpecifier | ExportNamespaceSpecifier)[] | null;
774
- source?: StringLiteral | null;
775
- attributes?: ImportAttribute[] | null;
776
- default?: boolean | null;
777
- }
778
- interface DeclareExportAllDeclaration extends BaseNode {
779
- type: "DeclareExportAllDeclaration";
780
- source: StringLiteral;
781
- attributes?: ImportAttribute[] | null;
782
- exportKind?: "type" | "value" | null;
783
- }
784
- interface DeclaredPredicate extends BaseNode {
785
- type: "DeclaredPredicate";
786
- value: Expression;
787
- }
788
- interface ExistsTypeAnnotation extends BaseNode {
789
- type: "ExistsTypeAnnotation";
790
- }
791
- interface FunctionTypeAnnotation extends BaseNode {
792
- type: "FunctionTypeAnnotation";
793
- typeParameters?: TypeParameterDeclaration | null;
794
- params: FunctionTypeParam[];
795
- rest?: FunctionTypeParam | null;
796
- returnType: FlowType;
797
- this?: FunctionTypeParam | null;
798
- }
799
- interface FunctionTypeParam extends BaseNode {
800
- type: "FunctionTypeParam";
801
- name?: Identifier | null;
802
- typeAnnotation: FlowType;
803
- optional?: boolean | null;
804
- }
805
- interface GenericTypeAnnotation extends BaseNode {
806
- type: "GenericTypeAnnotation";
807
- id: Identifier | QualifiedTypeIdentifier;
808
- typeParameters?: TypeParameterInstantiation | null;
809
- }
810
- interface InferredPredicate extends BaseNode {
811
- type: "InferredPredicate";
812
- }
813
- interface InterfaceExtends extends BaseNode {
814
- type: "InterfaceExtends";
815
- id: Identifier | QualifiedTypeIdentifier;
816
- typeParameters?: TypeParameterInstantiation | null;
817
- }
818
- interface InterfaceDeclaration extends BaseNode {
819
- type: "InterfaceDeclaration";
820
- id: Identifier;
821
- typeParameters?: TypeParameterDeclaration | null;
822
- extends?: InterfaceExtends[] | null;
823
- body: ObjectTypeAnnotation;
824
- }
825
- interface InterfaceTypeAnnotation extends BaseNode {
826
- type: "InterfaceTypeAnnotation";
827
- extends?: InterfaceExtends[] | null;
828
- body: ObjectTypeAnnotation;
829
- }
830
- interface IntersectionTypeAnnotation extends BaseNode {
831
- type: "IntersectionTypeAnnotation";
832
- types: FlowType[];
833
- }
834
- interface MixedTypeAnnotation extends BaseNode {
835
- type: "MixedTypeAnnotation";
836
- }
837
- interface EmptyTypeAnnotation extends BaseNode {
838
- type: "EmptyTypeAnnotation";
839
- }
840
- interface NullableTypeAnnotation extends BaseNode {
841
- type: "NullableTypeAnnotation";
842
- typeAnnotation: FlowType;
843
- }
844
- interface NumberLiteralTypeAnnotation extends BaseNode {
845
- type: "NumberLiteralTypeAnnotation";
846
- value: number;
847
- }
848
- interface BigIntLiteralTypeAnnotation extends BaseNode {
849
- type: "BigIntLiteralTypeAnnotation";
850
- value: bigint;
851
- }
852
- interface NumberTypeAnnotation extends BaseNode {
853
- type: "NumberTypeAnnotation";
854
- }
855
- interface ObjectTypeAnnotation extends BaseNode {
856
- type: "ObjectTypeAnnotation";
857
- properties: (ObjectTypeProperty | ObjectTypeSpreadProperty)[];
858
- indexers: ObjectTypeIndexer[];
859
- callProperties: ObjectTypeCallProperty[];
860
- internalSlots: ObjectTypeInternalSlot[];
861
- exact: boolean;
862
- inexact?: boolean | null;
863
- }
864
- interface ObjectTypeInternalSlot extends BaseNode {
865
- type: "ObjectTypeInternalSlot";
866
- id: Identifier;
867
- value: FlowType;
868
- optional: boolean;
869
- static: boolean;
870
- method: boolean;
871
- }
872
- interface ObjectTypeCallProperty extends BaseNode {
873
- type: "ObjectTypeCallProperty";
874
- value: FlowType;
875
- static: boolean;
876
- }
877
- interface ObjectTypeIndexer extends BaseNode {
878
- type: "ObjectTypeIndexer";
879
- id?: Identifier | null;
880
- key: FlowType;
881
- value: FlowType;
882
- variance?: Variance | null;
883
- static: boolean;
884
- }
885
- interface ObjectTypeProperty extends BaseNode {
886
- type: "ObjectTypeProperty";
887
- key: Identifier | StringLiteral | NumericLiteral;
888
- value: FlowType;
889
- variance?: Variance | null;
890
- kind: "init" | "get" | "set";
891
- method: boolean;
892
- optional: boolean;
893
- proto: boolean;
894
- static: boolean;
895
- }
896
- interface ObjectTypeSpreadProperty extends BaseNode {
897
- type: "ObjectTypeSpreadProperty";
898
- argument: FlowType;
899
- }
900
- interface OpaqueType extends BaseNode {
901
- type: "OpaqueType";
902
- id: Identifier;
903
- typeParameters?: TypeParameterDeclaration | null;
904
- supertype?: FlowType | null;
905
- impltype: FlowType;
906
- }
907
- interface QualifiedTypeIdentifier extends BaseNode {
908
- type: "QualifiedTypeIdentifier";
909
- id: Identifier;
910
- qualification: Identifier | QualifiedTypeIdentifier;
911
- }
912
- interface StringLiteralTypeAnnotation extends BaseNode {
913
- type: "StringLiteralTypeAnnotation";
914
- value: string;
915
- }
916
- interface StringTypeAnnotation extends BaseNode {
917
- type: "StringTypeAnnotation";
918
- }
919
- interface SymbolTypeAnnotation extends BaseNode {
920
- type: "SymbolTypeAnnotation";
921
- }
922
- interface ThisTypeAnnotation extends BaseNode {
923
- type: "ThisTypeAnnotation";
924
- }
925
- interface TupleTypeAnnotation extends BaseNode {
926
- type: "TupleTypeAnnotation";
927
- types: FlowType[];
928
- }
929
- interface TypeofTypeAnnotation extends BaseNode {
930
- type: "TypeofTypeAnnotation";
931
- argument: FlowType | Identifier;
932
- }
933
- interface TypeAlias extends BaseNode {
934
- type: "TypeAlias";
935
- id: Identifier;
936
- typeParameters?: TypeParameterDeclaration | null;
937
- right: FlowType;
938
- }
939
- interface TypeAnnotation extends BaseNode {
940
- type: "TypeAnnotation";
941
- typeAnnotation: FlowType | Identifier;
942
- }
943
- interface TypeCastExpression extends BaseNode {
944
- type: "TypeCastExpression";
945
- expression: Expression;
946
- typeAnnotation: TypeAnnotation;
947
- }
948
- interface TypeParameter extends BaseNode {
949
- type: "TypeParameter";
950
- name: string;
951
- bound?: TypeAnnotation | null;
952
- default?: FlowType | null;
953
- variance?: Variance | null;
954
- }
955
- interface TypeParameterDeclaration extends BaseNode {
956
- type: "TypeParameterDeclaration";
957
- params: TypeParameter[];
958
- }
959
- interface TypeParameterInstantiation extends BaseNode {
960
- type: "TypeParameterInstantiation";
961
- params: FlowType[];
962
- }
963
- interface UnionTypeAnnotation extends BaseNode {
964
- type: "UnionTypeAnnotation";
965
- types: FlowType[];
966
- }
967
- interface Variance extends BaseNode {
968
- type: "Variance";
969
- kind: "minus" | "plus";
970
- }
971
- interface VoidTypeAnnotation extends BaseNode {
972
- type: "VoidTypeAnnotation";
973
- }
974
- interface EnumDeclaration extends BaseNode {
975
- type: "EnumDeclaration";
976
- id: Identifier;
977
- body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
978
- }
979
- interface EnumBooleanBody extends BaseNode {
980
- type: "EnumBooleanBody";
981
- members: EnumBooleanMember[];
982
- explicitType: boolean;
983
- hasUnknownMembers: boolean;
984
- }
985
- interface EnumNumberBody extends BaseNode {
986
- type: "EnumNumberBody";
987
- members: EnumNumberMember[];
988
- explicitType: boolean;
989
- hasUnknownMembers: boolean;
990
- }
991
- interface EnumStringBody extends BaseNode {
992
- type: "EnumStringBody";
993
- members: (EnumStringMember | EnumDefaultedMember)[];
994
- explicitType: boolean;
995
- hasUnknownMembers: boolean;
996
- }
997
- interface EnumSymbolBody extends BaseNode {
998
- type: "EnumSymbolBody";
999
- members: EnumDefaultedMember[];
1000
- hasUnknownMembers: boolean;
1001
- }
1002
- interface EnumBooleanMember extends BaseNode {
1003
- type: "EnumBooleanMember";
1004
- id: Identifier;
1005
- init: BooleanLiteral;
1006
- }
1007
- interface EnumNumberMember extends BaseNode {
1008
- type: "EnumNumberMember";
1009
- id: Identifier;
1010
- init: NumericLiteral;
1011
- }
1012
- interface EnumStringMember extends BaseNode {
1013
- type: "EnumStringMember";
1014
- id: Identifier;
1015
- init: StringLiteral;
1016
- }
1017
- interface EnumDefaultedMember extends BaseNode {
1018
- type: "EnumDefaultedMember";
1019
- id: Identifier;
1020
- }
1021
- interface IndexedAccessType extends BaseNode {
1022
- type: "IndexedAccessType";
1023
- objectType: FlowType;
1024
- indexType: FlowType;
1025
- }
1026
- interface OptionalIndexedAccessType extends BaseNode {
1027
- type: "OptionalIndexedAccessType";
1028
- objectType: FlowType;
1029
- indexType: FlowType;
1030
- optional: boolean;
1031
- }
1032
- interface JSXAttribute extends BaseNode {
1033
- type: "JSXAttribute";
1034
- name: JSXIdentifier | JSXNamespacedName;
1035
- value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null;
1036
- }
1037
- interface JSXClosingElement extends BaseNode {
1038
- type: "JSXClosingElement";
1039
- name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
1040
- }
1041
- interface JSXElement extends BaseNode {
1042
- type: "JSXElement";
1043
- openingElement: JSXOpeningElement;
1044
- closingElement?: JSXClosingElement | null;
1045
- children: (JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment)[];
1046
- }
1047
- interface JSXEmptyExpression extends BaseNode {
1048
- type: "JSXEmptyExpression";
1049
- }
1050
- interface JSXExpressionContainer extends BaseNode {
1051
- type: "JSXExpressionContainer";
1052
- expression: Expression | JSXEmptyExpression;
1053
- }
1054
- interface JSXSpreadChild extends BaseNode {
1055
- type: "JSXSpreadChild";
1056
- expression: Expression;
1057
- }
1058
- interface JSXIdentifier extends BaseNode {
1059
- type: "JSXIdentifier";
1060
- name: string;
1061
- }
1062
- interface JSXMemberExpression extends BaseNode {
1063
- type: "JSXMemberExpression";
1064
- object: JSXMemberExpression | JSXIdentifier;
1065
- property: JSXIdentifier;
1066
- }
1067
- interface JSXNamespacedName extends BaseNode {
1068
- type: "JSXNamespacedName";
1069
- namespace: JSXIdentifier;
1070
- name: JSXIdentifier;
1071
- }
1072
- interface JSXOpeningElement extends BaseNode {
1073
- type: "JSXOpeningElement";
1074
- name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
1075
- attributes: (JSXAttribute | JSXSpreadAttribute)[];
1076
- selfClosing: boolean;
1077
- typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
1078
- }
1079
- interface JSXSpreadAttribute extends BaseNode {
1080
- type: "JSXSpreadAttribute";
1081
- argument: Expression;
1082
- }
1083
- interface JSXText extends BaseNode {
1084
- type: "JSXText";
1085
- value: string;
1086
- }
1087
- interface JSXFragment extends BaseNode {
1088
- type: "JSXFragment";
1089
- openingFragment: JSXOpeningFragment;
1090
- closingFragment: JSXClosingFragment;
1091
- children: (JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment)[];
1092
- }
1093
- interface JSXOpeningFragment extends BaseNode {
1094
- type: "JSXOpeningFragment";
1095
- }
1096
- interface JSXClosingFragment extends BaseNode {
1097
- type: "JSXClosingFragment";
1098
- }
1099
- interface Placeholder extends BaseNode {
1100
- type: "Placeholder";
1101
- expectedNode: "Identifier" | "StringLiteral" | "Expression" | "Statement" | "Declaration" | "BlockStatement" | "ClassBody" | "Pattern";
1102
- name: Identifier;
1103
- decorators?: Decorator[] | null;
1104
- optional?: boolean | null;
1105
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
1106
- }
1107
- interface V8IntrinsicIdentifier extends BaseNode {
1108
- type: "V8IntrinsicIdentifier";
1109
- name: string;
1110
- }
1111
- interface ArgumentPlaceholder extends BaseNode {
1112
- type: "ArgumentPlaceholder";
1113
- }
1114
- interface BindExpression extends BaseNode {
1115
- type: "BindExpression";
1116
- object: null | Expression;
1117
- callee: Expression;
1118
- }
1119
- interface ClassAccessorPropertyComputed extends BaseNode {
1120
- type: "ClassAccessorProperty";
1121
- value?: Expression | null;
1122
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
1123
- decorators?: Decorator[] | null;
1124
- static: boolean;
1125
- abstract?: boolean | null;
1126
- accessibility?: "public" | "private" | "protected" | null;
1127
- declare?: boolean | null;
1128
- definite?: boolean | null;
1129
- optional?: boolean | null;
1130
- override?: boolean | null;
1131
- readonly?: boolean | null;
1132
- variance?: Variance | null;
1133
- computed: true;
1134
- key: Expression;
1135
- }
1136
- interface ClassAccessorPropertyNonComputed extends BaseNode {
1137
- type: "ClassAccessorProperty";
1138
- value?: Expression | null;
1139
- typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
1140
- decorators?: Decorator[] | null;
1141
- static: boolean;
1142
- abstract?: boolean | null;
1143
- accessibility?: "public" | "private" | "protected" | null;
1144
- declare?: boolean | null;
1145
- definite?: boolean | null;
1146
- optional?: boolean | null;
1147
- override?: boolean | null;
1148
- readonly?: boolean | null;
1149
- variance?: Variance | null;
1150
- computed: false;
1151
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
1152
- }
1153
- type ClassAccessorProperty = ClassAccessorPropertyComputed | ClassAccessorPropertyNonComputed;
1154
- interface Decorator extends BaseNode {
1155
- type: "Decorator";
1156
- expression: Expression;
1157
- }
1158
- interface DoExpression extends BaseNode {
1159
- type: "DoExpression";
1160
- body: BlockStatement;
1161
- async: boolean;
1162
- }
1163
- interface ExportDefaultSpecifier extends BaseNode {
1164
- type: "ExportDefaultSpecifier";
1165
- exported: Identifier;
1166
- }
1167
- interface ModuleExpression extends BaseNode {
1168
- type: "ModuleExpression";
1169
- body: Program;
1170
- }
1171
- interface TopicReference extends BaseNode {
1172
- type: "TopicReference";
1173
- }
1174
- interface VoidPattern extends BaseNode {
1175
- type: "VoidPattern";
1176
- }
1177
- interface TSParameterProperty extends BaseNode {
1178
- type: "TSParameterProperty";
1179
- parameter: Identifier | AssignmentPattern;
1180
- accessibility?: "public" | "private" | "protected" | null;
1181
- decorators?: Decorator[] | null;
1182
- override?: boolean | null;
1183
- readonly?: boolean | null;
1184
- }
1185
- interface TSDeclareFunction extends BaseNode {
1186
- type: "TSDeclareFunction";
1187
- id?: Identifier | null;
1188
- typeParameters?: TSTypeParameterDeclaration | null;
1189
- params: FunctionParameter[];
1190
- returnType?: TSTypeAnnotation | null;
1191
- async: boolean;
1192
- declare?: boolean | null;
1193
- generator: boolean;
1194
- }
1195
- interface TSDeclareMethodComputed extends BaseNode {
1196
- type: "TSDeclareMethod";
1197
- typeParameters?: TSTypeParameterDeclaration | null;
1198
- params: (FunctionParameter | TSParameterProperty)[];
1199
- returnType?: TSTypeAnnotation | null;
1200
- abstract?: boolean | null;
1201
- access?: "public" | "private" | "protected" | null;
1202
- accessibility?: "public" | "private" | "protected" | null;
1203
- async: boolean;
1204
- generator: boolean;
1205
- kind: "get" | "set" | "method" | "constructor";
1206
- optional?: boolean | null;
1207
- override?: boolean | null;
1208
- static: boolean;
1209
- computed: true;
1210
- key: Expression;
1211
- }
1212
- interface TSDeclareMethodNonComputed extends BaseNode {
1213
- type: "TSDeclareMethod";
1214
- typeParameters?: TSTypeParameterDeclaration | null;
1215
- params: (FunctionParameter | TSParameterProperty)[];
1216
- returnType?: TSTypeAnnotation | null;
1217
- abstract?: boolean | null;
1218
- access?: "public" | "private" | "protected" | null;
1219
- accessibility?: "public" | "private" | "protected" | null;
1220
- async: boolean;
1221
- generator: boolean;
1222
- kind: "get" | "set" | "method" | "constructor";
1223
- optional?: boolean | null;
1224
- override?: boolean | null;
1225
- static: boolean;
1226
- computed: false;
1227
- key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
1228
- }
1229
- type TSDeclareMethod = TSDeclareMethodComputed | TSDeclareMethodNonComputed;
1230
- interface TSQualifiedName extends BaseNode {
1231
- type: "TSQualifiedName";
1232
- left: TSEntityName;
1233
- right: Identifier;
1234
- }
1235
- interface TSCallSignatureDeclaration extends BaseNode {
1236
- type: "TSCallSignatureDeclaration";
1237
- typeParameters?: TSTypeParameterDeclaration | null;
1238
- params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
1239
- returnType?: TSTypeAnnotation | null;
1240
- }
1241
- interface TSConstructSignatureDeclaration extends BaseNode {
1242
- type: "TSConstructSignatureDeclaration";
1243
- typeParameters?: TSTypeParameterDeclaration | null;
1244
- params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
1245
- returnType?: TSTypeAnnotation | null;
1246
- }
1247
- interface TSPropertySignature extends BaseNode {
1248
- type: "TSPropertySignature";
1249
- key: Expression;
1250
- typeAnnotation?: TSTypeAnnotation | null;
1251
- computed: boolean;
1252
- kind?: "get" | "set" | null;
1253
- optional?: boolean | null;
1254
- readonly?: boolean | null;
1255
- }
1256
- interface TSMethodSignature extends BaseNode {
1257
- type: "TSMethodSignature";
1258
- key: Expression;
1259
- typeParameters?: TSTypeParameterDeclaration | null;
1260
- params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
1261
- returnType?: TSTypeAnnotation | null;
1262
- computed: boolean;
1263
- kind: "method" | "get" | "set";
1264
- optional?: boolean | null;
1265
- }
1266
- interface TSIndexSignature extends BaseNode {
1267
- type: "TSIndexSignature";
1268
- parameters: Identifier[];
1269
- typeAnnotation?: TSTypeAnnotation | null;
1270
- readonly?: boolean | null;
1271
- static?: boolean | null;
1272
- }
1273
- interface TSAnyKeyword extends BaseNode {
1274
- type: "TSAnyKeyword";
1275
- }
1276
- interface TSBooleanKeyword extends BaseNode {
1277
- type: "TSBooleanKeyword";
1278
- }
1279
- interface TSBigIntKeyword extends BaseNode {
1280
- type: "TSBigIntKeyword";
1281
- }
1282
- interface TSIntrinsicKeyword extends BaseNode {
1283
- type: "TSIntrinsicKeyword";
1284
- }
1285
- interface TSNeverKeyword extends BaseNode {
1286
- type: "TSNeverKeyword";
1287
- }
1288
- interface TSNullKeyword extends BaseNode {
1289
- type: "TSNullKeyword";
1290
- }
1291
- interface TSNumberKeyword extends BaseNode {
1292
- type: "TSNumberKeyword";
1293
- }
1294
- interface TSObjectKeyword extends BaseNode {
1295
- type: "TSObjectKeyword";
1296
- }
1297
- interface TSStringKeyword extends BaseNode {
1298
- type: "TSStringKeyword";
1299
- }
1300
- interface TSSymbolKeyword extends BaseNode {
1301
- type: "TSSymbolKeyword";
1302
- }
1303
- interface TSUndefinedKeyword extends BaseNode {
1304
- type: "TSUndefinedKeyword";
1305
- }
1306
- interface TSUnknownKeyword extends BaseNode {
1307
- type: "TSUnknownKeyword";
1308
- }
1309
- interface TSVoidKeyword extends BaseNode {
1310
- type: "TSVoidKeyword";
1311
- }
1312
- interface TSThisType extends BaseNode {
1313
- type: "TSThisType";
1314
- }
1315
- interface TSFunctionType extends BaseNode {
1316
- type: "TSFunctionType";
1317
- typeParameters?: TSTypeParameterDeclaration | null;
1318
- params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
1319
- returnType?: TSTypeAnnotation | null;
1320
- }
1321
- interface TSConstructorType extends BaseNode {
1322
- type: "TSConstructorType";
1323
- typeParameters?: TSTypeParameterDeclaration | null;
1324
- params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
1325
- returnType?: TSTypeAnnotation | null;
1326
- abstract?: boolean | null;
1327
- }
1328
- interface TSTypeReference extends BaseNode {
1329
- type: "TSTypeReference";
1330
- typeName: TSEntityName;
1331
- typeArguments?: TSTypeParameterInstantiation | null;
1332
- }
1333
- interface TSTypePredicate extends BaseNode {
1334
- type: "TSTypePredicate";
1335
- parameterName: Identifier | TSThisType;
1336
- typeAnnotation?: TSTypeAnnotation | null;
1337
- asserts?: boolean | null;
1338
- }
1339
- interface TSTypeQuery extends BaseNode {
1340
- type: "TSTypeQuery";
1341
- exprName: TSEntityName | TSImportType;
1342
- typeArguments?: TSTypeParameterInstantiation | null;
1343
- }
1344
- interface TSTypeLiteral extends BaseNode {
1345
- type: "TSTypeLiteral";
1346
- members: TSTypeElement[];
1347
- }
1348
- interface TSArrayType extends BaseNode {
1349
- type: "TSArrayType";
1350
- elementType: TSType;
1351
- }
1352
- interface TSTupleType extends BaseNode {
1353
- type: "TSTupleType";
1354
- elementTypes: (TSType | TSNamedTupleMember)[];
1355
- }
1356
- interface TSOptionalType extends BaseNode {
1357
- type: "TSOptionalType";
1358
- typeAnnotation: TSType;
1359
- }
1360
- interface TSRestType extends BaseNode {
1361
- type: "TSRestType";
1362
- typeAnnotation: TSType;
1363
- }
1364
- interface TSNamedTupleMember extends BaseNode {
1365
- type: "TSNamedTupleMember";
1366
- label: Identifier;
1367
- elementType: TSType;
1368
- optional: boolean;
1369
- }
1370
- interface TSUnionType extends BaseNode {
1371
- type: "TSUnionType";
1372
- types: TSType[];
1373
- }
1374
- interface TSIntersectionType extends BaseNode {
1375
- type: "TSIntersectionType";
1376
- types: TSType[];
1377
- }
1378
- interface TSConditionalType extends BaseNode {
1379
- type: "TSConditionalType";
1380
- checkType: TSType;
1381
- extendsType: TSType;
1382
- trueType: TSType;
1383
- falseType: TSType;
1384
- }
1385
- interface TSInferType extends BaseNode {
1386
- type: "TSInferType";
1387
- typeParameter: TSTypeParameter;
1388
- }
1389
- interface TSParenthesizedType extends BaseNode {
1390
- type: "TSParenthesizedType";
1391
- typeAnnotation: TSType;
1392
- }
1393
- interface TSTypeOperator extends BaseNode {
1394
- type: "TSTypeOperator";
1395
- typeAnnotation: TSType;
1396
- operator: "keyof" | "readonly" | "unique";
1397
- }
1398
- interface TSIndexedAccessType extends BaseNode {
1399
- type: "TSIndexedAccessType";
1400
- objectType: TSType;
1401
- indexType: TSType;
1402
- }
1403
- interface TSMappedType extends BaseNode {
1404
- type: "TSMappedType";
1405
- key: Identifier;
1406
- constraint: TSType;
1407
- nameType?: TSType | null;
1408
- typeAnnotation?: TSType | null;
1409
- optional?: true | false | "+" | "-" | null;
1410
- readonly?: true | false | "+" | "-" | null;
1411
- }
1412
- interface TSTemplateLiteralType extends BaseNode {
1413
- type: "TSTemplateLiteralType";
1414
- quasis: TemplateElement[];
1415
- types: TSType[];
1416
- }
1417
- interface TSLiteralType extends BaseNode {
1418
- type: "TSLiteralType";
1419
- literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TemplateLiteral | UnaryExpression;
1420
- }
1421
- interface TSClassImplements extends BaseNode {
1422
- type: "TSClassImplements";
1423
- expression: Expression;
1424
- typeArguments?: TSTypeParameterInstantiation | null;
1425
- }
1426
- interface TSInterfaceHeritage extends BaseNode {
1427
- type: "TSInterfaceHeritage";
1428
- expression: Expression;
1429
- typeArguments?: TSTypeParameterInstantiation | null;
1430
- }
1431
- interface TSInterfaceDeclaration extends BaseNode {
1432
- type: "TSInterfaceDeclaration";
1433
- id: Identifier;
1434
- typeParameters?: TSTypeParameterDeclaration | null;
1435
- extends?: TSInterfaceHeritage[] | null;
1436
- body: TSInterfaceBody;
1437
- declare?: boolean | null;
1438
- }
1439
- interface TSInterfaceBody extends BaseNode {
1440
- type: "TSInterfaceBody";
1441
- body: TSTypeElement[];
1442
- }
1443
- interface TSTypeAliasDeclaration extends BaseNode {
1444
- type: "TSTypeAliasDeclaration";
1445
- id: Identifier;
1446
- typeParameters?: TSTypeParameterDeclaration | null;
1447
- typeAnnotation: TSType;
1448
- declare?: boolean | null;
1449
- }
1450
- interface TSInstantiationExpression extends BaseNode {
1451
- type: "TSInstantiationExpression";
1452
- expression: Expression;
1453
- typeArguments?: TSTypeParameterInstantiation | null;
1454
- }
1455
- interface TSAsExpression extends BaseNode {
1456
- type: "TSAsExpression";
1457
- expression: Expression;
1458
- typeAnnotation: TSType;
1459
- }
1460
- interface TSSatisfiesExpression extends BaseNode {
1461
- type: "TSSatisfiesExpression";
1462
- expression: Expression;
1463
- typeAnnotation: TSType;
1464
- }
1465
- interface TSTypeAssertion extends BaseNode {
1466
- type: "TSTypeAssertion";
1467
- typeAnnotation: TSType;
1468
- expression: Expression;
1469
- }
1470
- interface TSEnumBody extends BaseNode {
1471
- type: "TSEnumBody";
1472
- members: TSEnumMember[];
1473
- }
1474
- interface TSEnumDeclaration extends BaseNode {
1475
- type: "TSEnumDeclaration";
1476
- id: Identifier;
1477
- body: TSEnumBody;
1478
- const?: boolean | null;
1479
- declare?: boolean | null;
1480
- }
1481
- interface TSEnumMember extends BaseNode {
1482
- type: "TSEnumMember";
1483
- id: Identifier | StringLiteral;
1484
- initializer?: Expression | null;
1485
- }
1486
- interface TSModuleDeclaration extends BaseNode {
1487
- type: "TSModuleDeclaration";
1488
- id: TSEntityName | StringLiteral;
1489
- body: TSModuleBlock;
1490
- declare?: boolean | null;
1491
- kind: "global" | "namespace" | "module";
1492
- }
1493
- interface TSModuleBlock extends BaseNode {
1494
- type: "TSModuleBlock";
1495
- body: Statement[];
1496
- }
1497
- interface TSImportType extends BaseNode {
1498
- type: "TSImportType";
1499
- source: StringLiteral;
1500
- qualifier?: TSEntityName | null;
1501
- typeArguments?: TSTypeParameterInstantiation | null;
1502
- options?: ObjectExpression | null;
1503
- }
1504
- interface TSImportEqualsDeclaration extends BaseNode {
1505
- type: "TSImportEqualsDeclaration";
1506
- id: Identifier;
1507
- moduleReference: TSEntityName | TSExternalModuleReference;
1508
- importKind?: "type" | "value" | null;
1509
- }
1510
- interface TSExternalModuleReference extends BaseNode {
1511
- type: "TSExternalModuleReference";
1512
- expression: StringLiteral;
1513
- }
1514
- interface TSNonNullExpression extends BaseNode {
1515
- type: "TSNonNullExpression";
1516
- expression: Expression;
1517
- }
1518
- interface TSExportAssignment extends BaseNode {
1519
- type: "TSExportAssignment";
1520
- expression: Expression;
1521
- }
1522
- interface TSNamespaceExportDeclaration extends BaseNode {
1523
- type: "TSNamespaceExportDeclaration";
1524
- id: Identifier;
1525
- }
1526
- interface TSTypeAnnotation extends BaseNode {
1527
- type: "TSTypeAnnotation";
1528
- typeAnnotation: TSType;
1529
- }
1530
- interface TSTypeParameterInstantiation extends BaseNode {
1531
- type: "TSTypeParameterInstantiation";
1532
- params: TSType[];
1533
- }
1534
- interface TSTypeParameterDeclaration extends BaseNode {
1535
- type: "TSTypeParameterDeclaration";
1536
- params: TSTypeParameter[];
1537
- }
1538
- interface TSTypeParameter extends BaseNode {
1539
- type: "TSTypeParameter";
1540
- constraint?: TSType | null;
1541
- default?: TSType | null;
1542
- name: Identifier;
1543
- const?: boolean | null;
1544
- in?: boolean | null;
1545
- out?: boolean | null;
1546
- }
1547
- type Expression = ArrayExpression | AssignmentExpression | BinaryExpression | CallExpression | ConditionalExpression | FunctionExpression | Identifier | StringLiteral | NumericLiteral | NullLiteral | BooleanLiteral | RegExpLiteral | LogicalExpression | MemberExpression | NewExpression | ObjectExpression | SequenceExpression | ParenthesizedExpression | ThisExpression | UnaryExpression | UpdateExpression | ArrowFunctionExpression | ClassExpression | MetaProperty | TaggedTemplateExpression | TemplateLiteral | YieldExpression | AwaitExpression | ImportExpression | BigIntLiteral | OptionalMemberExpression | OptionalCallExpression | TypeCastExpression | JSXElement | JSXFragment | BindExpression | DoExpression | ModuleExpression | TopicReference | TSInstantiationExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
1548
- type Statement = BlockStatement | BreakStatement | ContinueStatement | DebuggerStatement | DoWhileStatement | EmptyStatement | ExpressionStatement | ForInStatement | ForStatement | FunctionDeclaration | IfStatement | LabeledStatement | ReturnStatement | SwitchStatement | ThrowStatement | TryStatement | VariableDeclaration | WhileStatement | WithStatement | ClassDeclaration | ExportAllDeclaration | ExportDefaultDeclaration | ExportNamedDeclaration | ForOfStatement | ImportDeclaration | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | EnumDeclaration | TSDeclareFunction | TSInterfaceDeclaration | TSTypeAliasDeclaration | TSEnumDeclaration | TSModuleDeclaration | TSImportEqualsDeclaration | TSExportAssignment | TSNamespaceExportDeclaration;
1549
- type FunctionParameter = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern;
1550
- type PatternLike = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
1551
- type TSEntityName = Identifier | ThisExpression | TSQualifiedName;
1552
- type Flow = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ClassImplements | DeclareClass | DeclareFunction | DeclareInterface | DeclareModule | DeclareModuleExports | DeclareTypeAlias | DeclareOpaqueType | DeclareVariable | DeclareExportDeclaration | DeclareExportAllDeclaration | DeclaredPredicate | ExistsTypeAnnotation | FunctionTypeAnnotation | FunctionTypeParam | GenericTypeAnnotation | InferredPredicate | InterfaceExtends | InterfaceDeclaration | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | BigIntLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | ObjectTypeInternalSlot | ObjectTypeCallProperty | ObjectTypeIndexer | ObjectTypeProperty | ObjectTypeSpreadProperty | OpaqueType | QualifiedTypeIdentifier | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | TypeAlias | TypeAnnotation | TypeCastExpression | TypeParameter | TypeParameterDeclaration | TypeParameterInstantiation | UnionTypeAnnotation | Variance | VoidTypeAnnotation | EnumDeclaration | EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody | EnumBooleanMember | EnumNumberMember | EnumStringMember | EnumDefaultedMember | IndexedAccessType | OptionalIndexedAccessType;
1553
- type FlowType = AnyTypeAnnotation | ArrayTypeAnnotation | BooleanTypeAnnotation | BooleanLiteralTypeAnnotation | NullLiteralTypeAnnotation | ExistsTypeAnnotation | FunctionTypeAnnotation | GenericTypeAnnotation | InterfaceTypeAnnotation | IntersectionTypeAnnotation | MixedTypeAnnotation | EmptyTypeAnnotation | NullableTypeAnnotation | NumberLiteralTypeAnnotation | BigIntLiteralTypeAnnotation | NumberTypeAnnotation | ObjectTypeAnnotation | StringLiteralTypeAnnotation | StringTypeAnnotation | SymbolTypeAnnotation | ThisTypeAnnotation | TupleTypeAnnotation | TypeofTypeAnnotation | UnionTypeAnnotation | VoidTypeAnnotation | IndexedAccessType | OptionalIndexedAccessType;
1554
- type FlowPredicate = DeclaredPredicate | InferredPredicate;
1555
- type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
1556
- type TSType = TSAnyKeyword | TSBooleanKeyword | TSBigIntKeyword | TSIntrinsicKeyword | TSNeverKeyword | TSNullKeyword | TSNumberKeyword | TSObjectKeyword | TSStringKeyword | TSSymbolKeyword | TSUndefinedKeyword | TSUnknownKeyword | TSVoidKeyword | TSThisType | TSFunctionType | TSConstructorType | TSTypeReference | TSTypePredicate | TSTypeQuery | TSTypeLiteral | TSArrayType | TSTupleType | TSOptionalType | TSRestType | TSNamedTupleMember | TSUnionType | TSIntersectionType | TSConditionalType | TSInferType | TSParenthesizedType | TSTypeOperator | TSIndexedAccessType | TSMappedType | TSTemplateLiteralType | TSLiteralType | TSClassImplements | TSInterfaceHeritage | TSImportType;
1557
- //#endregion
1558
- //#region src/types/index.d.ts
1559
- interface Module {
1560
- exports: {
1561
- default?: React.ComponentType<Record<string, unknown>>;
1562
- };
1563
- error?: string;
1564
- }
1565
- interface Section {
1566
- id: string;
1567
- name: string;
1568
- code: string;
1569
- }
1570
- //#endregion
1571
- //#region src/utils/ast/document.d.ts
1572
- interface DocumentOptions {
1573
- containerId?: string;
1574
- }
1575
- interface SectionOptions extends DocumentOptions {
1576
- sectionNameFallback?: (index: number) => string;
1577
- }
1578
- type DocumentProblem = {
1579
- reason: 'parse-error';
1580
- error: unknown;
1581
- } | {
1582
- reason: 'container-not-found';
1583
- containerId: string;
1584
- };
1585
- type DocumentInspection = {
1586
- ok: true;
1587
- doc: DocumentTree;
1588
- } | ({
1589
- ok: false;
1590
- } & DocumentProblem);
1591
- interface DocumentTree {
1592
- code: string;
1593
- ast: File;
1594
- container: JSXElement;
1595
- }
1596
- declare const inspectDocument: (code: string, { containerId }?: DocumentOptions) => DocumentInspection;
1597
- declare const parseDocument: (code: string, options?: DocumentOptions) => DocumentTree | undefined;
1598
- declare const clearDocumentParseCache: () => void;
1599
- declare const getSections: (doc: DocumentTree, { sectionNameFallback }?: SectionOptions) => Section[];
1600
- declare const fillSectionIds: (code: string, generateId?: () => string, options?: DocumentOptions) => string;
1601
- declare const generateDocumentCode: (doc: DocumentTree) => string;
1602
- declare const replaceDocumentSections: (fullCode: string, sectionCodes: string[], options?: DocumentOptions) => string;
1603
- declare const generateSectionPreview: (fullCode: string, sectionCode: string, options?: DocumentOptions) => string;
1604
- declare const generateSectionPreviews: (fullCode: string, sectionCodes: string[], options?: DocumentOptions) => string[];
1605
- interface SectionPreviewCache {
1606
- compute: (fullCode: string, sections: {
1607
- id: string;
1608
- code: string;
1609
- }[], options?: DocumentOptions) => string[];
1610
- }
1611
- declare const createSectionPreviewCache: () => SectionPreviewCache;
1612
- //#endregion
1613
- export { ObjectExpression as C, Node as S, Module as _, SectionOptions as a, Expression as b, createSectionPreviewCache as c, generateSectionPreview as d, generateSectionPreviews as f, replaceDocumentSections as g, parseDocument as h, DocumentTree as i, fillSectionIds as l, inspectDocument as m, DocumentOptions as n, SectionPreviewCache as o, getSections as p, DocumentProblem as r, clearDocumentParseCache as s, DocumentInspection as t, generateDocumentCode as u, Section as v, File as x, ArrayExpression as y };
1614
- //# sourceMappingURL=document-DqRSCtsx.d.ts.map