@wevu/compiler 7.1.3 → 7.2.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/index.d.mts +1652 -93
- package/dist/index.mjs +16 -14
- package/dist/pageDeclaration/public.d.mts +2 -0
- package/dist/pageDeclaration/public.mjs +1 -0
- package/dist/public-DEO6JWFi.d.mts +16 -0
- package/package.json +20 -6
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
+
import { n as StaticRouteValue, t as StaticPageDeclaration } from "./public-DEO6JWFi.mjs";
|
|
1
2
|
import { WevuBindingUpdateMode, WevuBindingUpdateMode as WevuBindingUpdateMode$1, WevuRuntimeBindingManifestV1, WevuRuntimeBindingRecordV1 } from "@weapp-core/constants";
|
|
2
|
-
import { MpPlatform } from "@weapp-core/shared";
|
|
3
|
-
import * as t from "@weapp-vite/ast/babelTypes";
|
|
4
|
-
import { Expression } from "@weapp-vite/ast/babelTypes";
|
|
5
3
|
import { LRUCache } from "lru-cache";
|
|
6
|
-
import { AstEngineName, AstEngineName as AstEngineName$1 } from "@weapp-vite/ast";
|
|
7
4
|
import { SFCBlock, SFCDescriptor, SFCParseResult, SFCStyleBlock } from "vue/compiler-sfc";
|
|
5
|
+
import * as t from "@weapp-vite/ast/babelTypes";
|
|
6
|
+
import { Expression, File } from "@weapp-vite/ast/babelTypes";
|
|
7
|
+
import { MpPlatform } from "@weapp-core/shared";
|
|
8
|
+
import { AstEngineName, AstEngineName as AstEngineName$1 } from "@weapp-vite/ast";
|
|
8
9
|
import "@weapp-vite/ast/babelTraverse";
|
|
9
10
|
//#region src/auto-import-components/builtin.d.ts
|
|
10
11
|
/**
|
|
@@ -193,6 +194,1640 @@ export declare const WE_VU_INTERNAL_TEMPLATE_APIS: readonly ["normalizeClass", "
|
|
|
193
194
|
*/
|
|
194
195
|
export declare function resolveWevuInternalImportModuleId(apiName: string): "virtual:weapp-vite/runtime" | "virtual:weapp-vite/runtime/reactivity" | "virtual:weapp-vite/runtime/template";
|
|
195
196
|
//#endregion
|
|
197
|
+
//#region src/plugins/utils/vueSfcBlockSrc.d.ts
|
|
198
|
+
/**
|
|
199
|
+
* 解析 SFC block `src` 的配置。
|
|
200
|
+
*/
|
|
201
|
+
interface ResolveSfcBlockSrcOptions {
|
|
202
|
+
resolveId?: (source: string, importer?: string) => Promise<string | undefined>;
|
|
203
|
+
readFile?: (id: string, options?: {
|
|
204
|
+
checkMtime?: boolean;
|
|
205
|
+
}) => Promise<string>;
|
|
206
|
+
checkMtime?: boolean;
|
|
207
|
+
}
|
|
208
|
+
/**
|
|
209
|
+
* 解析 SFC 中带 `src` 的 block,并返回依赖列表。
|
|
210
|
+
*/
|
|
211
|
+
export declare function resolveSfcBlockSrc(descriptor: SFCDescriptor, filename: string, options?: ResolveSfcBlockSrcOptions): Promise<{
|
|
212
|
+
descriptor: SFCDescriptor;
|
|
213
|
+
deps: string[];
|
|
214
|
+
scriptResolvedId?: string;
|
|
215
|
+
scriptSetupResolvedId?: string;
|
|
216
|
+
templateResolvedId?: string;
|
|
217
|
+
}>;
|
|
218
|
+
//#endregion
|
|
219
|
+
//#region src/plugins/utils/vueSfc.d.ts
|
|
220
|
+
/**
|
|
221
|
+
* 读取并解析 SFC 的配置。
|
|
222
|
+
*/
|
|
223
|
+
interface ReadAndParseSfcOptions {
|
|
224
|
+
/**
|
|
225
|
+
* 直接传入源码以跳过文件读取。
|
|
226
|
+
*/
|
|
227
|
+
source?: string;
|
|
228
|
+
/**
|
|
229
|
+
* 已完成其他 parser 预处理的源码。
|
|
230
|
+
*/
|
|
231
|
+
preprocessedSource?: string;
|
|
232
|
+
/**
|
|
233
|
+
* 是否忽略空 SFC block。
|
|
234
|
+
*/
|
|
235
|
+
ignoreEmpty?: boolean;
|
|
236
|
+
/**
|
|
237
|
+
* 是否按 mtime+size 检查文件变更(dev 推荐开启)。
|
|
238
|
+
*/
|
|
239
|
+
checkMtime?: boolean;
|
|
240
|
+
/**
|
|
241
|
+
* 解析 <template>/<script>/<style> 的 src 引用。
|
|
242
|
+
*/
|
|
243
|
+
resolveSrc?: ResolveSfcBlockSrcOptions;
|
|
244
|
+
}
|
|
245
|
+
/**
|
|
246
|
+
* 预处理 `<script setup src>`,避免编译器丢失 src。
|
|
247
|
+
*/
|
|
248
|
+
export declare function preprocessScriptSetupSrc(source: string): string;
|
|
249
|
+
/**
|
|
250
|
+
* 预处理普通 `<script src>`,避免编译器丢失 src。
|
|
251
|
+
*/
|
|
252
|
+
export declare function preprocessScriptSrc(source: string): string;
|
|
253
|
+
/**
|
|
254
|
+
* 将预处理的 `<script setup src>` 恢复为真实 src。
|
|
255
|
+
*/
|
|
256
|
+
export declare function restoreScriptSetupSrc(descriptor: SFCDescriptor): void;
|
|
257
|
+
/**
|
|
258
|
+
* 将预处理的 `<script src>` 恢复为真实 src。
|
|
259
|
+
*/
|
|
260
|
+
export declare function restoreScriptSrc(descriptor: SFCDescriptor): void;
|
|
261
|
+
/**
|
|
262
|
+
* 读取并解析 SFC,支持缓存与 src 解析。
|
|
263
|
+
*/
|
|
264
|
+
export declare function readAndParseSfc(filename: string, options?: ReadAndParseSfcOptions): Promise<{
|
|
265
|
+
source: string;
|
|
266
|
+
descriptor: SFCDescriptor;
|
|
267
|
+
errors: SFCParseResult['errors'];
|
|
268
|
+
}>;
|
|
269
|
+
/**
|
|
270
|
+
* 获取 SFC 读取时是否检查 mtime 的策略。
|
|
271
|
+
*/
|
|
272
|
+
export declare function getSfcCheckMtime(config?: {
|
|
273
|
+
isDev?: boolean;
|
|
274
|
+
}): boolean;
|
|
275
|
+
//#endregion
|
|
276
|
+
//#region src/utils/sourcemap.d.ts
|
|
277
|
+
interface EncodedSourceMapLike {
|
|
278
|
+
version: number | string;
|
|
279
|
+
file?: string;
|
|
280
|
+
names: string[];
|
|
281
|
+
sourceRoot?: string;
|
|
282
|
+
sources: string[];
|
|
283
|
+
sourcesContent?: Array<string | null>;
|
|
284
|
+
mappings: string;
|
|
285
|
+
}
|
|
286
|
+
//#endregion
|
|
287
|
+
//#region ../../node_modules/.pnpm/@babel+types@8.0.6/node_modules/@babel/types/lib/index.d.ts
|
|
288
|
+
interface BaseComment {
|
|
289
|
+
value: string;
|
|
290
|
+
start?: number;
|
|
291
|
+
end?: number;
|
|
292
|
+
loc?: SourceLocation;
|
|
293
|
+
ignore?: boolean;
|
|
294
|
+
type: "CommentBlock" | "CommentLine";
|
|
295
|
+
}
|
|
296
|
+
interface Position {
|
|
297
|
+
line: number;
|
|
298
|
+
column: number;
|
|
299
|
+
index: number;
|
|
300
|
+
}
|
|
301
|
+
interface CommentBlock extends BaseComment {
|
|
302
|
+
type: "CommentBlock";
|
|
303
|
+
}
|
|
304
|
+
interface CommentLine extends BaseComment {
|
|
305
|
+
type: "CommentLine";
|
|
306
|
+
}
|
|
307
|
+
type Comment = CommentBlock | CommentLine;
|
|
308
|
+
interface SourceLocation {
|
|
309
|
+
start: Position;
|
|
310
|
+
end: Position;
|
|
311
|
+
filename: string | undefined;
|
|
312
|
+
identifierName: string | undefined | null;
|
|
313
|
+
}
|
|
314
|
+
interface BaseNode {
|
|
315
|
+
leadingComments?: Comment[] | null;
|
|
316
|
+
innerComments?: Comment[] | null;
|
|
317
|
+
trailingComments?: Comment[] | null;
|
|
318
|
+
start?: number | null;
|
|
319
|
+
end?: number | null;
|
|
320
|
+
loc?: SourceLocation | null;
|
|
321
|
+
range?: [number, number];
|
|
322
|
+
extra?: Record<string, unknown>;
|
|
323
|
+
}
|
|
324
|
+
interface ArrayExpression extends BaseNode {
|
|
325
|
+
type: "ArrayExpression";
|
|
326
|
+
elements: (null | Expression$1 | SpreadElement)[];
|
|
327
|
+
}
|
|
328
|
+
interface AssignmentExpression extends BaseNode {
|
|
329
|
+
type: "AssignmentExpression";
|
|
330
|
+
operator: "=" | "+=" | "-=" | "/=" | "%=" | "*=" | "**=" | "&=" | "|=" | ">>=" | ">>>=" | "<<=" | "^=" | "||=" | "&&=" | "??=";
|
|
331
|
+
left: Identifier | MemberExpression | OptionalMemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
332
|
+
right: Expression$1;
|
|
333
|
+
}
|
|
334
|
+
interface BinaryExpressionIn extends BaseNode {
|
|
335
|
+
type: "BinaryExpression";
|
|
336
|
+
right: Expression$1;
|
|
337
|
+
operator: "in";
|
|
338
|
+
left: Expression$1 | PrivateName;
|
|
339
|
+
}
|
|
340
|
+
interface BinaryExpressionNotIn extends BaseNode {
|
|
341
|
+
type: "BinaryExpression";
|
|
342
|
+
right: Expression$1;
|
|
343
|
+
operator: "+" | "-" | "/" | "%" | "*" | "**" | "&" | "|" | ">>" | ">>>" | "<<" | "^" | "==" | "===" | "!=" | "!==" | "instanceof" | ">" | "<" | ">=" | "<=" | "|>";
|
|
344
|
+
left: Expression$1;
|
|
345
|
+
}
|
|
346
|
+
type BinaryExpression = BinaryExpressionIn | BinaryExpressionNotIn;
|
|
347
|
+
interface InterpreterDirective extends BaseNode {
|
|
348
|
+
type: "InterpreterDirective";
|
|
349
|
+
value: string;
|
|
350
|
+
}
|
|
351
|
+
interface Directive extends BaseNode {
|
|
352
|
+
type: "Directive";
|
|
353
|
+
value: DirectiveLiteral;
|
|
354
|
+
}
|
|
355
|
+
interface DirectiveLiteral extends BaseNode {
|
|
356
|
+
type: "DirectiveLiteral";
|
|
357
|
+
value: string;
|
|
358
|
+
}
|
|
359
|
+
interface BlockStatement extends BaseNode {
|
|
360
|
+
type: "BlockStatement";
|
|
361
|
+
body: Statement[];
|
|
362
|
+
directives: Directive[];
|
|
363
|
+
}
|
|
364
|
+
interface BreakStatement extends BaseNode {
|
|
365
|
+
type: "BreakStatement";
|
|
366
|
+
label?: Identifier | null;
|
|
367
|
+
}
|
|
368
|
+
interface CallExpression extends BaseNode {
|
|
369
|
+
type: "CallExpression";
|
|
370
|
+
callee: Expression$1 | Super | Import | V8IntrinsicIdentifier;
|
|
371
|
+
arguments: (Expression$1 | SpreadElement | ArgumentPlaceholder)[];
|
|
372
|
+
typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
373
|
+
}
|
|
374
|
+
interface CatchClause extends BaseNode {
|
|
375
|
+
type: "CatchClause";
|
|
376
|
+
param?: Identifier | ArrayPattern | ObjectPattern | null;
|
|
377
|
+
body: BlockStatement;
|
|
378
|
+
}
|
|
379
|
+
interface ConditionalExpression extends BaseNode {
|
|
380
|
+
type: "ConditionalExpression";
|
|
381
|
+
test: Expression$1;
|
|
382
|
+
consequent: Expression$1;
|
|
383
|
+
alternate: Expression$1;
|
|
384
|
+
}
|
|
385
|
+
interface ContinueStatement extends BaseNode {
|
|
386
|
+
type: "ContinueStatement";
|
|
387
|
+
label?: Identifier | null;
|
|
388
|
+
}
|
|
389
|
+
interface DebuggerStatement extends BaseNode {
|
|
390
|
+
type: "DebuggerStatement";
|
|
391
|
+
}
|
|
392
|
+
interface DoWhileStatement extends BaseNode {
|
|
393
|
+
type: "DoWhileStatement";
|
|
394
|
+
test: Expression$1;
|
|
395
|
+
body: Statement;
|
|
396
|
+
}
|
|
397
|
+
interface EmptyStatement extends BaseNode {
|
|
398
|
+
type: "EmptyStatement";
|
|
399
|
+
}
|
|
400
|
+
interface ExpressionStatement extends BaseNode {
|
|
401
|
+
type: "ExpressionStatement";
|
|
402
|
+
expression: Expression$1;
|
|
403
|
+
}
|
|
404
|
+
interface ForInStatement extends BaseNode {
|
|
405
|
+
type: "ForInStatement";
|
|
406
|
+
left: VariableDeclaration | Identifier | MemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
407
|
+
right: Expression$1;
|
|
408
|
+
body: Statement;
|
|
409
|
+
}
|
|
410
|
+
interface ForStatement extends BaseNode {
|
|
411
|
+
type: "ForStatement";
|
|
412
|
+
init?: VariableDeclaration | Expression$1 | null;
|
|
413
|
+
test?: Expression$1 | null;
|
|
414
|
+
update?: Expression$1 | null;
|
|
415
|
+
body: Statement;
|
|
416
|
+
}
|
|
417
|
+
interface FunctionDeclaration extends BaseNode {
|
|
418
|
+
type: "FunctionDeclaration";
|
|
419
|
+
id?: Identifier | null;
|
|
420
|
+
params: FunctionParameter[];
|
|
421
|
+
body: BlockStatement;
|
|
422
|
+
generator: boolean;
|
|
423
|
+
async: boolean;
|
|
424
|
+
declare?: boolean | null;
|
|
425
|
+
predicate?: FlowPredicate | null;
|
|
426
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
427
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
428
|
+
}
|
|
429
|
+
interface FunctionExpression extends BaseNode {
|
|
430
|
+
type: "FunctionExpression";
|
|
431
|
+
id?: Identifier | null;
|
|
432
|
+
params: FunctionParameter[];
|
|
433
|
+
body: BlockStatement;
|
|
434
|
+
generator: boolean;
|
|
435
|
+
async: boolean;
|
|
436
|
+
predicate?: FlowPredicate | null;
|
|
437
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
438
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
439
|
+
}
|
|
440
|
+
interface Identifier extends BaseNode {
|
|
441
|
+
type: "Identifier";
|
|
442
|
+
name: string;
|
|
443
|
+
decorators?: Decorator[] | null;
|
|
444
|
+
optional?: boolean | null;
|
|
445
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
446
|
+
}
|
|
447
|
+
interface IfStatement extends BaseNode {
|
|
448
|
+
type: "IfStatement";
|
|
449
|
+
test: Expression$1;
|
|
450
|
+
consequent: Statement;
|
|
451
|
+
alternate?: Statement | null;
|
|
452
|
+
}
|
|
453
|
+
interface LabeledStatement extends BaseNode {
|
|
454
|
+
type: "LabeledStatement";
|
|
455
|
+
label: Identifier;
|
|
456
|
+
body: Statement;
|
|
457
|
+
}
|
|
458
|
+
interface StringLiteral extends BaseNode {
|
|
459
|
+
type: "StringLiteral";
|
|
460
|
+
value: string;
|
|
461
|
+
}
|
|
462
|
+
interface NumericLiteral extends BaseNode {
|
|
463
|
+
type: "NumericLiteral";
|
|
464
|
+
value: number;
|
|
465
|
+
}
|
|
466
|
+
interface NullLiteral extends BaseNode {
|
|
467
|
+
type: "NullLiteral";
|
|
468
|
+
}
|
|
469
|
+
interface BooleanLiteral extends BaseNode {
|
|
470
|
+
type: "BooleanLiteral";
|
|
471
|
+
value: boolean;
|
|
472
|
+
}
|
|
473
|
+
interface RegExpLiteral extends BaseNode {
|
|
474
|
+
type: "RegExpLiteral";
|
|
475
|
+
pattern: string;
|
|
476
|
+
flags: string;
|
|
477
|
+
}
|
|
478
|
+
interface LogicalExpression extends BaseNode {
|
|
479
|
+
type: "LogicalExpression";
|
|
480
|
+
operator: "||" | "&&" | "??";
|
|
481
|
+
left: Expression$1;
|
|
482
|
+
right: Expression$1;
|
|
483
|
+
}
|
|
484
|
+
interface MemberExpressionComputed extends BaseNode {
|
|
485
|
+
type: "MemberExpression";
|
|
486
|
+
object: Expression$1 | Super;
|
|
487
|
+
computed: true;
|
|
488
|
+
property: Expression$1;
|
|
489
|
+
}
|
|
490
|
+
interface MemberExpressionNonComputed extends BaseNode {
|
|
491
|
+
type: "MemberExpression";
|
|
492
|
+
object: Expression$1 | Super;
|
|
493
|
+
computed: false;
|
|
494
|
+
property: Identifier | PrivateName;
|
|
495
|
+
}
|
|
496
|
+
type MemberExpression = MemberExpressionComputed | MemberExpressionNonComputed;
|
|
497
|
+
interface NewExpression extends BaseNode {
|
|
498
|
+
type: "NewExpression";
|
|
499
|
+
callee: Expression$1 | V8IntrinsicIdentifier;
|
|
500
|
+
arguments: (Expression$1 | SpreadElement | ArgumentPlaceholder)[];
|
|
501
|
+
typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
502
|
+
}
|
|
503
|
+
interface Program extends BaseNode {
|
|
504
|
+
type: "Program";
|
|
505
|
+
body: Statement[];
|
|
506
|
+
directives: Directive[];
|
|
507
|
+
sourceType: "script" | "module";
|
|
508
|
+
interpreter?: InterpreterDirective | null;
|
|
509
|
+
}
|
|
510
|
+
interface ObjectExpression extends BaseNode {
|
|
511
|
+
type: "ObjectExpression";
|
|
512
|
+
properties: (ObjectMethod | ObjectProperty | SpreadElement)[];
|
|
513
|
+
}
|
|
514
|
+
interface ObjectMethodComputed extends BaseNode {
|
|
515
|
+
type: "ObjectMethod";
|
|
516
|
+
kind: "method" | "get" | "set";
|
|
517
|
+
params: FunctionParameter[];
|
|
518
|
+
body: BlockStatement;
|
|
519
|
+
generator: boolean;
|
|
520
|
+
async: boolean;
|
|
521
|
+
decorators?: Decorator[] | null;
|
|
522
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
523
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
524
|
+
computed: true;
|
|
525
|
+
key: Expression$1;
|
|
526
|
+
}
|
|
527
|
+
interface ObjectMethodNonComputed extends BaseNode {
|
|
528
|
+
type: "ObjectMethod";
|
|
529
|
+
kind: "method" | "get" | "set";
|
|
530
|
+
params: FunctionParameter[];
|
|
531
|
+
body: BlockStatement;
|
|
532
|
+
generator: boolean;
|
|
533
|
+
async: boolean;
|
|
534
|
+
decorators?: Decorator[] | null;
|
|
535
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
536
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
537
|
+
computed: false;
|
|
538
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
|
|
539
|
+
}
|
|
540
|
+
type ObjectMethod = ObjectMethodComputed | ObjectMethodNonComputed;
|
|
541
|
+
interface ObjectPropertyComputed extends BaseNode {
|
|
542
|
+
type: "ObjectProperty";
|
|
543
|
+
value: Expression$1 | PatternLike;
|
|
544
|
+
shorthand: boolean;
|
|
545
|
+
decorators?: Decorator[] | null;
|
|
546
|
+
computed: true;
|
|
547
|
+
key: Expression$1;
|
|
548
|
+
}
|
|
549
|
+
interface ObjectPropertyNonComputed extends BaseNode {
|
|
550
|
+
type: "ObjectProperty";
|
|
551
|
+
value: Expression$1 | PatternLike;
|
|
552
|
+
shorthand: boolean;
|
|
553
|
+
decorators?: Decorator[] | null;
|
|
554
|
+
computed: false;
|
|
555
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
|
|
556
|
+
}
|
|
557
|
+
type ObjectProperty = ObjectPropertyComputed | ObjectPropertyNonComputed;
|
|
558
|
+
interface RestElement extends BaseNode {
|
|
559
|
+
type: "RestElement";
|
|
560
|
+
argument: Identifier | ArrayPattern | ObjectPattern | MemberExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
561
|
+
decorators?: Decorator[] | null;
|
|
562
|
+
optional?: boolean | null;
|
|
563
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
564
|
+
}
|
|
565
|
+
interface ReturnStatement extends BaseNode {
|
|
566
|
+
type: "ReturnStatement";
|
|
567
|
+
argument?: Expression$1 | null;
|
|
568
|
+
}
|
|
569
|
+
interface SequenceExpression extends BaseNode {
|
|
570
|
+
type: "SequenceExpression";
|
|
571
|
+
expressions: Expression$1[];
|
|
572
|
+
}
|
|
573
|
+
interface ParenthesizedExpression extends BaseNode {
|
|
574
|
+
type: "ParenthesizedExpression";
|
|
575
|
+
expression: Expression$1;
|
|
576
|
+
}
|
|
577
|
+
interface SwitchCase extends BaseNode {
|
|
578
|
+
type: "SwitchCase";
|
|
579
|
+
test?: Expression$1 | null;
|
|
580
|
+
consequent: Statement[];
|
|
581
|
+
}
|
|
582
|
+
interface SwitchStatement extends BaseNode {
|
|
583
|
+
type: "SwitchStatement";
|
|
584
|
+
discriminant: Expression$1;
|
|
585
|
+
cases: SwitchCase[];
|
|
586
|
+
}
|
|
587
|
+
interface ThisExpression extends BaseNode {
|
|
588
|
+
type: "ThisExpression";
|
|
589
|
+
}
|
|
590
|
+
interface ThrowStatement extends BaseNode {
|
|
591
|
+
type: "ThrowStatement";
|
|
592
|
+
argument: Expression$1;
|
|
593
|
+
}
|
|
594
|
+
interface TryStatement extends BaseNode {
|
|
595
|
+
type: "TryStatement";
|
|
596
|
+
block: BlockStatement;
|
|
597
|
+
handler?: CatchClause | null;
|
|
598
|
+
finalizer?: BlockStatement | null;
|
|
599
|
+
}
|
|
600
|
+
interface UnaryExpression extends BaseNode {
|
|
601
|
+
type: "UnaryExpression";
|
|
602
|
+
operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof";
|
|
603
|
+
argument: Expression$1;
|
|
604
|
+
prefix: boolean;
|
|
605
|
+
}
|
|
606
|
+
interface UpdateExpression extends BaseNode {
|
|
607
|
+
type: "UpdateExpression";
|
|
608
|
+
operator: "++" | "--";
|
|
609
|
+
argument: Identifier | MemberExpression;
|
|
610
|
+
prefix: boolean;
|
|
611
|
+
}
|
|
612
|
+
interface VariableDeclaration extends BaseNode {
|
|
613
|
+
type: "VariableDeclaration";
|
|
614
|
+
kind: "var" | "let" | "const" | "using" | "await using";
|
|
615
|
+
declarations: VariableDeclarator[];
|
|
616
|
+
declare?: boolean | null;
|
|
617
|
+
}
|
|
618
|
+
interface VariableDeclarator extends BaseNode {
|
|
619
|
+
type: "VariableDeclarator";
|
|
620
|
+
id: Identifier | ArrayPattern | ObjectPattern | VoidPattern;
|
|
621
|
+
init?: Expression$1 | null;
|
|
622
|
+
definite?: boolean | null;
|
|
623
|
+
}
|
|
624
|
+
interface WhileStatement extends BaseNode {
|
|
625
|
+
type: "WhileStatement";
|
|
626
|
+
test: Expression$1;
|
|
627
|
+
body: Statement;
|
|
628
|
+
}
|
|
629
|
+
interface WithStatement extends BaseNode {
|
|
630
|
+
type: "WithStatement";
|
|
631
|
+
object: Expression$1;
|
|
632
|
+
body: Statement;
|
|
633
|
+
}
|
|
634
|
+
interface AssignmentPattern extends BaseNode {
|
|
635
|
+
type: "AssignmentPattern";
|
|
636
|
+
left: Identifier | ObjectPattern | ArrayPattern | MemberExpression | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
637
|
+
right: Expression$1;
|
|
638
|
+
decorators?: Decorator[] | null;
|
|
639
|
+
optional?: boolean | null;
|
|
640
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
641
|
+
}
|
|
642
|
+
interface ArrayPattern extends BaseNode {
|
|
643
|
+
type: "ArrayPattern";
|
|
644
|
+
elements: (null | PatternLike)[];
|
|
645
|
+
decorators?: Decorator[] | null;
|
|
646
|
+
optional?: boolean | null;
|
|
647
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
648
|
+
}
|
|
649
|
+
interface ArrowFunctionExpression extends BaseNode {
|
|
650
|
+
type: "ArrowFunctionExpression";
|
|
651
|
+
params: FunctionParameter[];
|
|
652
|
+
body: BlockStatement | Expression$1;
|
|
653
|
+
async: boolean;
|
|
654
|
+
expression?: boolean | null;
|
|
655
|
+
generator?: boolean | null;
|
|
656
|
+
predicate?: FlowPredicate | null;
|
|
657
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
658
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
659
|
+
}
|
|
660
|
+
interface ClassBody extends BaseNode {
|
|
661
|
+
type: "ClassBody";
|
|
662
|
+
body: (ClassMethod | ClassPrivateMethod | ClassProperty | ClassPrivateProperty | ClassAccessorProperty | TSDeclareMethod | TSIndexSignature | StaticBlock)[];
|
|
663
|
+
}
|
|
664
|
+
interface ClassExpression extends BaseNode {
|
|
665
|
+
type: "ClassExpression";
|
|
666
|
+
id?: Identifier | null;
|
|
667
|
+
superClass?: Expression$1 | null;
|
|
668
|
+
body: ClassBody;
|
|
669
|
+
decorators?: Decorator[] | null;
|
|
670
|
+
implements?: (TSClassImplements | ClassImplements)[] | null;
|
|
671
|
+
mixins?: InterfaceExtends | null;
|
|
672
|
+
superTypeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
673
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
674
|
+
}
|
|
675
|
+
interface ClassDeclaration extends BaseNode {
|
|
676
|
+
type: "ClassDeclaration";
|
|
677
|
+
id?: Identifier | null;
|
|
678
|
+
superClass?: Expression$1 | null;
|
|
679
|
+
body: ClassBody;
|
|
680
|
+
decorators?: Decorator[] | null;
|
|
681
|
+
abstract?: boolean | null;
|
|
682
|
+
declare?: boolean | null;
|
|
683
|
+
implements?: (TSClassImplements | ClassImplements)[] | null;
|
|
684
|
+
mixins?: InterfaceExtends | null;
|
|
685
|
+
superTypeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
686
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
687
|
+
}
|
|
688
|
+
interface ExportAllDeclaration extends BaseNode {
|
|
689
|
+
type: "ExportAllDeclaration";
|
|
690
|
+
source: StringLiteral;
|
|
691
|
+
attributes?: ImportAttribute[] | null;
|
|
692
|
+
exportKind?: "type" | "value" | null;
|
|
693
|
+
}
|
|
694
|
+
interface ExportDefaultDeclaration extends BaseNode {
|
|
695
|
+
type: "ExportDefaultDeclaration";
|
|
696
|
+
declaration: FunctionDeclaration | ClassDeclaration | Expression$1 | TSDeclareFunction | TSInterfaceDeclaration | EnumDeclaration;
|
|
697
|
+
exportKind?: "value" | null;
|
|
698
|
+
}
|
|
699
|
+
interface ExportNamedDeclaration extends BaseNode {
|
|
700
|
+
type: "ExportNamedDeclaration";
|
|
701
|
+
declaration?: VariableDeclaration | FunctionDeclaration | ClassDeclaration | TSDeclareFunction | TSEnumDeclaration | TSImportEqualsDeclaration | TSInterfaceDeclaration | TSModuleDeclaration | TSTypeAliasDeclaration | EnumDeclaration | InterfaceDeclaration | OpaqueType | TypeAlias | null;
|
|
702
|
+
specifiers: (ExportSpecifier | ExportDefaultSpecifier | ExportNamespaceSpecifier)[];
|
|
703
|
+
source?: StringLiteral | null;
|
|
704
|
+
attributes?: ImportAttribute[] | null;
|
|
705
|
+
exportKind?: "type" | "value" | null;
|
|
706
|
+
}
|
|
707
|
+
interface ExportSpecifier extends BaseNode {
|
|
708
|
+
type: "ExportSpecifier";
|
|
709
|
+
local: Identifier | StringLiteral;
|
|
710
|
+
exported: Identifier | StringLiteral;
|
|
711
|
+
exportKind?: "type" | "value" | null;
|
|
712
|
+
}
|
|
713
|
+
interface ForOfStatement extends BaseNode {
|
|
714
|
+
type: "ForOfStatement";
|
|
715
|
+
left: VariableDeclaration | Identifier | MemberExpression | ArrayPattern | ObjectPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
716
|
+
right: Expression$1;
|
|
717
|
+
body: Statement;
|
|
718
|
+
await: boolean;
|
|
719
|
+
}
|
|
720
|
+
interface ImportDeclaration extends BaseNode {
|
|
721
|
+
type: "ImportDeclaration";
|
|
722
|
+
specifiers: (ImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier)[];
|
|
723
|
+
source: StringLiteral;
|
|
724
|
+
attributes?: ImportAttribute[] | null;
|
|
725
|
+
importKind?: "type" | "typeof" | "value" | null;
|
|
726
|
+
module?: boolean | null;
|
|
727
|
+
phase?: "source" | "defer" | null;
|
|
728
|
+
}
|
|
729
|
+
interface ImportDefaultSpecifier extends BaseNode {
|
|
730
|
+
type: "ImportDefaultSpecifier";
|
|
731
|
+
local: Identifier;
|
|
732
|
+
}
|
|
733
|
+
interface ImportNamespaceSpecifier extends BaseNode {
|
|
734
|
+
type: "ImportNamespaceSpecifier";
|
|
735
|
+
local: Identifier;
|
|
736
|
+
}
|
|
737
|
+
interface ImportSpecifier extends BaseNode {
|
|
738
|
+
type: "ImportSpecifier";
|
|
739
|
+
local: Identifier;
|
|
740
|
+
imported: Identifier | StringLiteral;
|
|
741
|
+
importKind?: "type" | "typeof" | "value" | null;
|
|
742
|
+
}
|
|
743
|
+
interface MetaProperty extends BaseNode {
|
|
744
|
+
type: "MetaProperty";
|
|
745
|
+
meta: Identifier;
|
|
746
|
+
property: Identifier;
|
|
747
|
+
}
|
|
748
|
+
interface ClassMethodComputed extends BaseNode {
|
|
749
|
+
type: "ClassMethod";
|
|
750
|
+
kind: "get" | "set" | "method" | "constructor";
|
|
751
|
+
params: (FunctionParameter | TSParameterProperty)[];
|
|
752
|
+
body: BlockStatement;
|
|
753
|
+
static: boolean;
|
|
754
|
+
generator: boolean;
|
|
755
|
+
async: boolean;
|
|
756
|
+
abstract?: boolean | null;
|
|
757
|
+
access?: "public" | "private" | "protected" | null;
|
|
758
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
759
|
+
decorators?: Decorator[] | null;
|
|
760
|
+
optional?: boolean | null;
|
|
761
|
+
override?: boolean | null;
|
|
762
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
763
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
764
|
+
computed: true;
|
|
765
|
+
key: Expression$1;
|
|
766
|
+
}
|
|
767
|
+
interface ClassMethodNonComputed extends BaseNode {
|
|
768
|
+
type: "ClassMethod";
|
|
769
|
+
kind: "get" | "set" | "method" | "constructor";
|
|
770
|
+
params: (FunctionParameter | TSParameterProperty)[];
|
|
771
|
+
body: BlockStatement;
|
|
772
|
+
static: boolean;
|
|
773
|
+
generator: boolean;
|
|
774
|
+
async: boolean;
|
|
775
|
+
abstract?: boolean | null;
|
|
776
|
+
access?: "public" | "private" | "protected" | null;
|
|
777
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
778
|
+
decorators?: Decorator[] | null;
|
|
779
|
+
optional?: boolean | null;
|
|
780
|
+
override?: boolean | null;
|
|
781
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
782
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
783
|
+
computed: false;
|
|
784
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
|
|
785
|
+
}
|
|
786
|
+
type ClassMethod = ClassMethodComputed | ClassMethodNonComputed;
|
|
787
|
+
interface ObjectPattern extends BaseNode {
|
|
788
|
+
type: "ObjectPattern";
|
|
789
|
+
properties: (RestElement | ObjectProperty)[];
|
|
790
|
+
decorators?: Decorator[] | null;
|
|
791
|
+
optional?: boolean | null;
|
|
792
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
793
|
+
}
|
|
794
|
+
interface SpreadElement extends BaseNode {
|
|
795
|
+
type: "SpreadElement";
|
|
796
|
+
argument: Expression$1;
|
|
797
|
+
}
|
|
798
|
+
interface Super extends BaseNode {
|
|
799
|
+
type: "Super";
|
|
800
|
+
}
|
|
801
|
+
interface TaggedTemplateExpression extends BaseNode {
|
|
802
|
+
type: "TaggedTemplateExpression";
|
|
803
|
+
tag: Expression$1;
|
|
804
|
+
quasi: TemplateLiteral;
|
|
805
|
+
typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
806
|
+
}
|
|
807
|
+
interface TemplateElement extends BaseNode {
|
|
808
|
+
type: "TemplateElement";
|
|
809
|
+
value: {
|
|
810
|
+
raw: string;
|
|
811
|
+
cooked?: string | null;
|
|
812
|
+
};
|
|
813
|
+
tail: boolean;
|
|
814
|
+
}
|
|
815
|
+
interface TemplateLiteral extends BaseNode {
|
|
816
|
+
type: "TemplateLiteral";
|
|
817
|
+
quasis: TemplateElement[];
|
|
818
|
+
expressions: (Expression$1 | TSType)[];
|
|
819
|
+
}
|
|
820
|
+
interface YieldExpression extends BaseNode {
|
|
821
|
+
type: "YieldExpression";
|
|
822
|
+
argument?: Expression$1 | null;
|
|
823
|
+
delegate: boolean;
|
|
824
|
+
}
|
|
825
|
+
interface AwaitExpression extends BaseNode {
|
|
826
|
+
type: "AwaitExpression";
|
|
827
|
+
argument: Expression$1;
|
|
828
|
+
}
|
|
829
|
+
interface ImportExpression extends BaseNode {
|
|
830
|
+
type: "ImportExpression";
|
|
831
|
+
source: Expression$1;
|
|
832
|
+
options?: Expression$1 | null;
|
|
833
|
+
phase?: "source" | "defer" | null;
|
|
834
|
+
}
|
|
835
|
+
interface Import extends BaseNode {
|
|
836
|
+
type: "Import";
|
|
837
|
+
}
|
|
838
|
+
interface BigIntLiteral extends BaseNode {
|
|
839
|
+
type: "BigIntLiteral";
|
|
840
|
+
value: bigint;
|
|
841
|
+
}
|
|
842
|
+
interface ExportNamespaceSpecifier extends BaseNode {
|
|
843
|
+
type: "ExportNamespaceSpecifier";
|
|
844
|
+
exported: Identifier | StringLiteral;
|
|
845
|
+
}
|
|
846
|
+
interface OptionalMemberExpressionComputed extends BaseNode {
|
|
847
|
+
type: "OptionalMemberExpression";
|
|
848
|
+
object: Expression$1;
|
|
849
|
+
optional: boolean;
|
|
850
|
+
computed: true;
|
|
851
|
+
property: Expression$1;
|
|
852
|
+
}
|
|
853
|
+
interface OptionalMemberExpressionNonComputed extends BaseNode {
|
|
854
|
+
type: "OptionalMemberExpression";
|
|
855
|
+
object: Expression$1;
|
|
856
|
+
optional: boolean;
|
|
857
|
+
computed: false;
|
|
858
|
+
property: Identifier | PrivateName;
|
|
859
|
+
}
|
|
860
|
+
type OptionalMemberExpression = OptionalMemberExpressionComputed | OptionalMemberExpressionNonComputed;
|
|
861
|
+
interface OptionalCallExpression extends BaseNode {
|
|
862
|
+
type: "OptionalCallExpression";
|
|
863
|
+
callee: Expression$1;
|
|
864
|
+
arguments: (Expression$1 | SpreadElement | ArgumentPlaceholder)[];
|
|
865
|
+
optional: boolean;
|
|
866
|
+
typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
867
|
+
}
|
|
868
|
+
interface ClassPropertyComputed extends BaseNode {
|
|
869
|
+
type: "ClassProperty";
|
|
870
|
+
value?: Expression$1 | null;
|
|
871
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
872
|
+
decorators?: Decorator[] | null;
|
|
873
|
+
static: boolean;
|
|
874
|
+
abstract?: boolean | null;
|
|
875
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
876
|
+
declare?: boolean | null;
|
|
877
|
+
definite?: boolean | null;
|
|
878
|
+
optional?: boolean | null;
|
|
879
|
+
override?: boolean | null;
|
|
880
|
+
readonly?: boolean | null;
|
|
881
|
+
variance?: Variance | null;
|
|
882
|
+
computed: true;
|
|
883
|
+
key: Expression$1;
|
|
884
|
+
}
|
|
885
|
+
interface ClassPropertyNonComputed extends BaseNode {
|
|
886
|
+
type: "ClassProperty";
|
|
887
|
+
value?: Expression$1 | null;
|
|
888
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
889
|
+
decorators?: Decorator[] | null;
|
|
890
|
+
static: boolean;
|
|
891
|
+
abstract?: boolean | null;
|
|
892
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
893
|
+
declare?: boolean | null;
|
|
894
|
+
definite?: boolean | null;
|
|
895
|
+
optional?: boolean | null;
|
|
896
|
+
override?: boolean | null;
|
|
897
|
+
readonly?: boolean | null;
|
|
898
|
+
variance?: Variance | null;
|
|
899
|
+
computed: false;
|
|
900
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral;
|
|
901
|
+
}
|
|
902
|
+
type ClassProperty = ClassPropertyComputed | ClassPropertyNonComputed;
|
|
903
|
+
interface ClassPrivateProperty extends BaseNode {
|
|
904
|
+
type: "ClassPrivateProperty";
|
|
905
|
+
key: PrivateName;
|
|
906
|
+
value?: Expression$1 | null;
|
|
907
|
+
decorators?: Decorator[] | null;
|
|
908
|
+
static: boolean;
|
|
909
|
+
definite?: boolean | null;
|
|
910
|
+
optional?: boolean | null;
|
|
911
|
+
readonly?: boolean | null;
|
|
912
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
913
|
+
variance?: Variance | null;
|
|
914
|
+
}
|
|
915
|
+
interface ClassPrivateMethod extends BaseNode {
|
|
916
|
+
type: "ClassPrivateMethod";
|
|
917
|
+
kind: "get" | "set" | "method";
|
|
918
|
+
key: PrivateName;
|
|
919
|
+
params: (FunctionParameter | TSParameterProperty)[];
|
|
920
|
+
body: BlockStatement;
|
|
921
|
+
static: boolean;
|
|
922
|
+
abstract?: boolean | null;
|
|
923
|
+
access?: "public" | "private" | "protected" | null;
|
|
924
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
925
|
+
async: boolean;
|
|
926
|
+
computed: boolean;
|
|
927
|
+
decorators?: Decorator[] | null;
|
|
928
|
+
generator: boolean;
|
|
929
|
+
optional?: boolean | null;
|
|
930
|
+
override?: boolean | null;
|
|
931
|
+
returnType?: TypeAnnotation | TSTypeAnnotation | null;
|
|
932
|
+
typeParameters?: TypeParameterDeclaration | TSTypeParameterDeclaration | null;
|
|
933
|
+
}
|
|
934
|
+
interface PrivateName extends BaseNode {
|
|
935
|
+
type: "PrivateName";
|
|
936
|
+
id: Identifier;
|
|
937
|
+
}
|
|
938
|
+
interface StaticBlock extends BaseNode {
|
|
939
|
+
type: "StaticBlock";
|
|
940
|
+
body: Statement[];
|
|
941
|
+
}
|
|
942
|
+
interface ImportAttribute extends BaseNode {
|
|
943
|
+
type: "ImportAttribute";
|
|
944
|
+
key: Identifier | StringLiteral;
|
|
945
|
+
value: StringLiteral;
|
|
946
|
+
}
|
|
947
|
+
interface AnyTypeAnnotation extends BaseNode {
|
|
948
|
+
type: "AnyTypeAnnotation";
|
|
949
|
+
}
|
|
950
|
+
interface ArrayTypeAnnotation extends BaseNode {
|
|
951
|
+
type: "ArrayTypeAnnotation";
|
|
952
|
+
elementType: FlowType;
|
|
953
|
+
}
|
|
954
|
+
interface BooleanTypeAnnotation extends BaseNode {
|
|
955
|
+
type: "BooleanTypeAnnotation";
|
|
956
|
+
}
|
|
957
|
+
interface BooleanLiteralTypeAnnotation extends BaseNode {
|
|
958
|
+
type: "BooleanLiteralTypeAnnotation";
|
|
959
|
+
value: boolean;
|
|
960
|
+
}
|
|
961
|
+
interface NullLiteralTypeAnnotation extends BaseNode {
|
|
962
|
+
type: "NullLiteralTypeAnnotation";
|
|
963
|
+
}
|
|
964
|
+
interface ClassImplements extends BaseNode {
|
|
965
|
+
type: "ClassImplements";
|
|
966
|
+
id: Identifier;
|
|
967
|
+
typeParameters?: TypeParameterInstantiation | null;
|
|
968
|
+
}
|
|
969
|
+
interface DeclareClass extends BaseNode {
|
|
970
|
+
type: "DeclareClass";
|
|
971
|
+
id: Identifier;
|
|
972
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
973
|
+
extends?: InterfaceExtends[] | null;
|
|
974
|
+
body: ObjectTypeAnnotation;
|
|
975
|
+
implements?: ClassImplements[] | null;
|
|
976
|
+
mixins?: InterfaceExtends[] | null;
|
|
977
|
+
}
|
|
978
|
+
interface DeclareFunction extends BaseNode {
|
|
979
|
+
type: "DeclareFunction";
|
|
980
|
+
id: Identifier;
|
|
981
|
+
predicate?: FlowPredicate | null;
|
|
982
|
+
}
|
|
983
|
+
interface DeclareInterface extends BaseNode {
|
|
984
|
+
type: "DeclareInterface";
|
|
985
|
+
id: Identifier;
|
|
986
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
987
|
+
extends?: InterfaceExtends[] | null;
|
|
988
|
+
body: ObjectTypeAnnotation;
|
|
989
|
+
}
|
|
990
|
+
interface DeclareModule extends BaseNode {
|
|
991
|
+
type: "DeclareModule";
|
|
992
|
+
id: Identifier | StringLiteral;
|
|
993
|
+
body: BlockStatement;
|
|
994
|
+
kind?: "CommonJS" | "ES" | null;
|
|
995
|
+
}
|
|
996
|
+
interface DeclareModuleExports extends BaseNode {
|
|
997
|
+
type: "DeclareModuleExports";
|
|
998
|
+
typeAnnotation: TypeAnnotation;
|
|
999
|
+
}
|
|
1000
|
+
interface DeclareTypeAlias extends BaseNode {
|
|
1001
|
+
type: "DeclareTypeAlias";
|
|
1002
|
+
id: Identifier;
|
|
1003
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1004
|
+
right: FlowType;
|
|
1005
|
+
}
|
|
1006
|
+
interface DeclareOpaqueType extends BaseNode {
|
|
1007
|
+
type: "DeclareOpaqueType";
|
|
1008
|
+
id: Identifier;
|
|
1009
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1010
|
+
supertype?: FlowType | null;
|
|
1011
|
+
impltype?: FlowType | null;
|
|
1012
|
+
}
|
|
1013
|
+
interface DeclareVariable extends BaseNode {
|
|
1014
|
+
type: "DeclareVariable";
|
|
1015
|
+
id: Identifier;
|
|
1016
|
+
}
|
|
1017
|
+
interface DeclareExportDeclaration extends BaseNode {
|
|
1018
|
+
type: "DeclareExportDeclaration";
|
|
1019
|
+
declaration?: Flow | null;
|
|
1020
|
+
specifiers?: (ExportSpecifier | ExportNamespaceSpecifier)[] | null;
|
|
1021
|
+
source?: StringLiteral | null;
|
|
1022
|
+
attributes?: ImportAttribute[] | null;
|
|
1023
|
+
default?: boolean | null;
|
|
1024
|
+
}
|
|
1025
|
+
interface DeclareExportAllDeclaration extends BaseNode {
|
|
1026
|
+
type: "DeclareExportAllDeclaration";
|
|
1027
|
+
source: StringLiteral;
|
|
1028
|
+
attributes?: ImportAttribute[] | null;
|
|
1029
|
+
exportKind?: "type" | "value" | null;
|
|
1030
|
+
}
|
|
1031
|
+
interface DeclaredPredicate extends BaseNode {
|
|
1032
|
+
type: "DeclaredPredicate";
|
|
1033
|
+
value: Expression$1;
|
|
1034
|
+
}
|
|
1035
|
+
interface ExistsTypeAnnotation extends BaseNode {
|
|
1036
|
+
type: "ExistsTypeAnnotation";
|
|
1037
|
+
}
|
|
1038
|
+
interface FunctionTypeAnnotation extends BaseNode {
|
|
1039
|
+
type: "FunctionTypeAnnotation";
|
|
1040
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1041
|
+
params: FunctionTypeParam[];
|
|
1042
|
+
rest?: FunctionTypeParam | null;
|
|
1043
|
+
returnType: FlowType;
|
|
1044
|
+
this?: FunctionTypeParam | null;
|
|
1045
|
+
}
|
|
1046
|
+
interface FunctionTypeParam extends BaseNode {
|
|
1047
|
+
type: "FunctionTypeParam";
|
|
1048
|
+
name?: Identifier | null;
|
|
1049
|
+
typeAnnotation: FlowType;
|
|
1050
|
+
optional?: boolean | null;
|
|
1051
|
+
}
|
|
1052
|
+
interface GenericTypeAnnotation extends BaseNode {
|
|
1053
|
+
type: "GenericTypeAnnotation";
|
|
1054
|
+
id: Identifier | QualifiedTypeIdentifier;
|
|
1055
|
+
typeParameters?: TypeParameterInstantiation | null;
|
|
1056
|
+
}
|
|
1057
|
+
interface InferredPredicate extends BaseNode {
|
|
1058
|
+
type: "InferredPredicate";
|
|
1059
|
+
}
|
|
1060
|
+
interface InterfaceExtends extends BaseNode {
|
|
1061
|
+
type: "InterfaceExtends";
|
|
1062
|
+
id: Identifier | QualifiedTypeIdentifier;
|
|
1063
|
+
typeParameters?: TypeParameterInstantiation | null;
|
|
1064
|
+
}
|
|
1065
|
+
interface InterfaceDeclaration extends BaseNode {
|
|
1066
|
+
type: "InterfaceDeclaration";
|
|
1067
|
+
id: Identifier;
|
|
1068
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1069
|
+
extends?: InterfaceExtends[] | null;
|
|
1070
|
+
body: ObjectTypeAnnotation;
|
|
1071
|
+
}
|
|
1072
|
+
interface InterfaceTypeAnnotation extends BaseNode {
|
|
1073
|
+
type: "InterfaceTypeAnnotation";
|
|
1074
|
+
extends?: InterfaceExtends[] | null;
|
|
1075
|
+
body: ObjectTypeAnnotation;
|
|
1076
|
+
}
|
|
1077
|
+
interface IntersectionTypeAnnotation extends BaseNode {
|
|
1078
|
+
type: "IntersectionTypeAnnotation";
|
|
1079
|
+
types: FlowType[];
|
|
1080
|
+
}
|
|
1081
|
+
interface MixedTypeAnnotation extends BaseNode {
|
|
1082
|
+
type: "MixedTypeAnnotation";
|
|
1083
|
+
}
|
|
1084
|
+
interface EmptyTypeAnnotation extends BaseNode {
|
|
1085
|
+
type: "EmptyTypeAnnotation";
|
|
1086
|
+
}
|
|
1087
|
+
interface NullableTypeAnnotation extends BaseNode {
|
|
1088
|
+
type: "NullableTypeAnnotation";
|
|
1089
|
+
typeAnnotation: FlowType;
|
|
1090
|
+
}
|
|
1091
|
+
interface NumberLiteralTypeAnnotation extends BaseNode {
|
|
1092
|
+
type: "NumberLiteralTypeAnnotation";
|
|
1093
|
+
value: number;
|
|
1094
|
+
}
|
|
1095
|
+
interface BigIntLiteralTypeAnnotation extends BaseNode {
|
|
1096
|
+
type: "BigIntLiteralTypeAnnotation";
|
|
1097
|
+
value: bigint;
|
|
1098
|
+
}
|
|
1099
|
+
interface NumberTypeAnnotation extends BaseNode {
|
|
1100
|
+
type: "NumberTypeAnnotation";
|
|
1101
|
+
}
|
|
1102
|
+
interface ObjectTypeAnnotation extends BaseNode {
|
|
1103
|
+
type: "ObjectTypeAnnotation";
|
|
1104
|
+
properties: (ObjectTypeProperty | ObjectTypeSpreadProperty)[];
|
|
1105
|
+
indexers: ObjectTypeIndexer[];
|
|
1106
|
+
callProperties: ObjectTypeCallProperty[];
|
|
1107
|
+
internalSlots: ObjectTypeInternalSlot[];
|
|
1108
|
+
exact: boolean;
|
|
1109
|
+
inexact?: boolean | null;
|
|
1110
|
+
}
|
|
1111
|
+
interface ObjectTypeInternalSlot extends BaseNode {
|
|
1112
|
+
type: "ObjectTypeInternalSlot";
|
|
1113
|
+
id: Identifier;
|
|
1114
|
+
value: FlowType;
|
|
1115
|
+
optional: boolean;
|
|
1116
|
+
static: boolean;
|
|
1117
|
+
method: boolean;
|
|
1118
|
+
}
|
|
1119
|
+
interface ObjectTypeCallProperty extends BaseNode {
|
|
1120
|
+
type: "ObjectTypeCallProperty";
|
|
1121
|
+
value: FlowType;
|
|
1122
|
+
static: boolean;
|
|
1123
|
+
}
|
|
1124
|
+
interface ObjectTypeIndexer extends BaseNode {
|
|
1125
|
+
type: "ObjectTypeIndexer";
|
|
1126
|
+
id?: Identifier | null;
|
|
1127
|
+
key: FlowType;
|
|
1128
|
+
value: FlowType;
|
|
1129
|
+
variance?: Variance | null;
|
|
1130
|
+
static: boolean;
|
|
1131
|
+
}
|
|
1132
|
+
interface ObjectTypeProperty extends BaseNode {
|
|
1133
|
+
type: "ObjectTypeProperty";
|
|
1134
|
+
key: Identifier | StringLiteral | NumericLiteral;
|
|
1135
|
+
value: FlowType;
|
|
1136
|
+
variance?: Variance | null;
|
|
1137
|
+
kind: "init" | "get" | "set";
|
|
1138
|
+
method: boolean;
|
|
1139
|
+
optional: boolean;
|
|
1140
|
+
proto: boolean;
|
|
1141
|
+
static: boolean;
|
|
1142
|
+
}
|
|
1143
|
+
interface ObjectTypeSpreadProperty extends BaseNode {
|
|
1144
|
+
type: "ObjectTypeSpreadProperty";
|
|
1145
|
+
argument: FlowType;
|
|
1146
|
+
}
|
|
1147
|
+
interface OpaqueType extends BaseNode {
|
|
1148
|
+
type: "OpaqueType";
|
|
1149
|
+
id: Identifier;
|
|
1150
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1151
|
+
supertype?: FlowType | null;
|
|
1152
|
+
impltype: FlowType;
|
|
1153
|
+
}
|
|
1154
|
+
interface QualifiedTypeIdentifier extends BaseNode {
|
|
1155
|
+
type: "QualifiedTypeIdentifier";
|
|
1156
|
+
id: Identifier;
|
|
1157
|
+
qualification: Identifier | QualifiedTypeIdentifier;
|
|
1158
|
+
}
|
|
1159
|
+
interface StringLiteralTypeAnnotation extends BaseNode {
|
|
1160
|
+
type: "StringLiteralTypeAnnotation";
|
|
1161
|
+
value: string;
|
|
1162
|
+
}
|
|
1163
|
+
interface StringTypeAnnotation extends BaseNode {
|
|
1164
|
+
type: "StringTypeAnnotation";
|
|
1165
|
+
}
|
|
1166
|
+
interface SymbolTypeAnnotation extends BaseNode {
|
|
1167
|
+
type: "SymbolTypeAnnotation";
|
|
1168
|
+
}
|
|
1169
|
+
interface ThisTypeAnnotation extends BaseNode {
|
|
1170
|
+
type: "ThisTypeAnnotation";
|
|
1171
|
+
}
|
|
1172
|
+
interface TupleTypeAnnotation extends BaseNode {
|
|
1173
|
+
type: "TupleTypeAnnotation";
|
|
1174
|
+
types: FlowType[];
|
|
1175
|
+
}
|
|
1176
|
+
interface TypeofTypeAnnotation extends BaseNode {
|
|
1177
|
+
type: "TypeofTypeAnnotation";
|
|
1178
|
+
argument: FlowType | Identifier;
|
|
1179
|
+
}
|
|
1180
|
+
interface TypeAlias extends BaseNode {
|
|
1181
|
+
type: "TypeAlias";
|
|
1182
|
+
id: Identifier;
|
|
1183
|
+
typeParameters?: TypeParameterDeclaration | null;
|
|
1184
|
+
right: FlowType;
|
|
1185
|
+
}
|
|
1186
|
+
interface TypeAnnotation extends BaseNode {
|
|
1187
|
+
type: "TypeAnnotation";
|
|
1188
|
+
typeAnnotation: FlowType | Identifier;
|
|
1189
|
+
}
|
|
1190
|
+
interface TypeCastExpression extends BaseNode {
|
|
1191
|
+
type: "TypeCastExpression";
|
|
1192
|
+
expression: Expression$1;
|
|
1193
|
+
typeAnnotation: TypeAnnotation;
|
|
1194
|
+
}
|
|
1195
|
+
interface TypeParameter extends BaseNode {
|
|
1196
|
+
type: "TypeParameter";
|
|
1197
|
+
name: string;
|
|
1198
|
+
bound?: TypeAnnotation | null;
|
|
1199
|
+
default?: FlowType | null;
|
|
1200
|
+
variance?: Variance | null;
|
|
1201
|
+
}
|
|
1202
|
+
interface TypeParameterDeclaration extends BaseNode {
|
|
1203
|
+
type: "TypeParameterDeclaration";
|
|
1204
|
+
params: TypeParameter[];
|
|
1205
|
+
}
|
|
1206
|
+
interface TypeParameterInstantiation extends BaseNode {
|
|
1207
|
+
type: "TypeParameterInstantiation";
|
|
1208
|
+
params: FlowType[];
|
|
1209
|
+
}
|
|
1210
|
+
interface UnionTypeAnnotation extends BaseNode {
|
|
1211
|
+
type: "UnionTypeAnnotation";
|
|
1212
|
+
types: FlowType[];
|
|
1213
|
+
}
|
|
1214
|
+
interface Variance extends BaseNode {
|
|
1215
|
+
type: "Variance";
|
|
1216
|
+
kind: "minus" | "plus";
|
|
1217
|
+
}
|
|
1218
|
+
interface VoidTypeAnnotation extends BaseNode {
|
|
1219
|
+
type: "VoidTypeAnnotation";
|
|
1220
|
+
}
|
|
1221
|
+
interface EnumDeclaration extends BaseNode {
|
|
1222
|
+
type: "EnumDeclaration";
|
|
1223
|
+
id: Identifier;
|
|
1224
|
+
body: EnumBooleanBody | EnumNumberBody | EnumStringBody | EnumSymbolBody;
|
|
1225
|
+
}
|
|
1226
|
+
interface EnumBooleanBody extends BaseNode {
|
|
1227
|
+
type: "EnumBooleanBody";
|
|
1228
|
+
members: EnumBooleanMember[];
|
|
1229
|
+
explicitType: boolean;
|
|
1230
|
+
hasUnknownMembers: boolean;
|
|
1231
|
+
}
|
|
1232
|
+
interface EnumNumberBody extends BaseNode {
|
|
1233
|
+
type: "EnumNumberBody";
|
|
1234
|
+
members: EnumNumberMember[];
|
|
1235
|
+
explicitType: boolean;
|
|
1236
|
+
hasUnknownMembers: boolean;
|
|
1237
|
+
}
|
|
1238
|
+
interface EnumStringBody extends BaseNode {
|
|
1239
|
+
type: "EnumStringBody";
|
|
1240
|
+
members: (EnumStringMember | EnumDefaultedMember)[];
|
|
1241
|
+
explicitType: boolean;
|
|
1242
|
+
hasUnknownMembers: boolean;
|
|
1243
|
+
}
|
|
1244
|
+
interface EnumSymbolBody extends BaseNode {
|
|
1245
|
+
type: "EnumSymbolBody";
|
|
1246
|
+
members: EnumDefaultedMember[];
|
|
1247
|
+
hasUnknownMembers: boolean;
|
|
1248
|
+
}
|
|
1249
|
+
interface EnumBooleanMember extends BaseNode {
|
|
1250
|
+
type: "EnumBooleanMember";
|
|
1251
|
+
id: Identifier;
|
|
1252
|
+
init: BooleanLiteral;
|
|
1253
|
+
}
|
|
1254
|
+
interface EnumNumberMember extends BaseNode {
|
|
1255
|
+
type: "EnumNumberMember";
|
|
1256
|
+
id: Identifier;
|
|
1257
|
+
init: NumericLiteral;
|
|
1258
|
+
}
|
|
1259
|
+
interface EnumStringMember extends BaseNode {
|
|
1260
|
+
type: "EnumStringMember";
|
|
1261
|
+
id: Identifier;
|
|
1262
|
+
init: StringLiteral;
|
|
1263
|
+
}
|
|
1264
|
+
interface EnumDefaultedMember extends BaseNode {
|
|
1265
|
+
type: "EnumDefaultedMember";
|
|
1266
|
+
id: Identifier;
|
|
1267
|
+
}
|
|
1268
|
+
interface IndexedAccessType extends BaseNode {
|
|
1269
|
+
type: "IndexedAccessType";
|
|
1270
|
+
objectType: FlowType;
|
|
1271
|
+
indexType: FlowType;
|
|
1272
|
+
}
|
|
1273
|
+
interface OptionalIndexedAccessType extends BaseNode {
|
|
1274
|
+
type: "OptionalIndexedAccessType";
|
|
1275
|
+
objectType: FlowType;
|
|
1276
|
+
indexType: FlowType;
|
|
1277
|
+
optional: boolean;
|
|
1278
|
+
}
|
|
1279
|
+
interface JSXAttribute extends BaseNode {
|
|
1280
|
+
type: "JSXAttribute";
|
|
1281
|
+
name: JSXIdentifier | JSXNamespacedName;
|
|
1282
|
+
value?: JSXElement | JSXFragment | StringLiteral | JSXExpressionContainer | null;
|
|
1283
|
+
}
|
|
1284
|
+
interface JSXClosingElement extends BaseNode {
|
|
1285
|
+
type: "JSXClosingElement";
|
|
1286
|
+
name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
|
|
1287
|
+
}
|
|
1288
|
+
interface JSXElement extends BaseNode {
|
|
1289
|
+
type: "JSXElement";
|
|
1290
|
+
openingElement: JSXOpeningElement;
|
|
1291
|
+
closingElement?: JSXClosingElement | null;
|
|
1292
|
+
children: (JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment)[];
|
|
1293
|
+
}
|
|
1294
|
+
interface JSXEmptyExpression extends BaseNode {
|
|
1295
|
+
type: "JSXEmptyExpression";
|
|
1296
|
+
}
|
|
1297
|
+
interface JSXExpressionContainer extends BaseNode {
|
|
1298
|
+
type: "JSXExpressionContainer";
|
|
1299
|
+
expression: Expression$1 | JSXEmptyExpression;
|
|
1300
|
+
}
|
|
1301
|
+
interface JSXSpreadChild extends BaseNode {
|
|
1302
|
+
type: "JSXSpreadChild";
|
|
1303
|
+
expression: Expression$1;
|
|
1304
|
+
}
|
|
1305
|
+
interface JSXIdentifier extends BaseNode {
|
|
1306
|
+
type: "JSXIdentifier";
|
|
1307
|
+
name: string;
|
|
1308
|
+
}
|
|
1309
|
+
interface JSXMemberExpression extends BaseNode {
|
|
1310
|
+
type: "JSXMemberExpression";
|
|
1311
|
+
object: JSXMemberExpression | JSXIdentifier;
|
|
1312
|
+
property: JSXIdentifier;
|
|
1313
|
+
}
|
|
1314
|
+
interface JSXNamespacedName extends BaseNode {
|
|
1315
|
+
type: "JSXNamespacedName";
|
|
1316
|
+
namespace: JSXIdentifier;
|
|
1317
|
+
name: JSXIdentifier;
|
|
1318
|
+
}
|
|
1319
|
+
interface JSXOpeningElement extends BaseNode {
|
|
1320
|
+
type: "JSXOpeningElement";
|
|
1321
|
+
name: JSXIdentifier | JSXMemberExpression | JSXNamespacedName;
|
|
1322
|
+
attributes: (JSXAttribute | JSXSpreadAttribute)[];
|
|
1323
|
+
selfClosing: boolean;
|
|
1324
|
+
typeArguments?: TypeParameterInstantiation | TSTypeParameterInstantiation | null;
|
|
1325
|
+
}
|
|
1326
|
+
interface JSXSpreadAttribute extends BaseNode {
|
|
1327
|
+
type: "JSXSpreadAttribute";
|
|
1328
|
+
argument: Expression$1;
|
|
1329
|
+
}
|
|
1330
|
+
interface JSXText extends BaseNode {
|
|
1331
|
+
type: "JSXText";
|
|
1332
|
+
value: string;
|
|
1333
|
+
}
|
|
1334
|
+
interface JSXFragment extends BaseNode {
|
|
1335
|
+
type: "JSXFragment";
|
|
1336
|
+
openingFragment: JSXOpeningFragment;
|
|
1337
|
+
closingFragment: JSXClosingFragment;
|
|
1338
|
+
children: (JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment)[];
|
|
1339
|
+
}
|
|
1340
|
+
interface JSXOpeningFragment extends BaseNode {
|
|
1341
|
+
type: "JSXOpeningFragment";
|
|
1342
|
+
}
|
|
1343
|
+
interface JSXClosingFragment extends BaseNode {
|
|
1344
|
+
type: "JSXClosingFragment";
|
|
1345
|
+
}
|
|
1346
|
+
interface V8IntrinsicIdentifier extends BaseNode {
|
|
1347
|
+
type: "V8IntrinsicIdentifier";
|
|
1348
|
+
name: string;
|
|
1349
|
+
}
|
|
1350
|
+
interface ArgumentPlaceholder extends BaseNode {
|
|
1351
|
+
type: "ArgumentPlaceholder";
|
|
1352
|
+
}
|
|
1353
|
+
interface BindExpression extends BaseNode {
|
|
1354
|
+
type: "BindExpression";
|
|
1355
|
+
object: null | Expression$1;
|
|
1356
|
+
callee: Expression$1;
|
|
1357
|
+
}
|
|
1358
|
+
interface ClassAccessorPropertyComputed extends BaseNode {
|
|
1359
|
+
type: "ClassAccessorProperty";
|
|
1360
|
+
value?: Expression$1 | null;
|
|
1361
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
1362
|
+
decorators?: Decorator[] | null;
|
|
1363
|
+
static: boolean;
|
|
1364
|
+
abstract?: boolean | null;
|
|
1365
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
1366
|
+
declare?: boolean | null;
|
|
1367
|
+
definite?: boolean | null;
|
|
1368
|
+
optional?: boolean | null;
|
|
1369
|
+
override?: boolean | null;
|
|
1370
|
+
readonly?: boolean | null;
|
|
1371
|
+
variance?: Variance | null;
|
|
1372
|
+
computed: true;
|
|
1373
|
+
key: Expression$1;
|
|
1374
|
+
}
|
|
1375
|
+
interface ClassAccessorPropertyNonComputed extends BaseNode {
|
|
1376
|
+
type: "ClassAccessorProperty";
|
|
1377
|
+
value?: Expression$1 | null;
|
|
1378
|
+
typeAnnotation?: TypeAnnotation | TSTypeAnnotation | null;
|
|
1379
|
+
decorators?: Decorator[] | null;
|
|
1380
|
+
static: boolean;
|
|
1381
|
+
abstract?: boolean | null;
|
|
1382
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
1383
|
+
declare?: boolean | null;
|
|
1384
|
+
definite?: boolean | null;
|
|
1385
|
+
optional?: boolean | null;
|
|
1386
|
+
override?: boolean | null;
|
|
1387
|
+
readonly?: boolean | null;
|
|
1388
|
+
variance?: Variance | null;
|
|
1389
|
+
computed: false;
|
|
1390
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
|
|
1391
|
+
}
|
|
1392
|
+
type ClassAccessorProperty = ClassAccessorPropertyComputed | ClassAccessorPropertyNonComputed;
|
|
1393
|
+
interface Decorator extends BaseNode {
|
|
1394
|
+
type: "Decorator";
|
|
1395
|
+
expression: Expression$1;
|
|
1396
|
+
}
|
|
1397
|
+
interface DoExpression extends BaseNode {
|
|
1398
|
+
type: "DoExpression";
|
|
1399
|
+
body: BlockStatement;
|
|
1400
|
+
async: boolean;
|
|
1401
|
+
}
|
|
1402
|
+
interface ExportDefaultSpecifier extends BaseNode {
|
|
1403
|
+
type: "ExportDefaultSpecifier";
|
|
1404
|
+
exported: Identifier;
|
|
1405
|
+
}
|
|
1406
|
+
interface ModuleExpression extends BaseNode {
|
|
1407
|
+
type: "ModuleExpression";
|
|
1408
|
+
body: Program;
|
|
1409
|
+
}
|
|
1410
|
+
interface TopicReference extends BaseNode {
|
|
1411
|
+
type: "TopicReference";
|
|
1412
|
+
}
|
|
1413
|
+
interface VoidPattern extends BaseNode {
|
|
1414
|
+
type: "VoidPattern";
|
|
1415
|
+
}
|
|
1416
|
+
interface TSParameterProperty extends BaseNode {
|
|
1417
|
+
type: "TSParameterProperty";
|
|
1418
|
+
parameter: Identifier | AssignmentPattern;
|
|
1419
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
1420
|
+
decorators?: Decorator[] | null;
|
|
1421
|
+
override?: boolean | null;
|
|
1422
|
+
readonly?: boolean | null;
|
|
1423
|
+
}
|
|
1424
|
+
interface TSDeclareFunction extends BaseNode {
|
|
1425
|
+
type: "TSDeclareFunction";
|
|
1426
|
+
id?: Identifier | null;
|
|
1427
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1428
|
+
params: FunctionParameter[];
|
|
1429
|
+
returnType?: TSTypeAnnotation | null;
|
|
1430
|
+
async: boolean;
|
|
1431
|
+
declare?: boolean | null;
|
|
1432
|
+
generator: boolean;
|
|
1433
|
+
}
|
|
1434
|
+
interface TSDeclareMethodComputed extends BaseNode {
|
|
1435
|
+
type: "TSDeclareMethod";
|
|
1436
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1437
|
+
params: (FunctionParameter | TSParameterProperty)[];
|
|
1438
|
+
returnType?: TSTypeAnnotation | null;
|
|
1439
|
+
abstract?: boolean | null;
|
|
1440
|
+
access?: "public" | "private" | "protected" | null;
|
|
1441
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
1442
|
+
async: boolean;
|
|
1443
|
+
generator: boolean;
|
|
1444
|
+
kind: "get" | "set" | "method" | "constructor";
|
|
1445
|
+
optional?: boolean | null;
|
|
1446
|
+
override?: boolean | null;
|
|
1447
|
+
static: boolean;
|
|
1448
|
+
computed: true;
|
|
1449
|
+
key: Expression$1;
|
|
1450
|
+
}
|
|
1451
|
+
interface TSDeclareMethodNonComputed extends BaseNode {
|
|
1452
|
+
type: "TSDeclareMethod";
|
|
1453
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1454
|
+
params: (FunctionParameter | TSParameterProperty)[];
|
|
1455
|
+
returnType?: TSTypeAnnotation | null;
|
|
1456
|
+
abstract?: boolean | null;
|
|
1457
|
+
access?: "public" | "private" | "protected" | null;
|
|
1458
|
+
accessibility?: "public" | "private" | "protected" | null;
|
|
1459
|
+
async: boolean;
|
|
1460
|
+
generator: boolean;
|
|
1461
|
+
kind: "get" | "set" | "method" | "constructor";
|
|
1462
|
+
optional?: boolean | null;
|
|
1463
|
+
override?: boolean | null;
|
|
1464
|
+
static: boolean;
|
|
1465
|
+
computed: false;
|
|
1466
|
+
key: Identifier | StringLiteral | NumericLiteral | BigIntLiteral | PrivateName;
|
|
1467
|
+
}
|
|
1468
|
+
type TSDeclareMethod = TSDeclareMethodComputed | TSDeclareMethodNonComputed;
|
|
1469
|
+
interface TSQualifiedName extends BaseNode {
|
|
1470
|
+
type: "TSQualifiedName";
|
|
1471
|
+
left: TSEntityName;
|
|
1472
|
+
right: Identifier;
|
|
1473
|
+
}
|
|
1474
|
+
interface TSCallSignatureDeclaration extends BaseNode {
|
|
1475
|
+
type: "TSCallSignatureDeclaration";
|
|
1476
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1477
|
+
params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
|
|
1478
|
+
returnType?: TSTypeAnnotation | null;
|
|
1479
|
+
}
|
|
1480
|
+
interface TSConstructSignatureDeclaration extends BaseNode {
|
|
1481
|
+
type: "TSConstructSignatureDeclaration";
|
|
1482
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1483
|
+
params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
|
|
1484
|
+
returnType?: TSTypeAnnotation | null;
|
|
1485
|
+
}
|
|
1486
|
+
interface TSPropertySignature extends BaseNode {
|
|
1487
|
+
type: "TSPropertySignature";
|
|
1488
|
+
key: Expression$1;
|
|
1489
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1490
|
+
computed: boolean;
|
|
1491
|
+
kind?: "get" | "set" | null;
|
|
1492
|
+
optional?: boolean | null;
|
|
1493
|
+
readonly?: boolean | null;
|
|
1494
|
+
}
|
|
1495
|
+
interface TSMethodSignature extends BaseNode {
|
|
1496
|
+
type: "TSMethodSignature";
|
|
1497
|
+
key: Expression$1;
|
|
1498
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1499
|
+
params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
|
|
1500
|
+
returnType?: TSTypeAnnotation | null;
|
|
1501
|
+
computed: boolean;
|
|
1502
|
+
kind: "method" | "get" | "set";
|
|
1503
|
+
optional?: boolean | null;
|
|
1504
|
+
}
|
|
1505
|
+
interface TSIndexSignature extends BaseNode {
|
|
1506
|
+
type: "TSIndexSignature";
|
|
1507
|
+
parameters: Identifier[];
|
|
1508
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1509
|
+
readonly?: boolean | null;
|
|
1510
|
+
static?: boolean | null;
|
|
1511
|
+
}
|
|
1512
|
+
interface TSAnyKeyword extends BaseNode {
|
|
1513
|
+
type: "TSAnyKeyword";
|
|
1514
|
+
}
|
|
1515
|
+
interface TSBooleanKeyword extends BaseNode {
|
|
1516
|
+
type: "TSBooleanKeyword";
|
|
1517
|
+
}
|
|
1518
|
+
interface TSBigIntKeyword extends BaseNode {
|
|
1519
|
+
type: "TSBigIntKeyword";
|
|
1520
|
+
}
|
|
1521
|
+
interface TSIntrinsicKeyword extends BaseNode {
|
|
1522
|
+
type: "TSIntrinsicKeyword";
|
|
1523
|
+
}
|
|
1524
|
+
interface TSNeverKeyword extends BaseNode {
|
|
1525
|
+
type: "TSNeverKeyword";
|
|
1526
|
+
}
|
|
1527
|
+
interface TSNullKeyword extends BaseNode {
|
|
1528
|
+
type: "TSNullKeyword";
|
|
1529
|
+
}
|
|
1530
|
+
interface TSNumberKeyword extends BaseNode {
|
|
1531
|
+
type: "TSNumberKeyword";
|
|
1532
|
+
}
|
|
1533
|
+
interface TSObjectKeyword extends BaseNode {
|
|
1534
|
+
type: "TSObjectKeyword";
|
|
1535
|
+
}
|
|
1536
|
+
interface TSStringKeyword extends BaseNode {
|
|
1537
|
+
type: "TSStringKeyword";
|
|
1538
|
+
}
|
|
1539
|
+
interface TSSymbolKeyword extends BaseNode {
|
|
1540
|
+
type: "TSSymbolKeyword";
|
|
1541
|
+
}
|
|
1542
|
+
interface TSUndefinedKeyword extends BaseNode {
|
|
1543
|
+
type: "TSUndefinedKeyword";
|
|
1544
|
+
}
|
|
1545
|
+
interface TSUnknownKeyword extends BaseNode {
|
|
1546
|
+
type: "TSUnknownKeyword";
|
|
1547
|
+
}
|
|
1548
|
+
interface TSVoidKeyword extends BaseNode {
|
|
1549
|
+
type: "TSVoidKeyword";
|
|
1550
|
+
}
|
|
1551
|
+
interface TSThisType extends BaseNode {
|
|
1552
|
+
type: "TSThisType";
|
|
1553
|
+
}
|
|
1554
|
+
interface TSFunctionType extends BaseNode {
|
|
1555
|
+
type: "TSFunctionType";
|
|
1556
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1557
|
+
params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
|
|
1558
|
+
returnType?: TSTypeAnnotation | null;
|
|
1559
|
+
}
|
|
1560
|
+
interface TSConstructorType extends BaseNode {
|
|
1561
|
+
type: "TSConstructorType";
|
|
1562
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1563
|
+
params: (ArrayPattern | Identifier | ObjectPattern | RestElement)[];
|
|
1564
|
+
returnType?: TSTypeAnnotation | null;
|
|
1565
|
+
abstract?: boolean | null;
|
|
1566
|
+
}
|
|
1567
|
+
interface TSTypeReference extends BaseNode {
|
|
1568
|
+
type: "TSTypeReference";
|
|
1569
|
+
typeName: TSEntityName;
|
|
1570
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1571
|
+
}
|
|
1572
|
+
interface TSTypePredicate extends BaseNode {
|
|
1573
|
+
type: "TSTypePredicate";
|
|
1574
|
+
parameterName: Identifier | TSThisType;
|
|
1575
|
+
typeAnnotation?: TSTypeAnnotation | null;
|
|
1576
|
+
asserts?: boolean | null;
|
|
1577
|
+
}
|
|
1578
|
+
interface TSTypeQuery extends BaseNode {
|
|
1579
|
+
type: "TSTypeQuery";
|
|
1580
|
+
exprName: TSEntityName | TSImportType;
|
|
1581
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1582
|
+
}
|
|
1583
|
+
interface TSTypeLiteral extends BaseNode {
|
|
1584
|
+
type: "TSTypeLiteral";
|
|
1585
|
+
members: TSTypeElement[];
|
|
1586
|
+
}
|
|
1587
|
+
interface TSArrayType extends BaseNode {
|
|
1588
|
+
type: "TSArrayType";
|
|
1589
|
+
elementType: TSType;
|
|
1590
|
+
}
|
|
1591
|
+
interface TSTupleType extends BaseNode {
|
|
1592
|
+
type: "TSTupleType";
|
|
1593
|
+
elementTypes: (TSType | TSNamedTupleMember)[];
|
|
1594
|
+
}
|
|
1595
|
+
interface TSOptionalType extends BaseNode {
|
|
1596
|
+
type: "TSOptionalType";
|
|
1597
|
+
typeAnnotation: TSType;
|
|
1598
|
+
}
|
|
1599
|
+
interface TSRestType extends BaseNode {
|
|
1600
|
+
type: "TSRestType";
|
|
1601
|
+
typeAnnotation: TSType;
|
|
1602
|
+
}
|
|
1603
|
+
interface TSNamedTupleMember extends BaseNode {
|
|
1604
|
+
type: "TSNamedTupleMember";
|
|
1605
|
+
label: Identifier;
|
|
1606
|
+
elementType: TSType;
|
|
1607
|
+
optional: boolean;
|
|
1608
|
+
}
|
|
1609
|
+
interface TSUnionType extends BaseNode {
|
|
1610
|
+
type: "TSUnionType";
|
|
1611
|
+
types: TSType[];
|
|
1612
|
+
}
|
|
1613
|
+
interface TSIntersectionType extends BaseNode {
|
|
1614
|
+
type: "TSIntersectionType";
|
|
1615
|
+
types: TSType[];
|
|
1616
|
+
}
|
|
1617
|
+
interface TSConditionalType extends BaseNode {
|
|
1618
|
+
type: "TSConditionalType";
|
|
1619
|
+
checkType: TSType;
|
|
1620
|
+
extendsType: TSType;
|
|
1621
|
+
trueType: TSType;
|
|
1622
|
+
falseType: TSType;
|
|
1623
|
+
}
|
|
1624
|
+
interface TSInferType extends BaseNode {
|
|
1625
|
+
type: "TSInferType";
|
|
1626
|
+
typeParameter: TSTypeParameter;
|
|
1627
|
+
}
|
|
1628
|
+
interface TSParenthesizedType extends BaseNode {
|
|
1629
|
+
type: "TSParenthesizedType";
|
|
1630
|
+
typeAnnotation: TSType;
|
|
1631
|
+
}
|
|
1632
|
+
interface TSTypeOperator extends BaseNode {
|
|
1633
|
+
type: "TSTypeOperator";
|
|
1634
|
+
typeAnnotation: TSType;
|
|
1635
|
+
operator: "keyof" | "readonly" | "unique";
|
|
1636
|
+
}
|
|
1637
|
+
interface TSIndexedAccessType extends BaseNode {
|
|
1638
|
+
type: "TSIndexedAccessType";
|
|
1639
|
+
objectType: TSType;
|
|
1640
|
+
indexType: TSType;
|
|
1641
|
+
}
|
|
1642
|
+
interface TSMappedType extends BaseNode {
|
|
1643
|
+
type: "TSMappedType";
|
|
1644
|
+
key: Identifier;
|
|
1645
|
+
constraint: TSType;
|
|
1646
|
+
nameType?: TSType | null;
|
|
1647
|
+
typeAnnotation?: TSType | null;
|
|
1648
|
+
optional?: true | false | "+" | "-" | null;
|
|
1649
|
+
readonly?: true | false | "+" | "-" | null;
|
|
1650
|
+
}
|
|
1651
|
+
interface TSTemplateLiteralType extends BaseNode {
|
|
1652
|
+
type: "TSTemplateLiteralType";
|
|
1653
|
+
quasis: TemplateElement[];
|
|
1654
|
+
types: TSType[];
|
|
1655
|
+
}
|
|
1656
|
+
interface TSLiteralType extends BaseNode {
|
|
1657
|
+
type: "TSLiteralType";
|
|
1658
|
+
literal: NumericLiteral | StringLiteral | BooleanLiteral | BigIntLiteral | TemplateLiteral | UnaryExpression;
|
|
1659
|
+
}
|
|
1660
|
+
interface TSClassImplements extends BaseNode {
|
|
1661
|
+
type: "TSClassImplements";
|
|
1662
|
+
expression: Expression$1;
|
|
1663
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1664
|
+
}
|
|
1665
|
+
interface TSInterfaceHeritage extends BaseNode {
|
|
1666
|
+
type: "TSInterfaceHeritage";
|
|
1667
|
+
expression: Expression$1;
|
|
1668
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1669
|
+
}
|
|
1670
|
+
interface TSInterfaceDeclaration extends BaseNode {
|
|
1671
|
+
type: "TSInterfaceDeclaration";
|
|
1672
|
+
id: Identifier;
|
|
1673
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1674
|
+
extends?: TSInterfaceHeritage[] | null;
|
|
1675
|
+
body: TSInterfaceBody;
|
|
1676
|
+
declare?: boolean | null;
|
|
1677
|
+
}
|
|
1678
|
+
interface TSInterfaceBody extends BaseNode {
|
|
1679
|
+
type: "TSInterfaceBody";
|
|
1680
|
+
body: TSTypeElement[];
|
|
1681
|
+
}
|
|
1682
|
+
interface TSTypeAliasDeclaration extends BaseNode {
|
|
1683
|
+
type: "TSTypeAliasDeclaration";
|
|
1684
|
+
id: Identifier;
|
|
1685
|
+
typeParameters?: TSTypeParameterDeclaration | null;
|
|
1686
|
+
typeAnnotation: TSType;
|
|
1687
|
+
declare?: boolean | null;
|
|
1688
|
+
}
|
|
1689
|
+
interface TSInstantiationExpression extends BaseNode {
|
|
1690
|
+
type: "TSInstantiationExpression";
|
|
1691
|
+
expression: Expression$1;
|
|
1692
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1693
|
+
}
|
|
1694
|
+
interface TSAsExpression extends BaseNode {
|
|
1695
|
+
type: "TSAsExpression";
|
|
1696
|
+
expression: Expression$1;
|
|
1697
|
+
typeAnnotation: TSType;
|
|
1698
|
+
}
|
|
1699
|
+
interface TSSatisfiesExpression extends BaseNode {
|
|
1700
|
+
type: "TSSatisfiesExpression";
|
|
1701
|
+
expression: Expression$1;
|
|
1702
|
+
typeAnnotation: TSType;
|
|
1703
|
+
}
|
|
1704
|
+
interface TSTypeAssertion extends BaseNode {
|
|
1705
|
+
type: "TSTypeAssertion";
|
|
1706
|
+
typeAnnotation: TSType;
|
|
1707
|
+
expression: Expression$1;
|
|
1708
|
+
}
|
|
1709
|
+
interface TSEnumBody extends BaseNode {
|
|
1710
|
+
type: "TSEnumBody";
|
|
1711
|
+
members: TSEnumMember[];
|
|
1712
|
+
}
|
|
1713
|
+
interface TSEnumDeclaration extends BaseNode {
|
|
1714
|
+
type: "TSEnumDeclaration";
|
|
1715
|
+
id: Identifier;
|
|
1716
|
+
body: TSEnumBody;
|
|
1717
|
+
const?: boolean | null;
|
|
1718
|
+
declare?: boolean | null;
|
|
1719
|
+
}
|
|
1720
|
+
interface TSEnumMember extends BaseNode {
|
|
1721
|
+
type: "TSEnumMember";
|
|
1722
|
+
id: Identifier | StringLiteral;
|
|
1723
|
+
initializer?: Expression$1 | null;
|
|
1724
|
+
}
|
|
1725
|
+
interface TSModuleDeclaration extends BaseNode {
|
|
1726
|
+
type: "TSModuleDeclaration";
|
|
1727
|
+
id: TSEntityName | StringLiteral;
|
|
1728
|
+
body: TSModuleBlock;
|
|
1729
|
+
declare?: boolean | null;
|
|
1730
|
+
kind: "global" | "namespace" | "module";
|
|
1731
|
+
}
|
|
1732
|
+
interface TSModuleBlock extends BaseNode {
|
|
1733
|
+
type: "TSModuleBlock";
|
|
1734
|
+
body: Statement[];
|
|
1735
|
+
}
|
|
1736
|
+
interface TSImportType extends BaseNode {
|
|
1737
|
+
type: "TSImportType";
|
|
1738
|
+
source: StringLiteral;
|
|
1739
|
+
qualifier?: TSEntityName | null;
|
|
1740
|
+
typeArguments?: TSTypeParameterInstantiation | null;
|
|
1741
|
+
options?: ObjectExpression | null;
|
|
1742
|
+
}
|
|
1743
|
+
interface TSImportEqualsDeclaration extends BaseNode {
|
|
1744
|
+
type: "TSImportEqualsDeclaration";
|
|
1745
|
+
id: Identifier;
|
|
1746
|
+
moduleReference: TSEntityName | TSExternalModuleReference;
|
|
1747
|
+
importKind?: "type" | "value" | null;
|
|
1748
|
+
}
|
|
1749
|
+
interface TSExternalModuleReference extends BaseNode {
|
|
1750
|
+
type: "TSExternalModuleReference";
|
|
1751
|
+
expression: StringLiteral;
|
|
1752
|
+
}
|
|
1753
|
+
interface TSNonNullExpression extends BaseNode {
|
|
1754
|
+
type: "TSNonNullExpression";
|
|
1755
|
+
expression: Expression$1;
|
|
1756
|
+
}
|
|
1757
|
+
interface TSExportAssignment extends BaseNode {
|
|
1758
|
+
type: "TSExportAssignment";
|
|
1759
|
+
expression: Expression$1;
|
|
1760
|
+
}
|
|
1761
|
+
interface TSNamespaceExportDeclaration extends BaseNode {
|
|
1762
|
+
type: "TSNamespaceExportDeclaration";
|
|
1763
|
+
id: Identifier;
|
|
1764
|
+
}
|
|
1765
|
+
interface TSTypeAnnotation extends BaseNode {
|
|
1766
|
+
type: "TSTypeAnnotation";
|
|
1767
|
+
typeAnnotation: TSType;
|
|
1768
|
+
}
|
|
1769
|
+
interface TSTypeParameterInstantiation extends BaseNode {
|
|
1770
|
+
type: "TSTypeParameterInstantiation";
|
|
1771
|
+
params: TSType[];
|
|
1772
|
+
}
|
|
1773
|
+
interface TSTypeParameterDeclaration extends BaseNode {
|
|
1774
|
+
type: "TSTypeParameterDeclaration";
|
|
1775
|
+
params: TSTypeParameter[];
|
|
1776
|
+
}
|
|
1777
|
+
interface TSTypeParameter extends BaseNode {
|
|
1778
|
+
type: "TSTypeParameter";
|
|
1779
|
+
constraint?: TSType | null;
|
|
1780
|
+
default?: TSType | null;
|
|
1781
|
+
name: Identifier;
|
|
1782
|
+
const?: boolean | null;
|
|
1783
|
+
in?: boolean | null;
|
|
1784
|
+
out?: boolean | null;
|
|
1785
|
+
}
|
|
1786
|
+
type Expression$1 = 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;
|
|
1787
|
+
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;
|
|
1788
|
+
type FunctionParameter = Identifier | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern;
|
|
1789
|
+
type PatternLike = Identifier | MemberExpression | RestElement | AssignmentPattern | ArrayPattern | ObjectPattern | VoidPattern | TSAsExpression | TSSatisfiesExpression | TSTypeAssertion | TSNonNullExpression;
|
|
1790
|
+
type TSEntityName = Identifier | ThisExpression | TSQualifiedName;
|
|
1791
|
+
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;
|
|
1792
|
+
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;
|
|
1793
|
+
type FlowPredicate = DeclaredPredicate | InferredPredicate;
|
|
1794
|
+
type TSTypeElement = TSCallSignatureDeclaration | TSConstructSignatureDeclaration | TSPropertySignature | TSMethodSignature | TSIndexSignature;
|
|
1795
|
+
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;
|
|
1796
|
+
//#endregion
|
|
1797
|
+
//#region src/pageDeclaration/analyze.d.ts
|
|
1798
|
+
/**
|
|
1799
|
+
* 共享普通脚本与 setup 的模块绑定,收集指向全局宏或规范导入的页面元信息调用。
|
|
1800
|
+
*/
|
|
1801
|
+
export declare function collectPageMetaCallsFromPrograms(programs: {
|
|
1802
|
+
script?: File;
|
|
1803
|
+
scriptSetup?: File;
|
|
1804
|
+
}): CallExpression[];
|
|
1805
|
+
//#endregion
|
|
1806
|
+
//#region src/pageDeclaration/index.d.ts
|
|
1807
|
+
interface StripPageDeclarationResult {
|
|
1808
|
+
code: string;
|
|
1809
|
+
map?: EncodedSourceMapLike;
|
|
1810
|
+
}
|
|
1811
|
+
interface ExtractPageDeclarationWithDependenciesResult {
|
|
1812
|
+
declaration?: StaticPageDeclaration;
|
|
1813
|
+
declarationSourceFile?: string;
|
|
1814
|
+
dependencies: string[];
|
|
1815
|
+
}
|
|
1816
|
+
/**
|
|
1817
|
+
* 源码是否可能包含页面路由声明宏。
|
|
1818
|
+
*/
|
|
1819
|
+
export declare function mayContainPageDeclaration(source: string): boolean;
|
|
1820
|
+
/**
|
|
1821
|
+
* 源码是否可能包含页面元信息宏。
|
|
1822
|
+
*/
|
|
1823
|
+
export declare function mayContainPageMeta(source: string): boolean;
|
|
1824
|
+
/**
|
|
1825
|
+
* 解析页面声明,并返回由现有 SFC `src` 规则解析出的脚本依赖。
|
|
1826
|
+
*/
|
|
1827
|
+
export declare function extractPageDeclarationWithDependencies(source: string, filename: string, options?: ResolveSfcBlockSrcOptions): Promise<ExtractPageDeclarationWithDependenciesResult>;
|
|
1828
|
+
export declare function extractPageDeclaration(source: string, filename: string): StaticPageDeclaration | undefined;
|
|
1829
|
+
export declare function stripPageDeclaration(source: string, filename: string): StripPageDeclarationResult | undefined;
|
|
1830
|
+
//#endregion
|
|
196
1831
|
//#region src/runtimeCapabilities.d.ts
|
|
197
1832
|
/**
|
|
198
1833
|
* wevu 编译器内部使用的运行时能力规范顺序。
|
|
@@ -320,94 +1955,6 @@ interface WevuDefaults {
|
|
|
320
1955
|
component?: Record<string, any>;
|
|
321
1956
|
}
|
|
322
1957
|
//#endregion
|
|
323
|
-
//#region src/utils/sourcemap.d.ts
|
|
324
|
-
interface EncodedSourceMapLike {
|
|
325
|
-
version: number | string;
|
|
326
|
-
file?: string;
|
|
327
|
-
names: string[];
|
|
328
|
-
sourceRoot?: string;
|
|
329
|
-
sources: string[];
|
|
330
|
-
sourcesContent?: Array<string | null>;
|
|
331
|
-
mappings: string;
|
|
332
|
-
}
|
|
333
|
-
//#endregion
|
|
334
|
-
//#region src/plugins/utils/vueSfcBlockSrc.d.ts
|
|
335
|
-
/**
|
|
336
|
-
* 解析 SFC block `src` 的配置。
|
|
337
|
-
*/
|
|
338
|
-
interface ResolveSfcBlockSrcOptions {
|
|
339
|
-
resolveId?: (source: string, importer?: string) => Promise<string | undefined>;
|
|
340
|
-
readFile?: (id: string, options?: {
|
|
341
|
-
checkMtime?: boolean;
|
|
342
|
-
}) => Promise<string>;
|
|
343
|
-
checkMtime?: boolean;
|
|
344
|
-
}
|
|
345
|
-
/**
|
|
346
|
-
* 解析 SFC 中带 `src` 的 block,并返回依赖列表。
|
|
347
|
-
*/
|
|
348
|
-
export declare function resolveSfcBlockSrc(descriptor: SFCDescriptor, filename: string, options?: ResolveSfcBlockSrcOptions): Promise<{
|
|
349
|
-
descriptor: SFCDescriptor;
|
|
350
|
-
deps: string[];
|
|
351
|
-
templateResolvedId?: string;
|
|
352
|
-
}>;
|
|
353
|
-
//#endregion
|
|
354
|
-
//#region src/plugins/utils/vueSfc.d.ts
|
|
355
|
-
/**
|
|
356
|
-
* 读取并解析 SFC 的配置。
|
|
357
|
-
*/
|
|
358
|
-
interface ReadAndParseSfcOptions {
|
|
359
|
-
/**
|
|
360
|
-
* 直接传入源码以跳过文件读取。
|
|
361
|
-
*/
|
|
362
|
-
source?: string;
|
|
363
|
-
/**
|
|
364
|
-
* 已完成 `<script src>` 预处理的源码。
|
|
365
|
-
*/
|
|
366
|
-
preprocessedSource?: string;
|
|
367
|
-
/**
|
|
368
|
-
* 是否忽略空 SFC block。
|
|
369
|
-
*/
|
|
370
|
-
ignoreEmpty?: boolean;
|
|
371
|
-
/**
|
|
372
|
-
* 是否按 mtime+size 检查文件变更(dev 推荐开启)。
|
|
373
|
-
*/
|
|
374
|
-
checkMtime?: boolean;
|
|
375
|
-
/**
|
|
376
|
-
* 解析 <template>/<script>/<style> 的 src 引用。
|
|
377
|
-
*/
|
|
378
|
-
resolveSrc?: ResolveSfcBlockSrcOptions;
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* 预处理 `<script setup src>`,避免编译器丢失 src。
|
|
382
|
-
*/
|
|
383
|
-
export declare function preprocessScriptSetupSrc(source: string): string;
|
|
384
|
-
/**
|
|
385
|
-
* 预处理普通 `<script src>`,避免编译器丢失 src。
|
|
386
|
-
*/
|
|
387
|
-
export declare function preprocessScriptSrc(source: string): string;
|
|
388
|
-
/**
|
|
389
|
-
* 将预处理的 `<script setup src>` 恢复为真实 src。
|
|
390
|
-
*/
|
|
391
|
-
export declare function restoreScriptSetupSrc(descriptor: SFCDescriptor): void;
|
|
392
|
-
/**
|
|
393
|
-
* 将预处理的 `<script src>` 恢复为真实 src。
|
|
394
|
-
*/
|
|
395
|
-
export declare function restoreScriptSrc(descriptor: SFCDescriptor): void;
|
|
396
|
-
/**
|
|
397
|
-
* 读取并解析 SFC,支持缓存与 src 解析。
|
|
398
|
-
*/
|
|
399
|
-
export declare function readAndParseSfc(filename: string, options?: ReadAndParseSfcOptions): Promise<{
|
|
400
|
-
source: string;
|
|
401
|
-
descriptor: SFCDescriptor;
|
|
402
|
-
errors: SFCParseResult['errors'];
|
|
403
|
-
}>;
|
|
404
|
-
/**
|
|
405
|
-
* 获取 SFC 读取时是否检查 mtime 的策略。
|
|
406
|
-
*/
|
|
407
|
-
export declare function getSfcCheckMtime(config?: {
|
|
408
|
-
isDev?: boolean;
|
|
409
|
-
}): boolean;
|
|
410
|
-
//#endregion
|
|
411
1958
|
//#region src/plugins/vue/compiler/template/platform.d.ts
|
|
412
1959
|
interface MiniProgramDirectiveAttrs {
|
|
413
1960
|
ifAttr: string;
|
|
@@ -831,6 +2378,12 @@ interface CompileVueFileOptions {
|
|
|
831
2378
|
* 是否根据绑定清单自动合并 setData.pick。
|
|
832
2379
|
*/
|
|
833
2380
|
autoSetDataPick?: boolean;
|
|
2381
|
+
/**
|
|
2382
|
+
* 在开发期保持 CSS 变量运行时依赖与导出形状稳定。
|
|
2383
|
+
*
|
|
2384
|
+
* @internal
|
|
2385
|
+
*/
|
|
2386
|
+
stabilizeCssVarsRuntime?: boolean;
|
|
834
2387
|
/**
|
|
835
2388
|
* 绑定清单中记录的源码文件名;默认使用当前编译文件名。
|
|
836
2389
|
*/
|
|
@@ -1241,6 +2794,12 @@ interface TransformScriptOptions {
|
|
|
1241
2794
|
* 当前 SFC 的 CSS Modules 映射。
|
|
1242
2795
|
*/
|
|
1243
2796
|
cssModules?: Record<string, Record<string, string>>;
|
|
2797
|
+
/**
|
|
2798
|
+
* 注入空 CSS 变量注册,保持开发期运行时模块图稳定。
|
|
2799
|
+
*
|
|
2800
|
+
* @internal
|
|
2801
|
+
*/
|
|
2802
|
+
stabilizeCssVarsRuntime?: boolean;
|
|
1244
2803
|
}
|
|
1245
2804
|
//#endregion
|
|
1246
2805
|
//#region src/plugins/vue/transform/transformScript/index.d.ts
|
|
@@ -1419,4 +2978,4 @@ interface CollectVueTemplateTagsOptions {
|
|
|
1419
2978
|
*/
|
|
1420
2979
|
export declare function collectVueTemplateTags(template: string, options: CollectVueTemplateTagsOptions): Set<string>;
|
|
1421
2980
|
//#endregion
|
|
1422
|
-
export { type AstEngineName, type AutoImportTagsOptions, type AutoUsingComponentsOptions, type BindingCondition, type ClassStyleBinding, type ClassStyleRuntime, type CollectVueTemplateTagsOptions, type CompileVueFileOptions, type CompilerAppShell, type CompilerDiagnostic, type CompilerDiagnosticCode, type CompilerDiagnosticSeverity, type CompilerDiagnosticSource, type CompilerLayoutPropValue, type CompilerPageLayout, type CompilerPageLayoutPlan, type ComponentStyleOptions, type ComponentStylePrimitive, type ForParseResult, type InlineExpressionAsset, type JsLikeLang, type JsonConfig, type JsonMergeContext, type JsonMergeStage, type JsonMergeStrategy, type MiniProgramPlatform, type ModuleResolver, type MpPlatform, type ReadAndParseSfcOptions, type ResolveSfcBlockSrcOptions, type ResolvedUsingComponentInfo, type ResolvedUsingComponentPath, type ScopedSlotComponentAsset, type SlotFallbackWrapperComponentAsset, type SlotFallbackWrapperStrategy, type SourcePosition, type SourceSpan, type StaticComponentStyleOption, type StyleCompileOptions, type StyleCompileResult, type TemplateCompileOptions, type TemplateCompileResult, type TemplateRefBinding, type TransformResult, type TransformScriptOptions, type TransformUniAppSourceOptions, type UniAppCompatibilityTarget, type VueSfcBlockChanges, type VueSfcBlockSignatures, type VueSfcBlockType, type VueSfcHmrSignatures, type VueTransformResult, type WevuBindingDependencyV1, type WevuBindingKind, type WevuBindingManifestFeaturesV1, type WevuBindingManifestV1, type WevuBindingRecordV1, type WevuBindingScopeV1, type WevuBindingUpdateMode, type WevuDefaults, type WevuRuntimeBindingManifestMode, type WevuRuntimeBindingManifestV1, type WevuRuntimeBindingRecordV1, compileVueFile as compileSfc, compileVueStyleToWxss as compileStyle, compileVueTemplateToWxml as compileTemplate, transformScript as transformSfcScript };
|
|
2981
|
+
export { type AstEngineName, type AutoImportTagsOptions, type AutoUsingComponentsOptions, type BindingCondition, type ClassStyleBinding, type ClassStyleRuntime, type CollectVueTemplateTagsOptions, type CompileVueFileOptions, type CompilerAppShell, type CompilerDiagnostic, type CompilerDiagnosticCode, type CompilerDiagnosticSeverity, type CompilerDiagnosticSource, type CompilerLayoutPropValue, type CompilerPageLayout, type CompilerPageLayoutPlan, type ComponentStyleOptions, type ComponentStylePrimitive, type ExtractPageDeclarationWithDependenciesResult, type ForParseResult, type InlineExpressionAsset, type JsLikeLang, type JsonConfig, type JsonMergeContext, type JsonMergeStage, type JsonMergeStrategy, type MiniProgramPlatform, type ModuleResolver, type MpPlatform, type ReadAndParseSfcOptions, type ResolveSfcBlockSrcOptions, type ResolvedUsingComponentInfo, type ResolvedUsingComponentPath, type ScopedSlotComponentAsset, type SlotFallbackWrapperComponentAsset, type SlotFallbackWrapperStrategy, type SourcePosition, type SourceSpan, type StaticComponentStyleOption, type StaticPageDeclaration, type StaticRouteValue, type StyleCompileOptions, type StyleCompileResult, type TemplateCompileOptions, type TemplateCompileResult, type TemplateRefBinding, type TransformResult, type TransformScriptOptions, type TransformUniAppSourceOptions, type UniAppCompatibilityTarget, type VueSfcBlockChanges, type VueSfcBlockSignatures, type VueSfcBlockType, type VueSfcHmrSignatures, type VueTransformResult, type WevuBindingDependencyV1, type WevuBindingKind, type WevuBindingManifestFeaturesV1, type WevuBindingManifestV1, type WevuBindingRecordV1, type WevuBindingScopeV1, type WevuBindingUpdateMode, type WevuDefaults, type WevuRuntimeBindingManifestMode, type WevuRuntimeBindingManifestV1, type WevuRuntimeBindingRecordV1, compileVueFile as compileSfc, compileVueStyleToWxss as compileStyle, compileVueTemplateToWxml as compileTemplate, transformScript as transformSfcScript };
|