@tslite/core 0.1.0 → 0.3.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.
- package/dist/builders.cjs +1 -0
- package/dist/builders.d.cts +1 -0
- package/dist/builders.d.ts +1 -0
- package/dist/builders.js +1 -0
- package/dist/chunk-JQLO5K6J.js +1 -0
- package/dist/index-CcVx_Zur.d.cts +918 -0
- package/dist/index-CcVx_Zur.d.ts +918 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +33 -841
- package/dist/index.d.ts +33 -841
- package/dist/index.js +1 -1
- package/package.json +6 -1
package/dist/index.d.ts
CHANGED
|
@@ -1,698 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
ArrayExpression: ArrayExpression;
|
|
4
|
-
ArrowFunctionExpression: ArrowFunctionExpression;
|
|
5
|
-
AssignmentExpression: AssignmentExpression;
|
|
6
|
-
AwaitExpression: AwaitExpression;
|
|
7
|
-
BinaryExpression: BinaryExpression;
|
|
8
|
-
CallExpression: CallExpression;
|
|
9
|
-
ChainExpression: ChainExpression;
|
|
10
|
-
ConditionalExpression: ConditionalExpression;
|
|
11
|
-
FunctionExpression: FunctionExpression;
|
|
12
|
-
Identifier: Identifier;
|
|
13
|
-
JsonExpression: JsonExpression;
|
|
14
|
-
ImportExpression: ImportExpression;
|
|
15
|
-
Literal: Literal;
|
|
16
|
-
LogicalExpression: LogicalExpression;
|
|
17
|
-
MemberExpression: MemberExpression;
|
|
18
|
-
MetaProperty: MetaProperty;
|
|
19
|
-
NewExpression: NewExpression;
|
|
20
|
-
ObjectExpression: ObjectExpression;
|
|
21
|
-
SequenceExpression: SequenceExpression;
|
|
22
|
-
TaggedTemplateExpression: TaggedTemplateExpression;
|
|
23
|
-
TemplateLiteral: TemplateLiteral;
|
|
24
|
-
ThisExpression: ThisExpression;
|
|
25
|
-
UnaryExpression: UnaryExpression;
|
|
26
|
-
UpdateExpression: UpdateExpression;
|
|
27
|
-
}
|
|
28
|
-
interface NodeMap {
|
|
29
|
-
AssignmentProperty: AssignmentProperty;
|
|
30
|
-
CatchClause: CatchClause;
|
|
31
|
-
Expression: Expression;
|
|
32
|
-
Function: Function;
|
|
33
|
-
Identifier: Identifier;
|
|
34
|
-
Literal: Literal;
|
|
35
|
-
MethodDefinition: MethodDefinition;
|
|
36
|
-
Pattern: Pattern;
|
|
37
|
-
Program: Program;
|
|
38
|
-
Property: Property;
|
|
39
|
-
PropertyDefinition: PropertyDefinition;
|
|
40
|
-
SpreadElement: SpreadElement;
|
|
41
|
-
Statement: Statement;
|
|
42
|
-
SwitchCase: SwitchCase;
|
|
43
|
-
TemplateElement: TemplateElement;
|
|
44
|
-
VariableDeclarator: VariableDeclarator;
|
|
45
|
-
ImportDeclaration: ImportDeclaration;
|
|
46
|
-
ImportSpecifier: ImportSpecifier;
|
|
47
|
-
ImportDefaultSpecifier: ImportDefaultSpecifier;
|
|
48
|
-
ImportNamespaceSpecifier: ImportNamespaceSpecifier;
|
|
49
|
-
}
|
|
50
|
-
type Expression = ExpressionMap[keyof ExpressionMap];
|
|
51
|
-
type Statement = ExpressionStatement | BlockStatement | EmptyStatement | DebuggerStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration;
|
|
52
|
-
type CallExpression = SimpleCallExpression | NewExpression;
|
|
53
|
-
type ChainElement = SimpleCallExpression | MemberExpression;
|
|
54
|
-
type Declaration = FunctionDeclaration | VariableDeclaration;
|
|
55
|
-
type Function = ArrowFunctionExpression | FunctionDeclaration | FunctionExpression;
|
|
56
|
-
/**
|
|
57
|
-
* TSLite — a forma serializada da linguagem TSLite.
|
|
58
|
-
*
|
|
59
|
-
* JSON puro (dados estáticos) entremeado de ilhas executáveis marcadas com
|
|
60
|
-
* `#ast`, cujo valor é o tipo do nó ESTree. É portável, serializável e
|
|
61
|
-
* diffável: `encode()` produz, `decode()` consome, `printJson()` emite.
|
|
62
|
-
*/
|
|
63
|
-
type TSLite = string | number | boolean | null | TSLite[] | TSLiteMarker | {
|
|
64
|
-
[key: string]: TSLite;
|
|
65
|
-
};
|
|
66
|
-
/** Ilha executável dentro do TSLite (o valor de `#ast` é o tipo do nó). */
|
|
67
|
-
interface TSLiteMarker {
|
|
68
|
-
"#ast": string;
|
|
69
|
-
[prop: string]: unknown;
|
|
70
|
-
}
|
|
71
|
-
/**
|
|
72
|
-
* SimpleNode — a forma de árvore simplificada produzida por `encode()`: um nó
|
|
73
|
-
* ESTree com os campos falsy omitidos e cada `ObjectExpression` colapsado em
|
|
74
|
-
* `JsonExpression` (cujo `body` é {@link TSLite}). Os tipos `Simple*` descrevem
|
|
75
|
-
* cada variante; este é o agregador.
|
|
76
|
-
*/
|
|
77
|
-
type SimpleNode = {
|
|
78
|
-
type: string;
|
|
79
|
-
[key: string]: any;
|
|
80
|
-
};
|
|
81
|
-
type Literal = SimpleLiteral | RegExpLiteral | BigIntLiteral;
|
|
82
|
-
type Pattern = ArrayPattern | AssignmentPattern | Identifier | JsonExpression | MemberExpression | ObjectPattern | RestElement;
|
|
83
|
-
type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=" | "||=" | "&&=" | "??=";
|
|
84
|
-
type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "in" | "instanceof";
|
|
85
|
-
type LogicalOperator = "||" | "&&" | "??";
|
|
86
|
-
type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
|
87
|
-
type UpdateOperator = "++" | "--";
|
|
88
|
-
interface ArrayExpression extends BaseExpression {
|
|
89
|
-
type: "ArrayExpression";
|
|
90
|
-
elements: Array<Expression | SpreadElement | null>;
|
|
91
|
-
}
|
|
92
|
-
interface ArrayPattern extends BasePattern {
|
|
93
|
-
type: "ArrayPattern";
|
|
94
|
-
elements: Array<Pattern | null>;
|
|
95
|
-
}
|
|
96
|
-
interface ArrowFunctionExpression extends BaseExpression, BaseFunction {
|
|
97
|
-
type: "ArrowFunctionExpression";
|
|
98
|
-
expression: boolean;
|
|
99
|
-
body: BlockStatement | Expression;
|
|
100
|
-
}
|
|
101
|
-
interface AssignmentExpression extends BaseExpression {
|
|
102
|
-
type: "AssignmentExpression";
|
|
103
|
-
operator: AssignmentOperator;
|
|
104
|
-
left: Pattern | MemberExpression;
|
|
105
|
-
right: Expression;
|
|
106
|
-
}
|
|
107
|
-
interface AssignmentPattern extends BasePattern {
|
|
108
|
-
type: "AssignmentPattern";
|
|
109
|
-
left: Pattern;
|
|
110
|
-
right: Expression;
|
|
111
|
-
}
|
|
112
|
-
interface AssignmentProperty extends Property {
|
|
113
|
-
value: Pattern;
|
|
114
|
-
kind: "init";
|
|
115
|
-
method: boolean;
|
|
116
|
-
}
|
|
117
|
-
interface AwaitExpression extends BaseExpression {
|
|
118
|
-
type: "AwaitExpression";
|
|
119
|
-
argument: Expression;
|
|
120
|
-
}
|
|
121
|
-
interface BaseCallExpression extends BaseExpression {
|
|
122
|
-
callee: Expression;
|
|
123
|
-
arguments: Array<Expression | SpreadElement>;
|
|
124
|
-
}
|
|
125
|
-
interface BaseDeclaration extends BaseStatement {
|
|
126
|
-
}
|
|
127
|
-
interface BaseExpression extends BaseNode {
|
|
128
|
-
}
|
|
129
|
-
interface BaseForXStatement extends BaseStatement {
|
|
130
|
-
left: VariableDeclaration | Pattern;
|
|
131
|
-
right: Expression;
|
|
132
|
-
body: Statement;
|
|
133
|
-
}
|
|
134
|
-
interface BaseFunction extends BaseNode {
|
|
135
|
-
params: Pattern[];
|
|
136
|
-
generator?: boolean | undefined;
|
|
137
|
-
async?: boolean | undefined;
|
|
138
|
-
body: BlockStatement | Expression;
|
|
139
|
-
}
|
|
140
|
-
interface BaseNode extends BaseNodeWithoutComments {
|
|
141
|
-
leadingComments?: Comment[] | undefined;
|
|
142
|
-
trailingComments?: Comment[] | undefined;
|
|
143
|
-
}
|
|
144
|
-
interface BaseNodeWithoutComments {
|
|
145
|
-
type: string;
|
|
146
|
-
loc?: SourceLocation | null | undefined;
|
|
147
|
-
range?: [number, number] | undefined;
|
|
148
|
-
}
|
|
149
|
-
interface BasePattern extends BaseNode {
|
|
150
|
-
}
|
|
151
|
-
interface BaseStatement extends BaseNode {
|
|
152
|
-
}
|
|
153
|
-
interface BigIntLiteral extends BaseNode, BaseExpression {
|
|
154
|
-
type: "Literal";
|
|
155
|
-
value?: bigint | null | undefined;
|
|
156
|
-
bigint: string;
|
|
157
|
-
raw?: string | undefined;
|
|
158
|
-
}
|
|
159
|
-
interface BinaryExpression extends BaseExpression {
|
|
160
|
-
type: "BinaryExpression";
|
|
161
|
-
operator: BinaryOperator;
|
|
162
|
-
left: Expression;
|
|
163
|
-
right: Expression;
|
|
164
|
-
}
|
|
165
|
-
interface BlockStatement extends BaseStatement {
|
|
166
|
-
type: "BlockStatement";
|
|
167
|
-
body: Statement[];
|
|
168
|
-
innerComments?: Comment[] | undefined;
|
|
169
|
-
}
|
|
170
|
-
interface BreakStatement extends BaseStatement {
|
|
171
|
-
type: "BreakStatement";
|
|
172
|
-
label?: Identifier | null | undefined;
|
|
173
|
-
}
|
|
174
|
-
interface CatchClause extends BaseNode {
|
|
175
|
-
type: "CatchClause";
|
|
176
|
-
param: Pattern | null;
|
|
177
|
-
body: BlockStatement;
|
|
178
|
-
}
|
|
179
|
-
interface ChainExpression extends BaseExpression {
|
|
180
|
-
type: "ChainExpression";
|
|
181
|
-
expression: ChainElement;
|
|
182
|
-
}
|
|
183
|
-
interface Comment extends BaseNodeWithoutComments {
|
|
184
|
-
type: "Line" | "Block";
|
|
185
|
-
value: string;
|
|
186
|
-
}
|
|
187
|
-
interface ConditionalExpression extends BaseExpression {
|
|
188
|
-
type: "ConditionalExpression";
|
|
189
|
-
test: Expression;
|
|
190
|
-
alternate: Expression;
|
|
191
|
-
consequent: Expression;
|
|
192
|
-
}
|
|
193
|
-
interface ContinueStatement extends BaseStatement {
|
|
194
|
-
type: "ContinueStatement";
|
|
195
|
-
label?: Identifier | null | undefined;
|
|
196
|
-
}
|
|
197
|
-
interface DebuggerStatement extends BaseStatement {
|
|
198
|
-
type: "DebuggerStatement";
|
|
199
|
-
}
|
|
200
|
-
interface Directive extends BaseNode {
|
|
201
|
-
type: "ExpressionStatement";
|
|
202
|
-
expression: Literal;
|
|
203
|
-
directive: string;
|
|
204
|
-
}
|
|
205
|
-
interface DoWhileStatement extends BaseStatement {
|
|
206
|
-
type: "DoWhileStatement";
|
|
207
|
-
body: Statement;
|
|
208
|
-
test: Expression;
|
|
209
|
-
}
|
|
210
|
-
interface EmptyStatement extends BaseStatement {
|
|
211
|
-
type: "EmptyStatement";
|
|
212
|
-
}
|
|
213
|
-
interface ExpressionStatement extends BaseStatement {
|
|
214
|
-
type: "ExpressionStatement";
|
|
215
|
-
expression: Expression;
|
|
216
|
-
}
|
|
217
|
-
interface ForInStatement extends BaseForXStatement {
|
|
218
|
-
type: "ForInStatement";
|
|
219
|
-
}
|
|
220
|
-
interface ForOfStatement extends BaseForXStatement {
|
|
221
|
-
type: "ForOfStatement";
|
|
222
|
-
await: boolean;
|
|
223
|
-
}
|
|
224
|
-
interface ForStatement extends BaseStatement {
|
|
225
|
-
type: "ForStatement";
|
|
226
|
-
init?: VariableDeclaration | Expression | null | undefined;
|
|
227
|
-
test?: Expression | null | undefined;
|
|
228
|
-
update?: Expression | null | undefined;
|
|
229
|
-
body: Statement;
|
|
230
|
-
}
|
|
231
|
-
interface FunctionDeclaration extends MaybeNamedFunctionDeclaration {
|
|
232
|
-
id: Identifier;
|
|
233
|
-
}
|
|
234
|
-
interface FunctionExpression extends BaseFunction, BaseExpression {
|
|
235
|
-
id?: Identifier | null | undefined;
|
|
236
|
-
type: "FunctionExpression";
|
|
237
|
-
body: BlockStatement;
|
|
238
|
-
}
|
|
239
|
-
interface Identifier extends BaseNode, BaseExpression, BasePattern {
|
|
240
|
-
type: "Identifier";
|
|
241
|
-
name: string;
|
|
242
|
-
}
|
|
243
|
-
interface IfStatement extends BaseStatement {
|
|
244
|
-
type: "IfStatement";
|
|
245
|
-
test: Expression;
|
|
246
|
-
consequent: Statement;
|
|
247
|
-
alternate?: Statement | null | undefined;
|
|
248
|
-
}
|
|
249
|
-
interface JsonExpression extends BaseNode, BaseExpression, BasePattern {
|
|
250
|
-
type: "JsonExpression";
|
|
251
|
-
body: TSLite;
|
|
252
|
-
}
|
|
253
|
-
interface LabeledStatement extends BaseStatement {
|
|
254
|
-
type: "LabeledStatement";
|
|
255
|
-
label: Identifier;
|
|
256
|
-
body: Statement;
|
|
257
|
-
}
|
|
258
|
-
interface LogicalExpression extends BaseExpression {
|
|
259
|
-
type: "LogicalExpression";
|
|
260
|
-
operator: LogicalOperator;
|
|
261
|
-
left: Expression;
|
|
262
|
-
right: Expression;
|
|
263
|
-
}
|
|
264
|
-
interface MaybeNamedFunctionDeclaration extends BaseFunction, BaseDeclaration {
|
|
265
|
-
type: "FunctionDeclaration";
|
|
266
|
-
id: Identifier | null;
|
|
267
|
-
body: BlockStatement;
|
|
268
|
-
}
|
|
269
|
-
interface MemberExpression extends BaseExpression, BasePattern {
|
|
270
|
-
type: "MemberExpression";
|
|
271
|
-
object: Expression;
|
|
272
|
-
property: Expression;
|
|
273
|
-
computed?: boolean;
|
|
274
|
-
optional?: boolean;
|
|
275
|
-
}
|
|
276
|
-
interface MetaProperty extends BaseExpression {
|
|
277
|
-
type: "MetaProperty";
|
|
278
|
-
meta: Identifier;
|
|
279
|
-
property: Identifier;
|
|
280
|
-
}
|
|
281
|
-
type ModuleDeclaration = ImportDeclaration;
|
|
282
|
-
interface BaseModuleDeclaration extends BaseNode {
|
|
283
|
-
}
|
|
284
|
-
type ModuleSpecifier = ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
|
|
285
|
-
interface BaseModuleSpecifier extends BaseNode {
|
|
286
|
-
local: Identifier;
|
|
287
|
-
}
|
|
288
|
-
interface MethodDefinition extends BaseNode {
|
|
289
|
-
type: "MethodDefinition";
|
|
290
|
-
key: Expression;
|
|
291
|
-
value: FunctionExpression;
|
|
292
|
-
kind: "constructor" | "method" | "get" | "set";
|
|
293
|
-
computed?: boolean;
|
|
294
|
-
static: boolean;
|
|
295
|
-
}
|
|
296
|
-
interface NewExpression extends BaseCallExpression {
|
|
297
|
-
type: "NewExpression";
|
|
298
|
-
}
|
|
299
|
-
interface ObjectExpression extends BaseExpression {
|
|
300
|
-
type: "ObjectExpression";
|
|
301
|
-
properties: Array<Property | SpreadElement>;
|
|
302
|
-
}
|
|
303
|
-
interface ObjectPattern extends BasePattern {
|
|
304
|
-
type: "ObjectPattern";
|
|
305
|
-
properties: Array<AssignmentProperty | RestElement>;
|
|
306
|
-
}
|
|
307
|
-
interface Position {
|
|
308
|
-
line: number;
|
|
309
|
-
column: number;
|
|
310
|
-
}
|
|
311
|
-
interface Program extends BaseNode {
|
|
312
|
-
type: "Program";
|
|
313
|
-
sourceType: "script" | "module";
|
|
314
|
-
body: Array<Directive | Statement | ModuleDeclaration>;
|
|
315
|
-
comments?: Comment[] | undefined;
|
|
316
|
-
}
|
|
317
|
-
interface Property extends BaseNode {
|
|
318
|
-
type: "Property";
|
|
319
|
-
key: Expression;
|
|
320
|
-
value: Expression | Pattern | AssignmentProperty;
|
|
321
|
-
kind: "init" | "get" | "set";
|
|
322
|
-
method?: boolean;
|
|
323
|
-
shorthand?: boolean;
|
|
324
|
-
computed?: boolean;
|
|
325
|
-
}
|
|
326
|
-
interface PropertyDefinition extends BaseNode {
|
|
327
|
-
type: "PropertyDefinition";
|
|
328
|
-
key: Expression;
|
|
329
|
-
value?: Expression | null | undefined;
|
|
330
|
-
computed?: boolean;
|
|
331
|
-
static: boolean;
|
|
332
|
-
}
|
|
333
|
-
interface RegExpLiteral extends BaseNode, BaseExpression {
|
|
334
|
-
type: "Literal";
|
|
335
|
-
value?: RegExp | null | undefined;
|
|
336
|
-
regex: {
|
|
337
|
-
pattern: string;
|
|
338
|
-
flags: string;
|
|
339
|
-
};
|
|
340
|
-
raw?: string | undefined;
|
|
341
|
-
}
|
|
342
|
-
interface RestElement extends BasePattern {
|
|
343
|
-
type: "RestElement";
|
|
344
|
-
argument: Pattern;
|
|
345
|
-
}
|
|
346
|
-
interface ReturnStatement extends BaseStatement {
|
|
347
|
-
type: "ReturnStatement";
|
|
348
|
-
argument?: Expression | null | undefined;
|
|
349
|
-
}
|
|
350
|
-
interface SequenceExpression extends BaseExpression {
|
|
351
|
-
type: "SequenceExpression";
|
|
352
|
-
expressions: Expression[];
|
|
353
|
-
}
|
|
354
|
-
interface SimpleCallExpression extends BaseCallExpression {
|
|
355
|
-
type: "CallExpression";
|
|
356
|
-
optional?: boolean;
|
|
357
|
-
}
|
|
358
|
-
interface SimpleLiteral extends BaseNode, BaseExpression {
|
|
359
|
-
type: "Literal";
|
|
360
|
-
value: string | boolean | number | null;
|
|
361
|
-
raw?: string | undefined;
|
|
362
|
-
}
|
|
363
|
-
interface SourceLocation {
|
|
364
|
-
source?: string | null | undefined;
|
|
365
|
-
start: Position;
|
|
366
|
-
end: Position;
|
|
367
|
-
}
|
|
368
|
-
interface SpreadElement extends BaseNode {
|
|
369
|
-
type: "SpreadElement";
|
|
370
|
-
argument: Expression;
|
|
371
|
-
}
|
|
372
|
-
interface SwitchCase extends BaseNode {
|
|
373
|
-
type: "SwitchCase";
|
|
374
|
-
test?: Expression | null | undefined;
|
|
375
|
-
consequent: Statement[];
|
|
376
|
-
}
|
|
377
|
-
interface SwitchStatement extends BaseStatement {
|
|
378
|
-
type: "SwitchStatement";
|
|
379
|
-
discriminant: Expression;
|
|
380
|
-
cases: SwitchCase[];
|
|
381
|
-
}
|
|
382
|
-
interface TaggedTemplateExpression extends BaseExpression {
|
|
383
|
-
type: "TaggedTemplateExpression";
|
|
384
|
-
tag: Expression;
|
|
385
|
-
quasi: TemplateLiteral;
|
|
386
|
-
}
|
|
387
|
-
interface TemplateElement extends BaseNode {
|
|
388
|
-
type: "TemplateElement";
|
|
389
|
-
tail: boolean;
|
|
390
|
-
value: {
|
|
391
|
-
cooked?: string | null | undefined;
|
|
392
|
-
raw: string;
|
|
393
|
-
};
|
|
394
|
-
}
|
|
395
|
-
interface TemplateLiteral extends BaseExpression {
|
|
396
|
-
type: "TemplateLiteral";
|
|
397
|
-
quasis: TemplateElement[];
|
|
398
|
-
expressions: Expression[];
|
|
399
|
-
}
|
|
400
|
-
interface ThisExpression extends BaseExpression {
|
|
401
|
-
type: "ThisExpression";
|
|
402
|
-
}
|
|
403
|
-
interface ThrowStatement extends BaseStatement {
|
|
404
|
-
type: "ThrowStatement";
|
|
405
|
-
argument: Expression;
|
|
406
|
-
}
|
|
407
|
-
interface TryStatement extends BaseStatement {
|
|
408
|
-
type: "TryStatement";
|
|
409
|
-
block: BlockStatement;
|
|
410
|
-
handler?: CatchClause | null | undefined;
|
|
411
|
-
finalizer?: BlockStatement | null | undefined;
|
|
412
|
-
}
|
|
413
|
-
interface UnaryExpression extends BaseExpression {
|
|
414
|
-
type: "UnaryExpression";
|
|
415
|
-
operator: UnaryOperator;
|
|
416
|
-
prefix: true;
|
|
417
|
-
argument: Expression;
|
|
418
|
-
}
|
|
419
|
-
interface UpdateExpression extends BaseExpression {
|
|
420
|
-
type: "UpdateExpression";
|
|
421
|
-
operator: UpdateOperator;
|
|
422
|
-
argument: Expression;
|
|
423
|
-
prefix: boolean;
|
|
424
|
-
}
|
|
425
|
-
interface VariableDeclaration extends BaseDeclaration {
|
|
426
|
-
type: "VariableDeclaration";
|
|
427
|
-
declarations: VariableDeclarator[];
|
|
428
|
-
kind: "var" | "let" | "const";
|
|
429
|
-
}
|
|
430
|
-
interface VariableDeclarator extends BaseNode {
|
|
431
|
-
type: "VariableDeclarator";
|
|
432
|
-
id: Pattern;
|
|
433
|
-
init?: Expression | null | undefined;
|
|
434
|
-
}
|
|
435
|
-
interface WhileStatement extends BaseStatement {
|
|
436
|
-
type: "WhileStatement";
|
|
437
|
-
test: Expression;
|
|
438
|
-
body: Statement;
|
|
439
|
-
}
|
|
440
|
-
interface ImportDeclaration extends BaseModuleDeclaration {
|
|
441
|
-
type: "ImportDeclaration";
|
|
442
|
-
specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>;
|
|
443
|
-
source: Literal;
|
|
444
|
-
}
|
|
445
|
-
interface ImportSpecifier extends BaseModuleSpecifier {
|
|
446
|
-
type: "ImportSpecifier";
|
|
447
|
-
imported: Identifier;
|
|
448
|
-
}
|
|
449
|
-
interface ImportExpression extends BaseExpression {
|
|
450
|
-
type: "ImportExpression";
|
|
451
|
-
source: Expression;
|
|
452
|
-
}
|
|
453
|
-
interface ImportDefaultSpecifier extends BaseModuleSpecifier {
|
|
454
|
-
type: "ImportDefaultSpecifier";
|
|
455
|
-
}
|
|
456
|
-
interface ImportNamespaceSpecifier extends BaseModuleSpecifier {
|
|
457
|
-
type: "ImportNamespaceSpecifier";
|
|
458
|
-
}
|
|
459
|
-
type SimpleArrayExpression = Partial<ArrayExpression>;
|
|
460
|
-
type SimpleArrayPattern = Partial<ArrayPattern>;
|
|
461
|
-
type SimpleArrowFunctionExpression = Partial<ArrowFunctionExpression>;
|
|
462
|
-
type SimpleAssignmentExpression = Partial<AssignmentExpression>;
|
|
463
|
-
type SimpleAssignmentPattern = Partial<AssignmentPattern>;
|
|
464
|
-
type SimpleAssignmentProperty = Partial<AssignmentProperty>;
|
|
465
|
-
type SimpleAwaitExpression = Partial<AwaitExpression>;
|
|
466
|
-
type SimpleBaseCallExpression = Partial<BaseCallExpression>;
|
|
467
|
-
type SimpleBaseDeclaration = Partial<BaseDeclaration>;
|
|
468
|
-
type SimpleBaseExpression = Partial<BaseExpression>;
|
|
469
|
-
type SimpleBaseForXStatement = Partial<BaseForXStatement>;
|
|
470
|
-
type SimpleBaseFunction = Partial<BaseFunction>;
|
|
471
|
-
type SimpleBaseNode = Partial<BaseNode>;
|
|
472
|
-
type SimpleBaseNodeWithoutComments = Partial<BaseNodeWithoutComments>;
|
|
473
|
-
type SimpleBasePattern = Partial<BasePattern>;
|
|
474
|
-
type SimpleBaseStatement = Partial<BaseStatement>;
|
|
475
|
-
type SimpleBigIntLiteral = Partial<BigIntLiteral>;
|
|
476
|
-
type SimpleBinaryExpression = Partial<BinaryExpression>;
|
|
477
|
-
type SimpleBlockStatement = Partial<BlockStatement>;
|
|
478
|
-
type SimpleBreakStatement = Partial<BreakStatement>;
|
|
479
|
-
type SimpleCatchClause = Partial<CatchClause>;
|
|
480
|
-
type SimpleChainExpression = Partial<ChainExpression>;
|
|
481
|
-
type SimpleComment = Partial<Comment>;
|
|
482
|
-
type SimpleConditionalExpression = Partial<ConditionalExpression>;
|
|
483
|
-
type SimpleContinueStatement = Partial<ContinueStatement>;
|
|
484
|
-
type SimpleDoWhileStatement = Partial<DoWhileStatement>;
|
|
485
|
-
type SimpleEmptyStatement = Partial<EmptyStatement>;
|
|
486
|
-
type SimpleExpressionStatement = Partial<ExpressionStatement>;
|
|
487
|
-
type SimpleForInStatement = Partial<ForInStatement>;
|
|
488
|
-
type SimpleForOfStatement = Partial<ForOfStatement>;
|
|
489
|
-
type SimpleForStatement = Partial<ForStatement>;
|
|
490
|
-
type SimpleFunctionDeclaration = Partial<FunctionDeclaration>;
|
|
491
|
-
type SimpleFunctionExpression = Partial<FunctionExpression>;
|
|
492
|
-
type SimpleIdentifier = Partial<Identifier>;
|
|
493
|
-
type SimpleIfStatement = Partial<IfStatement>;
|
|
494
|
-
type SimpleJsonExpression = Partial<JsonExpression>;
|
|
495
|
-
type SimpleLabeledStatement = Partial<LabeledStatement>;
|
|
496
|
-
type SimpleLogicalExpression = Partial<LogicalExpression>;
|
|
497
|
-
type SimpleMemberExpression = Partial<MemberExpression>;
|
|
498
|
-
type SimpleMethodDefinition = Partial<MethodDefinition>;
|
|
499
|
-
type SimpleNewExpression = Partial<NewExpression>;
|
|
500
|
-
type SimpleObjectExpression = Partial<ObjectExpression>;
|
|
501
|
-
type SimpleObjectPattern = Partial<ObjectPattern>;
|
|
502
|
-
type SimplePosition = Partial<Position>;
|
|
503
|
-
type SimpleProgram = Partial<Program>;
|
|
504
|
-
type SimpleProperty = Partial<Property>;
|
|
505
|
-
type SimplePropertyDefinition = Partial<PropertyDefinition>;
|
|
506
|
-
type SimpleRegExpLiteral = Partial<RegExpLiteral>;
|
|
507
|
-
type SimpleRestElement = Partial<RestElement>;
|
|
508
|
-
type SimpleReturnStatement = Partial<ReturnStatement>;
|
|
509
|
-
type SimpleSequenceExpression = Partial<SequenceExpression>;
|
|
510
|
-
type SimpleSimpleCallExpression = Partial<SimpleCallExpression>;
|
|
511
|
-
type SimpleSimpleLiteral = Partial<SimpleLiteral>;
|
|
512
|
-
type SimpleSourceLocation = Partial<SourceLocation>;
|
|
513
|
-
type SimpleSpreadElement = Partial<SpreadElement>;
|
|
514
|
-
type SimpleSwitchCase = Partial<SwitchCase>;
|
|
515
|
-
type SimpleSwitchStatement = Partial<SwitchStatement>;
|
|
516
|
-
type SimpleTemplateElement = Partial<TemplateElement>;
|
|
517
|
-
type SimpleTemplateLiteral = Partial<TemplateLiteral>;
|
|
518
|
-
type SimpleThisExpression = Partial<ThisExpression>;
|
|
519
|
-
type SimpleThrowStatement = Partial<ThrowStatement>;
|
|
520
|
-
type SimpleTryStatement = Partial<TryStatement>;
|
|
521
|
-
type SimpleUnaryExpression = Partial<UnaryExpression>;
|
|
522
|
-
type SimpleUpdateExpression = Partial<UpdateExpression>;
|
|
523
|
-
type SimpleVariableDeclaration = Partial<VariableDeclaration>;
|
|
524
|
-
type SimpleVariableDeclarator = Partial<VariableDeclarator>;
|
|
525
|
-
type SimpleWhileStatement = Partial<WhileStatement>;
|
|
526
|
-
|
|
527
|
-
type types_ArrayExpression = ArrayExpression;
|
|
528
|
-
type types_ArrayPattern = ArrayPattern;
|
|
529
|
-
type types_ArrowFunctionExpression = ArrowFunctionExpression;
|
|
530
|
-
type types_AssignmentExpression = AssignmentExpression;
|
|
531
|
-
type types_AssignmentOperator = AssignmentOperator;
|
|
532
|
-
type types_AssignmentPattern = AssignmentPattern;
|
|
533
|
-
type types_AssignmentProperty = AssignmentProperty;
|
|
534
|
-
type types_AwaitExpression = AwaitExpression;
|
|
535
|
-
type types_BaseCallExpression = BaseCallExpression;
|
|
536
|
-
type types_BaseDeclaration = BaseDeclaration;
|
|
537
|
-
type types_BaseExpression = BaseExpression;
|
|
538
|
-
type types_BaseForXStatement = BaseForXStatement;
|
|
539
|
-
type types_BaseFunction = BaseFunction;
|
|
540
|
-
type types_BaseModuleDeclaration = BaseModuleDeclaration;
|
|
541
|
-
type types_BaseModuleSpecifier = BaseModuleSpecifier;
|
|
542
|
-
type types_BaseNode = BaseNode;
|
|
543
|
-
type types_BaseNodeWithoutComments = BaseNodeWithoutComments;
|
|
544
|
-
type types_BasePattern = BasePattern;
|
|
545
|
-
type types_BaseStatement = BaseStatement;
|
|
546
|
-
type types_BigIntLiteral = BigIntLiteral;
|
|
547
|
-
type types_BinaryExpression = BinaryExpression;
|
|
548
|
-
type types_BinaryOperator = BinaryOperator;
|
|
549
|
-
type types_BlockStatement = BlockStatement;
|
|
550
|
-
type types_BreakStatement = BreakStatement;
|
|
551
|
-
type types_CallExpression = CallExpression;
|
|
552
|
-
type types_CatchClause = CatchClause;
|
|
553
|
-
type types_ChainElement = ChainElement;
|
|
554
|
-
type types_ChainExpression = ChainExpression;
|
|
555
|
-
type types_Comment = Comment;
|
|
556
|
-
type types_ConditionalExpression = ConditionalExpression;
|
|
557
|
-
type types_ContinueStatement = ContinueStatement;
|
|
558
|
-
type types_DebuggerStatement = DebuggerStatement;
|
|
559
|
-
type types_Declaration = Declaration;
|
|
560
|
-
type types_Directive = Directive;
|
|
561
|
-
type types_DoWhileStatement = DoWhileStatement;
|
|
562
|
-
type types_EmptyStatement = EmptyStatement;
|
|
563
|
-
type types_Expression = Expression;
|
|
564
|
-
type types_ExpressionStatement = ExpressionStatement;
|
|
565
|
-
type types_ForInStatement = ForInStatement;
|
|
566
|
-
type types_ForOfStatement = ForOfStatement;
|
|
567
|
-
type types_ForStatement = ForStatement;
|
|
568
|
-
type types_Function = Function;
|
|
569
|
-
type types_FunctionDeclaration = FunctionDeclaration;
|
|
570
|
-
type types_FunctionExpression = FunctionExpression;
|
|
571
|
-
type types_Identifier = Identifier;
|
|
572
|
-
type types_IfStatement = IfStatement;
|
|
573
|
-
type types_ImportDeclaration = ImportDeclaration;
|
|
574
|
-
type types_ImportDefaultSpecifier = ImportDefaultSpecifier;
|
|
575
|
-
type types_ImportExpression = ImportExpression;
|
|
576
|
-
type types_ImportNamespaceSpecifier = ImportNamespaceSpecifier;
|
|
577
|
-
type types_ImportSpecifier = ImportSpecifier;
|
|
578
|
-
type types_JsonExpression = JsonExpression;
|
|
579
|
-
type types_LabeledStatement = LabeledStatement;
|
|
580
|
-
type types_Literal = Literal;
|
|
581
|
-
type types_LogicalExpression = LogicalExpression;
|
|
582
|
-
type types_LogicalOperator = LogicalOperator;
|
|
583
|
-
type types_MaybeNamedFunctionDeclaration = MaybeNamedFunctionDeclaration;
|
|
584
|
-
type types_MemberExpression = MemberExpression;
|
|
585
|
-
type types_MetaProperty = MetaProperty;
|
|
586
|
-
type types_MethodDefinition = MethodDefinition;
|
|
587
|
-
type types_ModuleDeclaration = ModuleDeclaration;
|
|
588
|
-
type types_ModuleSpecifier = ModuleSpecifier;
|
|
589
|
-
type types_NewExpression = NewExpression;
|
|
590
|
-
type types_Node = Node;
|
|
591
|
-
type types_NodeMap = NodeMap;
|
|
592
|
-
type types_ObjectExpression = ObjectExpression;
|
|
593
|
-
type types_ObjectPattern = ObjectPattern;
|
|
594
|
-
type types_Pattern = Pattern;
|
|
595
|
-
type types_Position = Position;
|
|
596
|
-
type types_Program = Program;
|
|
597
|
-
type types_Property = Property;
|
|
598
|
-
type types_PropertyDefinition = PropertyDefinition;
|
|
599
|
-
type types_RegExpLiteral = RegExpLiteral;
|
|
600
|
-
type types_RestElement = RestElement;
|
|
601
|
-
type types_ReturnStatement = ReturnStatement;
|
|
602
|
-
type types_SequenceExpression = SequenceExpression;
|
|
603
|
-
type types_SimpleArrayExpression = SimpleArrayExpression;
|
|
604
|
-
type types_SimpleArrayPattern = SimpleArrayPattern;
|
|
605
|
-
type types_SimpleArrowFunctionExpression = SimpleArrowFunctionExpression;
|
|
606
|
-
type types_SimpleAssignmentExpression = SimpleAssignmentExpression;
|
|
607
|
-
type types_SimpleAssignmentPattern = SimpleAssignmentPattern;
|
|
608
|
-
type types_SimpleAssignmentProperty = SimpleAssignmentProperty;
|
|
609
|
-
type types_SimpleAwaitExpression = SimpleAwaitExpression;
|
|
610
|
-
type types_SimpleBaseCallExpression = SimpleBaseCallExpression;
|
|
611
|
-
type types_SimpleBaseDeclaration = SimpleBaseDeclaration;
|
|
612
|
-
type types_SimpleBaseExpression = SimpleBaseExpression;
|
|
613
|
-
type types_SimpleBaseForXStatement = SimpleBaseForXStatement;
|
|
614
|
-
type types_SimpleBaseFunction = SimpleBaseFunction;
|
|
615
|
-
type types_SimpleBaseNode = SimpleBaseNode;
|
|
616
|
-
type types_SimpleBaseNodeWithoutComments = SimpleBaseNodeWithoutComments;
|
|
617
|
-
type types_SimpleBasePattern = SimpleBasePattern;
|
|
618
|
-
type types_SimpleBaseStatement = SimpleBaseStatement;
|
|
619
|
-
type types_SimpleBigIntLiteral = SimpleBigIntLiteral;
|
|
620
|
-
type types_SimpleBinaryExpression = SimpleBinaryExpression;
|
|
621
|
-
type types_SimpleBlockStatement = SimpleBlockStatement;
|
|
622
|
-
type types_SimpleBreakStatement = SimpleBreakStatement;
|
|
623
|
-
type types_SimpleCallExpression = SimpleCallExpression;
|
|
624
|
-
type types_SimpleCatchClause = SimpleCatchClause;
|
|
625
|
-
type types_SimpleChainExpression = SimpleChainExpression;
|
|
626
|
-
type types_SimpleComment = SimpleComment;
|
|
627
|
-
type types_SimpleConditionalExpression = SimpleConditionalExpression;
|
|
628
|
-
type types_SimpleContinueStatement = SimpleContinueStatement;
|
|
629
|
-
type types_SimpleDoWhileStatement = SimpleDoWhileStatement;
|
|
630
|
-
type types_SimpleEmptyStatement = SimpleEmptyStatement;
|
|
631
|
-
type types_SimpleExpressionStatement = SimpleExpressionStatement;
|
|
632
|
-
type types_SimpleForInStatement = SimpleForInStatement;
|
|
633
|
-
type types_SimpleForOfStatement = SimpleForOfStatement;
|
|
634
|
-
type types_SimpleForStatement = SimpleForStatement;
|
|
635
|
-
type types_SimpleFunctionDeclaration = SimpleFunctionDeclaration;
|
|
636
|
-
type types_SimpleFunctionExpression = SimpleFunctionExpression;
|
|
637
|
-
type types_SimpleIdentifier = SimpleIdentifier;
|
|
638
|
-
type types_SimpleIfStatement = SimpleIfStatement;
|
|
639
|
-
type types_SimpleJsonExpression = SimpleJsonExpression;
|
|
640
|
-
type types_SimpleLabeledStatement = SimpleLabeledStatement;
|
|
641
|
-
type types_SimpleLiteral = SimpleLiteral;
|
|
642
|
-
type types_SimpleLogicalExpression = SimpleLogicalExpression;
|
|
643
|
-
type types_SimpleMemberExpression = SimpleMemberExpression;
|
|
644
|
-
type types_SimpleMethodDefinition = SimpleMethodDefinition;
|
|
645
|
-
type types_SimpleNewExpression = SimpleNewExpression;
|
|
646
|
-
type types_SimpleNode = SimpleNode;
|
|
647
|
-
type types_SimpleObjectExpression = SimpleObjectExpression;
|
|
648
|
-
type types_SimpleObjectPattern = SimpleObjectPattern;
|
|
649
|
-
type types_SimplePosition = SimplePosition;
|
|
650
|
-
type types_SimpleProgram = SimpleProgram;
|
|
651
|
-
type types_SimpleProperty = SimpleProperty;
|
|
652
|
-
type types_SimplePropertyDefinition = SimplePropertyDefinition;
|
|
653
|
-
type types_SimpleRegExpLiteral = SimpleRegExpLiteral;
|
|
654
|
-
type types_SimpleRestElement = SimpleRestElement;
|
|
655
|
-
type types_SimpleReturnStatement = SimpleReturnStatement;
|
|
656
|
-
type types_SimpleSequenceExpression = SimpleSequenceExpression;
|
|
657
|
-
type types_SimpleSimpleCallExpression = SimpleSimpleCallExpression;
|
|
658
|
-
type types_SimpleSimpleLiteral = SimpleSimpleLiteral;
|
|
659
|
-
type types_SimpleSourceLocation = SimpleSourceLocation;
|
|
660
|
-
type types_SimpleSpreadElement = SimpleSpreadElement;
|
|
661
|
-
type types_SimpleSwitchCase = SimpleSwitchCase;
|
|
662
|
-
type types_SimpleSwitchStatement = SimpleSwitchStatement;
|
|
663
|
-
type types_SimpleTemplateElement = SimpleTemplateElement;
|
|
664
|
-
type types_SimpleTemplateLiteral = SimpleTemplateLiteral;
|
|
665
|
-
type types_SimpleThisExpression = SimpleThisExpression;
|
|
666
|
-
type types_SimpleThrowStatement = SimpleThrowStatement;
|
|
667
|
-
type types_SimpleTryStatement = SimpleTryStatement;
|
|
668
|
-
type types_SimpleUnaryExpression = SimpleUnaryExpression;
|
|
669
|
-
type types_SimpleUpdateExpression = SimpleUpdateExpression;
|
|
670
|
-
type types_SimpleVariableDeclaration = SimpleVariableDeclaration;
|
|
671
|
-
type types_SimpleVariableDeclarator = SimpleVariableDeclarator;
|
|
672
|
-
type types_SimpleWhileStatement = SimpleWhileStatement;
|
|
673
|
-
type types_SourceLocation = SourceLocation;
|
|
674
|
-
type types_SpreadElement = SpreadElement;
|
|
675
|
-
type types_Statement = Statement;
|
|
676
|
-
type types_SwitchCase = SwitchCase;
|
|
677
|
-
type types_SwitchStatement = SwitchStatement;
|
|
678
|
-
type types_TSLite = TSLite;
|
|
679
|
-
type types_TSLiteMarker = TSLiteMarker;
|
|
680
|
-
type types_TaggedTemplateExpression = TaggedTemplateExpression;
|
|
681
|
-
type types_TemplateElement = TemplateElement;
|
|
682
|
-
type types_TemplateLiteral = TemplateLiteral;
|
|
683
|
-
type types_ThisExpression = ThisExpression;
|
|
684
|
-
type types_ThrowStatement = ThrowStatement;
|
|
685
|
-
type types_TryStatement = TryStatement;
|
|
686
|
-
type types_UnaryExpression = UnaryExpression;
|
|
687
|
-
type types_UnaryOperator = UnaryOperator;
|
|
688
|
-
type types_UpdateExpression = UpdateExpression;
|
|
689
|
-
type types_UpdateOperator = UpdateOperator;
|
|
690
|
-
type types_VariableDeclaration = VariableDeclaration;
|
|
691
|
-
type types_VariableDeclarator = VariableDeclarator;
|
|
692
|
-
type types_WhileStatement = WhileStatement;
|
|
693
|
-
declare namespace types {
|
|
694
|
-
export type { types_ArrayExpression as ArrayExpression, types_ArrayPattern as ArrayPattern, types_ArrowFunctionExpression as ArrowFunctionExpression, types_AssignmentExpression as AssignmentExpression, types_AssignmentOperator as AssignmentOperator, types_AssignmentPattern as AssignmentPattern, types_AssignmentProperty as AssignmentProperty, types_AwaitExpression as AwaitExpression, types_BaseCallExpression as BaseCallExpression, types_BaseDeclaration as BaseDeclaration, types_BaseExpression as BaseExpression, types_BaseForXStatement as BaseForXStatement, types_BaseFunction as BaseFunction, types_BaseModuleDeclaration as BaseModuleDeclaration, types_BaseModuleSpecifier as BaseModuleSpecifier, types_BaseNode as BaseNode, types_BaseNodeWithoutComments as BaseNodeWithoutComments, types_BasePattern as BasePattern, types_BaseStatement as BaseStatement, types_BigIntLiteral as BigIntLiteral, types_BinaryExpression as BinaryExpression, types_BinaryOperator as BinaryOperator, types_BlockStatement as BlockStatement, types_BreakStatement as BreakStatement, types_CallExpression as CallExpression, types_CatchClause as CatchClause, types_ChainElement as ChainElement, types_ChainExpression as ChainExpression, types_Comment as Comment, types_ConditionalExpression as ConditionalExpression, types_ContinueStatement as ContinueStatement, types_DebuggerStatement as DebuggerStatement, types_Declaration as Declaration, types_Directive as Directive, types_DoWhileStatement as DoWhileStatement, types_EmptyStatement as EmptyStatement, types_Expression as Expression, types_ExpressionStatement as ExpressionStatement, types_ForInStatement as ForInStatement, types_ForOfStatement as ForOfStatement, types_ForStatement as ForStatement, types_Function as Function, types_FunctionDeclaration as FunctionDeclaration, types_FunctionExpression as FunctionExpression, types_Identifier as Identifier, types_IfStatement as IfStatement, types_ImportDeclaration as ImportDeclaration, types_ImportDefaultSpecifier as ImportDefaultSpecifier, types_ImportExpression as ImportExpression, types_ImportNamespaceSpecifier as ImportNamespaceSpecifier, types_ImportSpecifier as ImportSpecifier, types_JsonExpression as JsonExpression, types_LabeledStatement as LabeledStatement, types_Literal as Literal, types_LogicalExpression as LogicalExpression, types_LogicalOperator as LogicalOperator, types_MaybeNamedFunctionDeclaration as MaybeNamedFunctionDeclaration, types_MemberExpression as MemberExpression, types_MetaProperty as MetaProperty, types_MethodDefinition as MethodDefinition, types_ModuleDeclaration as ModuleDeclaration, types_ModuleSpecifier as ModuleSpecifier, types_NewExpression as NewExpression, types_Node as Node, types_NodeMap as NodeMap, types_ObjectExpression as ObjectExpression, types_ObjectPattern as ObjectPattern, types_Pattern as Pattern, types_Position as Position, types_Program as Program, types_Property as Property, types_PropertyDefinition as PropertyDefinition, types_RegExpLiteral as RegExpLiteral, types_RestElement as RestElement, types_ReturnStatement as ReturnStatement, types_SequenceExpression as SequenceExpression, types_SimpleArrayExpression as SimpleArrayExpression, types_SimpleArrayPattern as SimpleArrayPattern, types_SimpleArrowFunctionExpression as SimpleArrowFunctionExpression, types_SimpleAssignmentExpression as SimpleAssignmentExpression, types_SimpleAssignmentPattern as SimpleAssignmentPattern, types_SimpleAssignmentProperty as SimpleAssignmentProperty, types_SimpleAwaitExpression as SimpleAwaitExpression, types_SimpleBaseCallExpression as SimpleBaseCallExpression, types_SimpleBaseDeclaration as SimpleBaseDeclaration, types_SimpleBaseExpression as SimpleBaseExpression, types_SimpleBaseForXStatement as SimpleBaseForXStatement, types_SimpleBaseFunction as SimpleBaseFunction, types_SimpleBaseNode as SimpleBaseNode, types_SimpleBaseNodeWithoutComments as SimpleBaseNodeWithoutComments, types_SimpleBasePattern as SimpleBasePattern, types_SimpleBaseStatement as SimpleBaseStatement, types_SimpleBigIntLiteral as SimpleBigIntLiteral, types_SimpleBinaryExpression as SimpleBinaryExpression, types_SimpleBlockStatement as SimpleBlockStatement, types_SimpleBreakStatement as SimpleBreakStatement, types_SimpleCallExpression as SimpleCallExpression, types_SimpleCatchClause as SimpleCatchClause, types_SimpleChainExpression as SimpleChainExpression, types_SimpleComment as SimpleComment, types_SimpleConditionalExpression as SimpleConditionalExpression, types_SimpleContinueStatement as SimpleContinueStatement, types_SimpleDoWhileStatement as SimpleDoWhileStatement, types_SimpleEmptyStatement as SimpleEmptyStatement, types_SimpleExpressionStatement as SimpleExpressionStatement, types_SimpleForInStatement as SimpleForInStatement, types_SimpleForOfStatement as SimpleForOfStatement, types_SimpleForStatement as SimpleForStatement, types_SimpleFunctionDeclaration as SimpleFunctionDeclaration, types_SimpleFunctionExpression as SimpleFunctionExpression, types_SimpleIdentifier as SimpleIdentifier, types_SimpleIfStatement as SimpleIfStatement, types_SimpleJsonExpression as SimpleJsonExpression, types_SimpleLabeledStatement as SimpleLabeledStatement, types_SimpleLiteral as SimpleLiteral, types_SimpleLogicalExpression as SimpleLogicalExpression, types_SimpleMemberExpression as SimpleMemberExpression, types_SimpleMethodDefinition as SimpleMethodDefinition, types_SimpleNewExpression as SimpleNewExpression, types_SimpleNode as SimpleNode, types_SimpleObjectExpression as SimpleObjectExpression, types_SimpleObjectPattern as SimpleObjectPattern, types_SimplePosition as SimplePosition, types_SimpleProgram as SimpleProgram, types_SimpleProperty as SimpleProperty, types_SimplePropertyDefinition as SimplePropertyDefinition, types_SimpleRegExpLiteral as SimpleRegExpLiteral, types_SimpleRestElement as SimpleRestElement, types_SimpleReturnStatement as SimpleReturnStatement, types_SimpleSequenceExpression as SimpleSequenceExpression, types_SimpleSimpleCallExpression as SimpleSimpleCallExpression, types_SimpleSimpleLiteral as SimpleSimpleLiteral, types_SimpleSourceLocation as SimpleSourceLocation, types_SimpleSpreadElement as SimpleSpreadElement, types_SimpleSwitchCase as SimpleSwitchCase, types_SimpleSwitchStatement as SimpleSwitchStatement, types_SimpleTemplateElement as SimpleTemplateElement, types_SimpleTemplateLiteral as SimpleTemplateLiteral, types_SimpleThisExpression as SimpleThisExpression, types_SimpleThrowStatement as SimpleThrowStatement, types_SimpleTryStatement as SimpleTryStatement, types_SimpleUnaryExpression as SimpleUnaryExpression, types_SimpleUpdateExpression as SimpleUpdateExpression, types_SimpleVariableDeclaration as SimpleVariableDeclaration, types_SimpleVariableDeclarator as SimpleVariableDeclarator, types_SimpleWhileStatement as SimpleWhileStatement, types_SourceLocation as SourceLocation, types_SpreadElement as SpreadElement, types_Statement as Statement, types_SwitchCase as SwitchCase, types_SwitchStatement as SwitchStatement, types_TSLite as TSLite, types_TSLiteMarker as TSLiteMarker, types_TaggedTemplateExpression as TaggedTemplateExpression, types_TemplateElement as TemplateElement, types_TemplateLiteral as TemplateLiteral, types_ThisExpression as ThisExpression, types_ThrowStatement as ThrowStatement, types_TryStatement as TryStatement, types_UnaryExpression as UnaryExpression, types_UnaryOperator as UnaryOperator, types_UpdateExpression as UpdateExpression, types_UpdateOperator as UpdateOperator, types_VariableDeclaration as VariableDeclaration, types_VariableDeclarator as VariableDeclarator, types_WhileStatement as WhileStatement };
|
|
695
|
-
}
|
|
1
|
+
import { B as BaseNode, A as ArrayExpression, N as Node, a as ArrayPattern, b as ArrowFunctionExpression, c as AssignmentExpression, d as AssignmentProperty, e as AwaitExpression, f as BinaryExpression, g as BlockStatement, h as BreakStatement, S as SimpleCallExpression, C as CatchClause, i as ChainExpression, j as ConditionalExpression, k as ContinueStatement, D as DoWhileStatement, E as EmptyStatement, l as ExpressionStatement, F as ForInStatement, m as ForOfStatement, n as ForStatement, o as FunctionDeclaration, p as FunctionExpression, I as Identifier, q as IfStatement, r as ImportDeclaration, s as ImportDefaultSpecifier, t as ImportNamespaceSpecifier, u as ImportSpecifier, J as JsonExpression, L as Literal, v as LogicalExpression, M as MemberExpression, w as NewExpression, O as ObjectExpression, x as ObjectPattern, P as Program, y as Property, R as ReturnStatement, z as SwitchCase, G as SwitchStatement, T as TemplateElement, H as TemplateLiteral, K as ThrowStatement, Q as TryStatement, U as UnaryExpression, V as UpdateExpression, W as VariableDeclaration, X as VariableDeclarator, Y as WhileStatement, Z as SpreadElement, _ as RestElement, $ as Directive, a0 as ModuleDeclaration, a1 as JSXElement, a2 as JSXFragment, a3 as CallExpression } from './index-CcVx_Zur.js';
|
|
2
|
+
export { a4 as AssignmentOperator, a5 as AssignmentPattern, a6 as BaseCallExpression, a7 as BaseDeclaration, a8 as BaseExpression, a9 as BaseForXStatement, aa as BaseFunction, ab as BaseModuleDeclaration, ac as BaseModuleSpecifier, ad as BaseNodeWithoutComments, ae as BasePattern, af as BaseStatement, ag as BigIntLiteral, ah as BinaryOperator, ai as ChainElement, aj as Comment, ak as DebuggerStatement, al as Declaration, am as ExportDefaultDeclaration, an as ExportNamedDeclaration, ao as ExportSpecifier, ap as Expression, aq as Function, ar as ImportExpression, as as JSXAttribute, at as JSXChild, au as JSXClosingElement, av as JSXClosingFragment, aw as JSXEmptyExpression, ax as JSXExpressionContainer, ay as JSXIdentifier, az as JSXMemberExpression, aA as JSXNamespacedName, aB as JSXOpeningElement, aC as JSXOpeningFragment, aD as JSXSpreadAttribute, aE as JSXTagName, aF as JSXText, aG as LabeledStatement, aH as LogicalOperator, aI as MaybeNamedFunctionDeclaration, aJ as MetaProperty, aK as MethodDefinition, aL as ModuleSpecifier, aM as NodeMap, aN as Pattern, aO as Position, aP as PropertyDefinition, aQ as RegExpLiteral, aR as SequenceExpression, aS as SimpleArrayExpression, aT as SimpleArrayPattern, aU as SimpleArrowFunctionExpression, aV as SimpleAssignmentExpression, aW as SimpleAssignmentPattern, aX as SimpleAssignmentProperty, aY as SimpleAwaitExpression, aZ as SimpleBaseCallExpression, a_ as SimpleBaseDeclaration, a$ as SimpleBaseExpression, b0 as SimpleBaseForXStatement, b1 as SimpleBaseFunction, b2 as SimpleBaseNode, b3 as SimpleBaseNodeWithoutComments, b4 as SimpleBasePattern, b5 as SimpleBaseStatement, b6 as SimpleBigIntLiteral, b7 as SimpleBinaryExpression, b8 as SimpleBlockStatement, b9 as SimpleBreakStatement, ba as SimpleCatchClause, bb as SimpleChainExpression, bc as SimpleComment, bd as SimpleConditionalExpression, be as SimpleContinueStatement, bf as SimpleDoWhileStatement, bg as SimpleEmptyStatement, bh as SimpleExpressionStatement, bi as SimpleForInStatement, bj as SimpleForOfStatement, bk as SimpleForStatement, bl as SimpleFunctionDeclaration, bm as SimpleFunctionExpression, bn as SimpleIdentifier, bo as SimpleIfStatement, bp as SimpleJsonExpression, bq as SimpleLabeledStatement, br as SimpleLiteral, bs as SimpleLogicalExpression, bt as SimpleMemberExpression, bu as SimpleMethodDefinition, bv as SimpleNewExpression, bw as SimpleNode, bx as SimpleObjectExpression, by as SimpleObjectPattern, bz as SimplePosition, bA as SimpleProgram, bB as SimpleProperty, bC as SimplePropertyDefinition, bD as SimpleRegExpLiteral, bE as SimpleRestElement, bF as SimpleReturnStatement, bG as SimpleSequenceExpression, bH as SimpleSimpleCallExpression, bI as SimpleSimpleLiteral, bJ as SimpleSourceLocation, bK as SimpleSpreadElement, bL as SimpleSwitchCase, bM as SimpleSwitchStatement, bN as SimpleTemplateElement, bO as SimpleTemplateLiteral, bP as SimpleThisExpression, bQ as SimpleThrowStatement, bR as SimpleTryStatement, bS as SimpleUnaryExpression, bT as SimpleUpdateExpression, bU as SimpleVariableDeclaration, bV as SimpleVariableDeclarator, bW as SimpleWhileStatement, bX as SourceLocation, bY as Statement, bZ as TSLite, b_ as TSLiteMarker, b$ as TaggedTemplateExpression, c0 as ThisExpression, c1 as UnaryOperator, c2 as UpdateOperator, c3 as ast, c4 as fromAstMarker, c5 as json, c6 as jsonExpression, c7 as types } from './index-CcVx_Zur.js';
|
|
696
3
|
|
|
697
4
|
/** Erro lançado pelo `@tslite/core`. */
|
|
698
5
|
type CoreErrorCode = "invalid-ast-entry" | "missing-node-type" | "unknown-node-type";
|
|
@@ -720,7 +27,7 @@ declare const VALID_OBJECT_KEY: RegExp;
|
|
|
720
27
|
*
|
|
721
28
|
* Basicamente: Expressions + Program (para AST completo)
|
|
722
29
|
*/
|
|
723
|
-
declare const VALID_AST_ENTRY_TYPES: readonly ["Identifier", "MemberExpression", "CallExpression", "ArrowFunctionExpression", "FunctionExpression", "BinaryExpression", "LogicalExpression", "UnaryExpression", "UpdateExpression", "ConditionalExpression", "AssignmentExpression", "NewExpression", "ArrayExpression", "ObjectExpression", "AwaitExpression", "TemplateLiteral", "TaggedTemplateExpression", "SequenceExpression", "ChainExpression", "Program"];
|
|
30
|
+
declare const VALID_AST_ENTRY_TYPES: readonly ["Identifier", "MemberExpression", "CallExpression", "ArrowFunctionExpression", "FunctionExpression", "BinaryExpression", "LogicalExpression", "UnaryExpression", "UpdateExpression", "ConditionalExpression", "AssignmentExpression", "NewExpression", "ArrayExpression", "ObjectExpression", "AwaitExpression", "TemplateLiteral", "TaggedTemplateExpression", "SequenceExpression", "ChainExpression", "JSXElement", "JSXFragment", "Program"];
|
|
724
31
|
type ValidAstEntryType = (typeof VALID_AST_ENTRY_TYPES)[number];
|
|
725
32
|
/**
|
|
726
33
|
* Verifica se um tipo é válido como ponto de entrada #ast
|
|
@@ -801,6 +108,20 @@ declare const VisitorKeys: {
|
|
|
801
108
|
VariableDeclarator: string[];
|
|
802
109
|
WhileStatement: string[];
|
|
803
110
|
WithStatement: string[];
|
|
111
|
+
JSXElement: string[];
|
|
112
|
+
JSXFragment: string[];
|
|
113
|
+
JSXOpeningElement: string[];
|
|
114
|
+
JSXClosingElement: string[];
|
|
115
|
+
JSXOpeningFragment: never[];
|
|
116
|
+
JSXClosingFragment: never[];
|
|
117
|
+
JSXAttribute: string[];
|
|
118
|
+
JSXSpreadAttribute: string[];
|
|
119
|
+
JSXExpressionContainer: string[];
|
|
120
|
+
JSXEmptyExpression: never[];
|
|
121
|
+
JSXText: never[];
|
|
122
|
+
JSXIdentifier: never[];
|
|
123
|
+
JSXMemberExpression: string[];
|
|
124
|
+
JSXNamespacedName: string[];
|
|
804
125
|
};
|
|
805
126
|
declare const Precedence: {
|
|
806
127
|
Sequence: number;
|
|
@@ -860,150 +181,6 @@ declare const BinaryPrecedence: {
|
|
|
860
181
|
"**": number;
|
|
861
182
|
};
|
|
862
183
|
|
|
863
|
-
/**
|
|
864
|
-
* Cria um marcador #ast para embedar AST em JSON.
|
|
865
|
-
*
|
|
866
|
-
* O formato usa #ast como o tipo do nó, sem wrapper body:
|
|
867
|
-
* ```
|
|
868
|
-
* { "#ast": "CallExpression", "callee": {...}, "arguments": [] }
|
|
869
|
-
* ```
|
|
870
|
-
*
|
|
871
|
-
* @param node - Nó AST (deve ter propriedade `type`)
|
|
872
|
-
* @returns Objeto com #ast marker pronto para JSON
|
|
873
|
-
* @throws Se o tipo não for válido como entry point
|
|
874
|
-
*/
|
|
875
|
-
declare const ast: (node: Node) => TSLiteMarker;
|
|
876
|
-
/**
|
|
877
|
-
* Converte um objeto com #ast marker de volta para nó AST com type.
|
|
878
|
-
*
|
|
879
|
-
* Útil quando você tem um objeto no formato TSLite e precisa usar como nó AST
|
|
880
|
-
* normal (ex: passar como argumento).
|
|
881
|
-
*
|
|
882
|
-
* @param obj - Objeto com #ast marker
|
|
883
|
-
* @returns Nó AST com type (ou o objeto original se não tiver #ast)
|
|
884
|
-
*
|
|
885
|
-
* @example
|
|
886
|
-
* ```ts
|
|
887
|
-
* const astMarked = { "#ast": "Identifier", name: "foo" };
|
|
888
|
-
* const node = fromAstMarker(astMarked);
|
|
889
|
-
* // { type: "Identifier", name: "foo" }
|
|
890
|
-
* ```
|
|
891
|
-
*/
|
|
892
|
-
declare const fromAstMarker: (obj: unknown) => unknown;
|
|
893
|
-
declare const identifier: (name: string) => Identifier;
|
|
894
|
-
declare const literal: (value: string | boolean | number | null | RegExp | bigint | undefined) => Literal;
|
|
895
|
-
declare const arrayExpression: (elements: Array<Expression | SpreadElement | null>) => ArrayExpression;
|
|
896
|
-
declare const objectExpression: (properties: Array<Property | SpreadElement>) => ObjectExpression;
|
|
897
|
-
declare const property: (key: Expression, value: Expression | Pattern | AssignmentProperty, shorthand?: boolean, computed?: boolean) => Property;
|
|
898
|
-
declare const spreadElement: (argument: Expression) => SpreadElement;
|
|
899
|
-
declare const callExpression: (callee: Expression, args: Array<Expression | SpreadElement>, optional?: boolean) => SimpleCallExpression;
|
|
900
|
-
declare const newExpression: (callee: Expression, args: Array<Expression | SpreadElement>) => NewExpression;
|
|
901
|
-
declare const memberExpression: (object: Expression, property: Expression, computed?: boolean, optional?: boolean) => MemberExpression;
|
|
902
|
-
declare const chainExpression: (expression: ChainElement) => ChainExpression;
|
|
903
|
-
declare const binaryExpression: (operator: BinaryOperator, left: Expression, right: Expression) => BinaryExpression;
|
|
904
|
-
declare const logicalExpression: (operator: LogicalOperator, left: Expression, right: Expression) => LogicalExpression;
|
|
905
|
-
declare const unaryExpression: (operator: UnaryOperator, argument: Expression) => UnaryExpression;
|
|
906
|
-
declare const updateExpression: (operator: UpdateOperator, argument: Expression, prefix?: boolean) => UpdateExpression;
|
|
907
|
-
declare const assignmentExpression: (operator: AssignmentOperator, left: Pattern, right: Expression) => AssignmentExpression;
|
|
908
|
-
declare const conditionalExpression: (test: Expression, consequent: Expression, alternate: Expression) => ConditionalExpression;
|
|
909
|
-
declare const awaitExpression: (argument: Expression | null) => AwaitExpression;
|
|
910
|
-
declare const templateElement: (value: {
|
|
911
|
-
cooked?: string | null | undefined;
|
|
912
|
-
raw: string;
|
|
913
|
-
}, tail?: boolean) => TemplateElement;
|
|
914
|
-
declare const templateLiteral: (quasis: TemplateElement[], expressions: Expression[]) => TemplateLiteral;
|
|
915
|
-
declare const arrowFunctionExpression: (params: Pattern[], body: Expression | BlockStatement, async?: boolean, generator?: boolean) => ArrowFunctionExpression;
|
|
916
|
-
declare const functionExpression: (id: Identifier | null | undefined, params: Pattern[], body: BlockStatement, async?: boolean, generator?: boolean) => FunctionExpression;
|
|
917
|
-
declare const functionDeclaration: (id: Identifier, params: Pattern[], body: BlockStatement, generator?: boolean, async?: boolean) => FunctionDeclaration;
|
|
918
|
-
declare const blockStatement: (body: Statement[]) => BlockStatement;
|
|
919
|
-
declare const expressionStatement: (expression: Expression) => ExpressionStatement;
|
|
920
|
-
declare const returnStatement: (argument: Expression | null | undefined) => ReturnStatement;
|
|
921
|
-
declare const ifStatement: (test: Expression, consequent: Statement, alternate?: Statement | null | undefined) => IfStatement;
|
|
922
|
-
declare const switchStatement: (discriminant: Expression, cases: SwitchCase[]) => SwitchStatement;
|
|
923
|
-
declare const switchCase: (test: Expression | null | undefined, consequent: Statement[]) => SwitchCase;
|
|
924
|
-
declare const throwStatement: (argument: Expression) => ThrowStatement;
|
|
925
|
-
declare const tryStatement: (block: BlockStatement, handler: CatchClause | null | undefined, finalizer?: BlockStatement | null | undefined) => TryStatement;
|
|
926
|
-
declare const catchClause: (param: Pattern | null, body: BlockStatement) => CatchClause;
|
|
927
|
-
declare const breakStatement: (label?: Identifier | null) => BreakStatement;
|
|
928
|
-
declare const continueStatement: (label?: Identifier | null) => ContinueStatement;
|
|
929
|
-
declare const emptyStatement: () => EmptyStatement;
|
|
930
|
-
declare const forStatement: (init: VariableDeclaration | Expression | null | undefined, test: Expression | null | undefined, update: Expression | null | undefined, body: Statement) => ForStatement;
|
|
931
|
-
declare const forInStatement: (left: Pattern | VariableDeclaration, right: Expression, body: Statement) => ForInStatement;
|
|
932
|
-
declare const forOfStatement: (left: Pattern | VariableDeclaration, right: Expression, body: Statement, _await?: boolean) => ForOfStatement;
|
|
933
|
-
declare const whileStatement: (test: Expression, body: Statement) => WhileStatement;
|
|
934
|
-
declare const doWhileStatement: (body: Statement, test: Expression) => DoWhileStatement;
|
|
935
|
-
declare const variableDeclaration: (kind: "var" | "let" | "const", declarations: VariableDeclarator[]) => VariableDeclaration;
|
|
936
|
-
declare const variableDeclarator: (id: Pattern, init?: Expression | null) => VariableDeclarator;
|
|
937
|
-
declare const objectPattern: (properties: Array<AssignmentProperty | RestElement>) => ObjectPattern;
|
|
938
|
-
declare const arrayPattern: (elements: Array<Pattern | null>) => ArrayPattern;
|
|
939
|
-
declare const assignmentProperty: (key: Expression, value?: Pattern, shorthand?: boolean, computed?: boolean) => AssignmentProperty;
|
|
940
|
-
declare const restElement: (argument: Pattern) => RestElement;
|
|
941
|
-
declare const program: (body: Array<Directive | Statement | ModuleDeclaration>, sourceType?: "script" | "module") => Program;
|
|
942
|
-
declare const jsonExpression: (body: TSLite) => JsonExpression;
|
|
943
|
-
declare const importDeclaration: (specifiers: Array<ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier>, source: Literal) => ImportDeclaration;
|
|
944
|
-
declare const importSpecifier: (imported: Identifier, local: Identifier) => ImportSpecifier;
|
|
945
|
-
declare const importDefaultSpecifier: (local: Identifier) => ImportDefaultSpecifier;
|
|
946
|
-
declare const importNamespaceSpecifier: (local: Identifier) => ImportNamespaceSpecifier;
|
|
947
|
-
declare const json: (body: TSLite) => JsonExpression;
|
|
948
|
-
|
|
949
|
-
declare const index$1_arrayExpression: typeof arrayExpression;
|
|
950
|
-
declare const index$1_arrayPattern: typeof arrayPattern;
|
|
951
|
-
declare const index$1_arrowFunctionExpression: typeof arrowFunctionExpression;
|
|
952
|
-
declare const index$1_assignmentExpression: typeof assignmentExpression;
|
|
953
|
-
declare const index$1_assignmentProperty: typeof assignmentProperty;
|
|
954
|
-
declare const index$1_ast: typeof ast;
|
|
955
|
-
declare const index$1_awaitExpression: typeof awaitExpression;
|
|
956
|
-
declare const index$1_binaryExpression: typeof binaryExpression;
|
|
957
|
-
declare const index$1_blockStatement: typeof blockStatement;
|
|
958
|
-
declare const index$1_breakStatement: typeof breakStatement;
|
|
959
|
-
declare const index$1_callExpression: typeof callExpression;
|
|
960
|
-
declare const index$1_catchClause: typeof catchClause;
|
|
961
|
-
declare const index$1_chainExpression: typeof chainExpression;
|
|
962
|
-
declare const index$1_conditionalExpression: typeof conditionalExpression;
|
|
963
|
-
declare const index$1_continueStatement: typeof continueStatement;
|
|
964
|
-
declare const index$1_doWhileStatement: typeof doWhileStatement;
|
|
965
|
-
declare const index$1_emptyStatement: typeof emptyStatement;
|
|
966
|
-
declare const index$1_expressionStatement: typeof expressionStatement;
|
|
967
|
-
declare const index$1_forInStatement: typeof forInStatement;
|
|
968
|
-
declare const index$1_forOfStatement: typeof forOfStatement;
|
|
969
|
-
declare const index$1_forStatement: typeof forStatement;
|
|
970
|
-
declare const index$1_fromAstMarker: typeof fromAstMarker;
|
|
971
|
-
declare const index$1_functionDeclaration: typeof functionDeclaration;
|
|
972
|
-
declare const index$1_functionExpression: typeof functionExpression;
|
|
973
|
-
declare const index$1_identifier: typeof identifier;
|
|
974
|
-
declare const index$1_ifStatement: typeof ifStatement;
|
|
975
|
-
declare const index$1_importDeclaration: typeof importDeclaration;
|
|
976
|
-
declare const index$1_importDefaultSpecifier: typeof importDefaultSpecifier;
|
|
977
|
-
declare const index$1_importNamespaceSpecifier: typeof importNamespaceSpecifier;
|
|
978
|
-
declare const index$1_importSpecifier: typeof importSpecifier;
|
|
979
|
-
declare const index$1_json: typeof json;
|
|
980
|
-
declare const index$1_jsonExpression: typeof jsonExpression;
|
|
981
|
-
declare const index$1_literal: typeof literal;
|
|
982
|
-
declare const index$1_logicalExpression: typeof logicalExpression;
|
|
983
|
-
declare const index$1_memberExpression: typeof memberExpression;
|
|
984
|
-
declare const index$1_newExpression: typeof newExpression;
|
|
985
|
-
declare const index$1_objectExpression: typeof objectExpression;
|
|
986
|
-
declare const index$1_objectPattern: typeof objectPattern;
|
|
987
|
-
declare const index$1_program: typeof program;
|
|
988
|
-
declare const index$1_property: typeof property;
|
|
989
|
-
declare const index$1_restElement: typeof restElement;
|
|
990
|
-
declare const index$1_returnStatement: typeof returnStatement;
|
|
991
|
-
declare const index$1_spreadElement: typeof spreadElement;
|
|
992
|
-
declare const index$1_switchCase: typeof switchCase;
|
|
993
|
-
declare const index$1_switchStatement: typeof switchStatement;
|
|
994
|
-
declare const index$1_templateElement: typeof templateElement;
|
|
995
|
-
declare const index$1_templateLiteral: typeof templateLiteral;
|
|
996
|
-
declare const index$1_throwStatement: typeof throwStatement;
|
|
997
|
-
declare const index$1_tryStatement: typeof tryStatement;
|
|
998
|
-
declare const index$1_unaryExpression: typeof unaryExpression;
|
|
999
|
-
declare const index$1_updateExpression: typeof updateExpression;
|
|
1000
|
-
declare const index$1_variableDeclaration: typeof variableDeclaration;
|
|
1001
|
-
declare const index$1_variableDeclarator: typeof variableDeclarator;
|
|
1002
|
-
declare const index$1_whileStatement: typeof whileStatement;
|
|
1003
|
-
declare namespace index$1 {
|
|
1004
|
-
export { index$1_arrayExpression as arrayExpression, index$1_arrayPattern as arrayPattern, index$1_arrowFunctionExpression as arrowFunctionExpression, index$1_assignmentExpression as assignmentExpression, index$1_assignmentProperty as assignmentProperty, index$1_ast as ast, index$1_awaitExpression as awaitExpression, index$1_binaryExpression as binaryExpression, index$1_blockStatement as blockStatement, index$1_breakStatement as breakStatement, index$1_callExpression as callExpression, index$1_catchClause as catchClause, index$1_chainExpression as chainExpression, index$1_conditionalExpression as conditionalExpression, index$1_continueStatement as continueStatement, index$1_doWhileStatement as doWhileStatement, index$1_emptyStatement as emptyStatement, index$1_expressionStatement as expressionStatement, index$1_forInStatement as forInStatement, index$1_forOfStatement as forOfStatement, index$1_forStatement as forStatement, index$1_fromAstMarker as fromAstMarker, index$1_functionDeclaration as functionDeclaration, index$1_functionExpression as functionExpression, index$1_identifier as identifier, index$1_ifStatement as ifStatement, index$1_importDeclaration as importDeclaration, index$1_importDefaultSpecifier as importDefaultSpecifier, index$1_importNamespaceSpecifier as importNamespaceSpecifier, index$1_importSpecifier as importSpecifier, index$1_json as json, index$1_jsonExpression as jsonExpression, index$1_literal as literal, index$1_logicalExpression as logicalExpression, index$1_memberExpression as memberExpression, index$1_newExpression as newExpression, index$1_objectExpression as objectExpression, index$1_objectPattern as objectPattern, index$1_program as program, index$1_property as property, index$1_restElement as restElement, index$1_returnStatement as returnStatement, index$1_spreadElement as spreadElement, index$1_switchCase as switchCase, index$1_switchStatement as switchStatement, index$1_templateElement as templateElement, index$1_templateLiteral as templateLiteral, index$1_throwStatement as throwStatement, index$1_tryStatement as tryStatement, index$1_unaryExpression as unaryExpression, index$1_updateExpression as updateExpression, index$1_variableDeclaration as variableDeclaration, index$1_variableDeclarator as variableDeclarator, index$1_whileStatement as whileStatement };
|
|
1005
|
-
}
|
|
1006
|
-
|
|
1007
184
|
declare const generateBuilders: (prefix?: string) => {
|
|
1008
185
|
build: (node: BaseNode, parent?: BaseNode) => any;
|
|
1009
186
|
buildFunction: (node: BaseNode) => string;
|
|
@@ -1189,6 +366,21 @@ declare function forEachChild(node: BaseNode, visit: (child: BaseNode, key: stri
|
|
|
1189
366
|
/** Os filhos diretos de `node`, na ordem da gramática. */
|
|
1190
367
|
declare function childrenOf(node: BaseNode): BaseNode[];
|
|
1191
368
|
|
|
369
|
+
/** Props → ObjectExpression, ou `null` se não há atributos. */
|
|
370
|
+
/** Opções do desugar. */
|
|
371
|
+
interface DesugarOptions {
|
|
372
|
+
/**
|
|
373
|
+
* Props de um elemento/fragment SEM atributos: `null` (convenção runtime do React,
|
|
374
|
+
* default) ou `{}` (objeto vazio). O **type-checker** usa `{}` porque o `tsc` trata
|
|
375
|
+
* "sem atributos" como objeto vazio — assim `<Card/>` (props obrigatória) erra por
|
|
376
|
+
* faltar prop, e `<div/>` (props opcionais) passa. O runtime (interpret/printer)
|
|
377
|
+
* mantém `null`.
|
|
378
|
+
*/
|
|
379
|
+
emptyPropsAsObject?: boolean;
|
|
380
|
+
}
|
|
381
|
+
/** `<Foo a={1}>{c}</Foo>` → `createElement(Foo, { a: 1 }, c)` (shallow). */
|
|
382
|
+
declare function desugarJSX(node: JSXElement | JSXFragment, opts?: DesugarOptions): CallExpression;
|
|
383
|
+
|
|
1192
384
|
/** Um nível de escopo léxico encadeado ao pai. */
|
|
1193
385
|
interface Scope<T> {
|
|
1194
386
|
readonly vars: Readonly<Record<string, T>>;
|
|
@@ -1212,4 +404,4 @@ declare function find<T = BaseNode>(node: any, match: (n: any) => boolean): T |
|
|
|
1212
404
|
declare function mutate<T = any>(node: T, match: (value: any) => boolean, modifier: (value: any) => any): T;
|
|
1213
405
|
declare function pick<T extends object, K extends keyof T>(obj: T, keys: K[]): Pick<T, K>;
|
|
1214
406
|
|
|
1215
|
-
export { AST_MARKER,
|
|
407
|
+
export { AST_MARKER, ArrayExpression, ArrayPattern, ArrowFunctionExpression, AssignmentExpression, AssignmentProperty, AwaitExpression, BaseNode, BinaryExpression, BinaryPrecedence, BlockStatement, BreakStatement, CallExpression, CatchClause, ChainExpression, ConditionalExpression, ContinueStatement, type CoreErrorCode, Directive, DoWhileStatement, EmptyStatement, ExpressionStatement, ForInStatement, ForOfStatement, ForStatement, FunctionDeclaration, FunctionExpression, Identifier, IfStatement, ImportDeclaration, ImportDefaultSpecifier, ImportNamespaceSpecifier, ImportSpecifier, JSXElement, JSXFragment, JsonExpression, Literal, LogicalExpression, MemberExpression, Mock, ModuleDeclaration, NewExpression, Node, ObjectExpression, ObjectPattern, Precedence, Program, Property, RestElement, ReturnStatement, type Scope, SimpleCallExpression, SpreadElement, SwitchCase, SwitchStatement, TSLiteError, TemplateElement, TemplateLiteral, ThrowStatement, TryStatement, UnaryExpression, UpdateExpression, VALID_AST_ENTRY_TYPES, VALID_OBJECT_KEY, type ValidAstEntryType, VariableDeclaration, VariableDeclarator, VisitorKeys, WhileStatement, childScope, childrenOf, desugarJSX, find, forEachChild, generateBuilders, index as guards, invalidAstEntryError, isObject, isValidAstEntryType, lookup, mutate, pick, rootScope, visibleNames, walk };
|