1 | export interface Plugin {
|
2 | (module: Program): Program;
|
3 | }
|
4 | export declare type ParseOptions = ParserConfig & {
|
5 | comments?: boolean;
|
6 | script?: boolean;
|
7 | |
8 |
|
9 |
|
10 | target?: JscTarget;
|
11 | };
|
12 |
|
13 |
|
14 |
|
15 | export interface Options extends Config {
|
16 | |
17 |
|
18 |
|
19 | script?: boolean;
|
20 | |
21 |
|
22 |
|
23 |
|
24 |
|
25 |
|
26 | cwd?: string;
|
27 | caller?: CallerOptions;
|
28 | |
29 |
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
36 |
|
37 |
|
38 |
|
39 |
|
40 |
|
41 |
|
42 | filename?: string;
|
43 | |
44 |
|
45 |
|
46 |
|
47 |
|
48 |
|
49 |
|
50 |
|
51 |
|
52 |
|
53 | root?: string;
|
54 | |
55 |
|
56 |
|
57 |
|
58 |
|
59 |
|
60 |
|
61 |
|
62 |
|
63 |
|
64 |
|
65 |
|
66 |
|
67 |
|
68 |
|
69 |
|
70 |
|
71 |
|
72 |
|
73 |
|
74 |
|
75 |
|
76 |
|
77 |
|
78 |
|
79 |
|
80 |
|
81 |
|
82 |
|
83 |
|
84 | rootMode?: "root" | "upward" | "upward-optional";
|
85 | |
86 |
|
87 |
|
88 |
|
89 |
|
90 |
|
91 |
|
92 |
|
93 | envName?: string;
|
94 | |
95 |
|
96 |
|
97 |
|
98 |
|
99 |
|
100 |
|
101 |
|
102 |
|
103 |
|
104 |
|
105 |
|
106 |
|
107 |
|
108 |
|
109 | configFile?: string | boolean;
|
110 | |
111 |
|
112 |
|
113 |
|
114 |
|
115 |
|
116 |
|
117 |
|
118 |
|
119 |
|
120 |
|
121 | swcrc?: boolean;
|
122 | |
123 |
|
124 |
|
125 |
|
126 |
|
127 |
|
128 |
|
129 |
|
130 |
|
131 |
|
132 |
|
133 |
|
134 |
|
135 |
|
136 |
|
137 |
|
138 |
|
139 |
|
140 | swcrcRoots?: boolean | MatchPattern | MatchPattern[];
|
141 | |
142 |
|
143 |
|
144 |
|
145 |
|
146 |
|
147 |
|
148 |
|
149 |
|
150 | inputSourceMap?: boolean | string;
|
151 | |
152 |
|
153 |
|
154 |
|
155 |
|
156 | sourceFileName?: string;
|
157 | |
158 |
|
159 |
|
160 | sourceRoot?: string;
|
161 | plugin?: Plugin;
|
162 | isModule?: boolean;
|
163 | }
|
164 | export interface CallerOptions {
|
165 | name: string;
|
166 | [key: string]: any;
|
167 | }
|
168 | export declare type Swcrc = Config | Config[];
|
169 |
|
170 |
|
171 |
|
172 | export interface Config {
|
173 | |
174 |
|
175 |
|
176 | test?: string | string[];
|
177 | |
178 |
|
179 |
|
180 | exclude?: string | string[];
|
181 | env?: EnvConfig;
|
182 | jsc?: JscConfig;
|
183 | module?: ModuleConfig;
|
184 | minify?: boolean;
|
185 | /**
|
186 | * - true to generate a sourcemap for the code and include it in the result object.
|
187 | * - "inline" to generate a sourcemap and append it as a data URL to the end of the code, but not include it in the result object.
|
188 | * - "both" is the same as inline, but will include the map in the result object.
|
189 | *
|
190 | * `swc-cli` overloads some of these to also affect how maps are written to disk:
|
191 | *
|
192 | * - true will write the map to a .map file on disk
|
193 | * - "inline" will write the file directly, so it will have a data: containing the map
|
194 | * - "both" will write the file with a data: URL and also a .map.
|
195 | * - Note: These options are bit weird, so it may make the most sense to just use true
|
196 | * and handle the rest in your own code, depending on your use case.
|
197 | */
|
198 | sourceMaps?: boolean | "inline" | "both";
|
199 | }
|
200 | /**
|
201 | * Configuration ported from babel-preset-env
|
202 | */
|
203 | export interface EnvConfig {
|
204 | mode?: "usage" | "entry";
|
205 | debug?: boolean;
|
206 | dynamicImport?: boolean;
|
207 | loose?: boolean;
|
208 | skip?: string[];
|
209 | include?: string[];
|
210 | exclude?: string[];
|
211 | |
212 |
|
213 |
|
214 |
|
215 | coreJs?: string;
|
216 | targets?: any;
|
217 | path?: string;
|
218 | shippedProposals?: boolean;
|
219 | |
220 |
|
221 |
|
222 | forceAllTransforms?: boolean;
|
223 | }
|
224 | export interface JscConfig {
|
225 | loose?: boolean;
|
226 | |
227 |
|
228 |
|
229 | parser?: ParserConfig;
|
230 | transform?: TransformConfig;
|
231 | |
232 |
|
233 |
|
234 | externalHelpers?: boolean;
|
235 | |
236 |
|
237 |
|
238 | target?: JscTarget;
|
239 | }
|
240 | export declare type JscTarget = "es3" | "es5" | "es2015" | "es2016" | "es2017" | "es2018" | "es2019" | "es2020";
|
241 | export declare type ParserConfig = TsParserConfig | EsParserConfig;
|
242 | export interface TsParserConfig {
|
243 | syntax: "typescript";
|
244 | |
245 |
|
246 |
|
247 | tsx?: boolean;
|
248 | |
249 |
|
250 |
|
251 | decorators?: boolean;
|
252 | |
253 |
|
254 |
|
255 | dynamicImport?: boolean;
|
256 | }
|
257 | export interface EsParserConfig {
|
258 | syntax: "ecmascript";
|
259 | |
260 |
|
261 |
|
262 | jsx?: boolean;
|
263 | |
264 |
|
265 |
|
266 |
|
267 |
|
268 | numericSeparator?: boolean;
|
269 | |
270 |
|
271 |
|
272 | classPrivateProperty?: boolean;
|
273 | |
274 |
|
275 |
|
276 |
|
277 |
|
278 | privateMethod?: boolean;
|
279 | |
280 |
|
281 |
|
282 | classProperty?: boolean;
|
283 | |
284 |
|
285 |
|
286 | functionBind?: boolean;
|
287 | |
288 |
|
289 |
|
290 | decorators?: boolean;
|
291 | |
292 |
|
293 |
|
294 | decoratorsBeforeExport?: boolean;
|
295 | |
296 |
|
297 |
|
298 | dynamicImport?: boolean;
|
299 | |
300 |
|
301 |
|
302 |
|
303 |
|
304 | nullishCoalescing?: boolean;
|
305 | |
306 |
|
307 |
|
308 | exportDefaultFrom?: boolean;
|
309 | |
310 |
|
311 |
|
312 | exportNamespaceFrom?: boolean;
|
313 | |
314 |
|
315 |
|
316 | importMeta?: boolean;
|
317 | }
|
318 |
|
319 |
|
320 |
|
321 | export interface TransformConfig {
|
322 | |
323 |
|
324 |
|
325 | react?: ReactConfig;
|
326 | constModules?: ConstModulesConfig;
|
327 | |
328 |
|
329 |
|
330 | optimizer?: OptimizerConfig;
|
331 | |
332 |
|
333 |
|
334 | legacyDecorator?: boolean;
|
335 | |
336 |
|
337 |
|
338 | decoratorMetadata?: boolean;
|
339 | }
|
340 | export interface ReactConfig {
|
341 | |
342 |
|
343 |
|
344 |
|
345 |
|
346 | pragma: String;
|
347 | |
348 |
|
349 |
|
350 |
|
351 |
|
352 | pragmaFrag: String;
|
353 | |
354 |
|
355 |
|
356 |
|
357 |
|
358 |
|
359 |
|
360 |
|
361 | throwIfNamespace: boolean;
|
362 | |
363 |
|
364 |
|
365 |
|
366 |
|
367 |
|
368 |
|
369 | development: boolean;
|
370 | |
371 |
|
372 |
|
373 | useBuiltins: boolean;
|
374 | }
|
375 |
|
376 |
|
377 |
|
378 |
|
379 |
|
380 |
|
381 | export interface ConstModulesConfig {
|
382 | globals?: {
|
383 | [module: string]: {
|
384 | [name: string]: string;
|
385 | };
|
386 | };
|
387 | }
|
388 | export interface OptimizerConfig {
|
389 | globals?: GlobalPassOption;
|
390 | jsonify?: {
|
391 | minCost: number;
|
392 | };
|
393 | }
|
394 |
|
395 |
|
396 |
|
397 | export interface GlobalPassOption {
|
398 | |
399 |
|
400 |
|
401 |
|
402 |
|
403 | vars?: {
|
404 | [key: string]: string;
|
405 | };
|
406 | |
407 |
|
408 |
|
409 |
|
410 |
|
411 | envs?: string[];
|
412 | }
|
413 | export declare type ModuleConfig = CommonJsConfig | UmdConfig | AmdConfig;
|
414 | export interface BaseModuleConfig {
|
415 | |
416 |
|
417 |
|
418 |
|
419 |
|
420 |
|
421 |
|
422 |
|
423 |
|
424 |
|
425 | strict?: boolean;
|
426 | |
427 |
|
428 |
|
429 |
|
430 |
|
431 | strict_mode?: boolean;
|
432 | |
433 |
|
434 |
|
435 |
|
436 |
|
437 |
|
438 |
|
439 |
|
440 |
|
441 |
|
442 |
|
443 |
|
444 |
|
445 |
|
446 |
|
447 |
|
448 |
|
449 |
|
450 |
|
451 |
|
452 |
|
453 |
|
454 |
|
455 |
|
456 |
|
457 |
|
458 |
|
459 |
|
460 |
|
461 |
|
462 |
|
463 |
|
464 |
|
465 |
|
466 | lazy?: boolean | string[];
|
467 | |
468 |
|
469 |
|
470 |
|
471 |
|
472 |
|
473 |
|
474 |
|
475 |
|
476 |
|
477 | noInterop?: boolean;
|
478 | }
|
479 | export interface CommonJsConfig extends BaseModuleConfig {
|
480 | type: "commonjs";
|
481 | }
|
482 | export interface UmdConfig extends BaseModuleConfig {
|
483 | type: "umd";
|
484 | globals?: {
|
485 | [key: string]: string;
|
486 | };
|
487 | }
|
488 | export interface AmdConfig extends BaseModuleConfig {
|
489 | type: "amd";
|
490 | moduleId: string;
|
491 | }
|
492 | export interface Output {
|
493 | |
494 |
|
495 |
|
496 | code: string;
|
497 | |
498 |
|
499 |
|
500 | map?: string;
|
501 | }
|
502 | export interface MatchPattern {
|
503 | }
|
504 | export interface Span {
|
505 | start: number;
|
506 | end: number;
|
507 | ctxt: number;
|
508 | }
|
509 | export interface Node {
|
510 | type: string;
|
511 | }
|
512 | export interface HasSpan {
|
513 | span: Span;
|
514 | }
|
515 | export interface HasDecorator {
|
516 | decorators?: Decorator[];
|
517 | }
|
518 | export interface Class extends HasSpan, HasDecorator {
|
519 | body: ClassMember[];
|
520 | superClass?: Expression;
|
521 | is_abstract: boolean;
|
522 | typeParams: TsTypeParameterDeclaration;
|
523 | superTypeParams?: TsTypeParameterInstantiation;
|
524 | implements: TsExpressionWithTypeArguments[];
|
525 | }
|
526 | export declare type ClassMember = Constructor | ClassMethod | PrivateMethod | ClassProperty | PrivateProperty | TsIndexSignature;
|
527 | export interface ClassPropertyBase extends Node, HasSpan, HasDecorator {
|
528 | value?: Expression;
|
529 | typeAnnotation?: TsTypeAnnotation;
|
530 | is_static: boolean;
|
531 | computed: boolean;
|
532 | accessibility?: Accessibility;
|
533 | is_abstract: boolean;
|
534 | is_optional: boolean;
|
535 | readonly: boolean;
|
536 | definite: boolean;
|
537 | }
|
538 | export interface ClassProperty extends ClassPropertyBase {
|
539 | type: "ClassProperty";
|
540 | key: Expression;
|
541 | }
|
542 | export interface PrivateProperty extends ClassPropertyBase {
|
543 | type: "PrivateProperty";
|
544 | key: PrivateName;
|
545 | }
|
546 | export interface Param extends Node, HasSpan, HasDecorator {
|
547 | type: "Parameter";
|
548 | pat: Pattern;
|
549 | }
|
550 | export interface Constructor extends Node, HasSpan {
|
551 | type: "Constructor";
|
552 | key: PropertyName;
|
553 | params: (Param | TsParameterProperty)[];
|
554 | body: BlockStatement;
|
555 | accessibility?: Accessibility;
|
556 | is_optional: boolean;
|
557 | }
|
558 | export interface ClassMethodBase extends Node, HasSpan {
|
559 | function: Fn;
|
560 | kind: MethodKind;
|
561 | is_static: boolean;
|
562 | accessibility?: Accessibility;
|
563 | is_abstract: boolean;
|
564 | is_optional: boolean;
|
565 | }
|
566 | export interface ClassMethod extends ClassMethodBase {
|
567 | type: "ClassMethod";
|
568 | key: PropertyName;
|
569 | }
|
570 | export interface PrivateMethod extends ClassMethodBase {
|
571 | type: "PrivateMethod";
|
572 | key: PrivateName;
|
573 | }
|
574 | export interface Decorator extends Node, HasSpan {
|
575 | type: "Decorator";
|
576 | expression: Expression;
|
577 | }
|
578 | export declare type MethodKind = "method" | "setter" | "getter";
|
579 | export declare type Declaration = ClassDeclaration | FunctionDeclaration | VariableDeclaration | TsInterfaceDeclaration | TsTypeAliasDeclaration | TsEnumDeclaration | TsModuleDeclaration;
|
580 | export interface FunctionDeclaration extends Fn {
|
581 | type: "FunctionDeclaration";
|
582 | ident: Identifier;
|
583 | declare: boolean;
|
584 | }
|
585 | export interface ClassDeclaration extends Class, Node {
|
586 | type: "ClassDeclaration";
|
587 | identifier: Identifier;
|
588 | declare: boolean;
|
589 | }
|
590 | export interface VariableDeclaration extends Node, HasSpan {
|
591 | type: "VariableDeclaration";
|
592 | kind: VariableDeclarationKind;
|
593 | declare: boolean;
|
594 | declarations: VariableDeclarator[];
|
595 | }
|
596 | export declare type VariableDeclarationKind = "get" | "let" | "const";
|
597 | export interface VariableDeclarator extends Node, HasSpan {
|
598 | type: "VariableDeclarator";
|
599 | id: Pattern;
|
600 | init?: Expression;
|
601 | definite: boolean;
|
602 | }
|
603 | export declare type Expression = ThisExpression | ArrayExpression | ObjectExpression | FunctionExpression | UnaryExpression | UpdateExpression | BinaryExpression | AssignmentExpression | MemberExpression | ConditionalExpression | CallExpression | NewExpression | SequenceExpression | Identifier | Literal | TemplateLiteral | TaggedTemplateExpression | ArrowFunctionExpression | ClassExpression | YieldExpression | MetaProperty | AwaitExpression | ParenthesisExpression | JSXMemberExpression | JSXNamespacedName | JSXEmptyExpression | JSXElement | JSXFragment | TsTypeAssertion | TsNonNullExpression | TsAsExpression | PrivateName | OptionalChainingExpression | Invalid;
|
604 | interface ExpressionBase extends Node, HasSpan {
|
605 | }
|
606 | export interface OptionalChainingExpression extends ExpressionBase {
|
607 | type: "OptionalChainingExpression";
|
608 | |
609 |
|
610 |
|
611 | expr: Expression;
|
612 | }
|
613 | export interface ThisExpression extends ExpressionBase {
|
614 | type: "ThisExpression";
|
615 | }
|
616 | export interface ArrayExpression extends ExpressionBase {
|
617 | type: "ArrayExpression";
|
618 | elements: (Expression | SpreadElement | undefined)[];
|
619 | }
|
620 | export interface ObjectExpression extends ExpressionBase {
|
621 | type: "ObjectExpression";
|
622 | properties: (Property | SpreadElement)[];
|
623 | }
|
624 | export interface Argument {
|
625 | spread: Span;
|
626 | expression: Expression;
|
627 | }
|
628 | export declare type PropertOrSpread = Property | SpreadElement;
|
629 | export interface SpreadElement extends Node {
|
630 | type: "SpreadElement";
|
631 | spread: Span;
|
632 | arguments: Expression;
|
633 | }
|
634 | export interface UnaryExpression extends ExpressionBase {
|
635 | type: "UnaryExpression";
|
636 | operator: UnaryOperator;
|
637 | argument: Expression;
|
638 | }
|
639 | export interface UpdateExpression extends ExpressionBase {
|
640 | type: "UpdateExpression";
|
641 | operator: UpdateOperator;
|
642 | prefix: boolean;
|
643 | argument: Expression;
|
644 | }
|
645 | export interface BinaryExpression extends ExpressionBase {
|
646 | type: "BinaryExpression";
|
647 | operator: BinaryOperator;
|
648 | left: Expression;
|
649 | right: Expression;
|
650 | }
|
651 | export interface FunctionExpression extends Fn, ExpressionBase {
|
652 | type: "FunctionExpression";
|
653 | identifier: Identifier;
|
654 | }
|
655 | export interface ClassExpression extends Class, ExpressionBase {
|
656 | type: "ClassExpression";
|
657 | identifier: Identifier;
|
658 | }
|
659 | export interface AssignmentExpression extends ExpressionBase {
|
660 | type: "AssignmentExpression";
|
661 | operator: AssignmentOperator;
|
662 | left: Pattern | Expression;
|
663 | right: Expression;
|
664 | }
|
665 | export interface MemberExpression extends ExpressionBase {
|
666 | type: "MemberExpression";
|
667 | object: Expression | Super;
|
668 | property: Expression;
|
669 | computed: boolean;
|
670 | }
|
671 | export interface ConditionalExpression extends ExpressionBase {
|
672 | type: "ConditionalExpression";
|
673 | test: Expression;
|
674 | consequent: Expression;
|
675 | alternate: Expression;
|
676 | }
|
677 | export interface Super extends Node, HasSpan {
|
678 | type: "Super";
|
679 | }
|
680 | export interface CallExpression extends ExpressionBase {
|
681 | type: "CallExpression";
|
682 | callee: Expression | Super;
|
683 | arguments: Argument[];
|
684 | typeArguments?: TsTypeParameterInstantiation;
|
685 | }
|
686 | export interface NewExpression extends ExpressionBase {
|
687 | type: "NewExpression";
|
688 | callee: Expression;
|
689 | arguments: Argument[];
|
690 | typeArguments?: TsTypeParameterInstantiation;
|
691 | }
|
692 | export interface SequenceExpression extends ExpressionBase {
|
693 | type: "SequenceExpression";
|
694 | expressions: Expression[];
|
695 | }
|
696 | export interface ArrowFunctionExpression extends ExpressionBase {
|
697 | type: "ArrowFunctionExpression";
|
698 | params: Pattern[];
|
699 | body: BlockStatement | Expression;
|
700 | async: boolean;
|
701 | generator: boolean;
|
702 | typeParameters?: TsTypeParameterDeclaration;
|
703 | returnType?: TsTypeAnnotation;
|
704 | }
|
705 | export interface YieldExpression extends ExpressionBase {
|
706 | type: "YieldExpression";
|
707 | argument?: Expression;
|
708 | delegate: boolean;
|
709 | }
|
710 | export interface MetaProperty extends Node {
|
711 | type: "MetaProperty";
|
712 | meta: Identifier;
|
713 | property: Identifier;
|
714 | }
|
715 | export interface AwaitExpression extends ExpressionBase {
|
716 | type: "AwaitExpression";
|
717 | argument: Expression;
|
718 | }
|
719 | export interface TplBase {
|
720 | expressions: Expression[];
|
721 | quasis: TemplateElement[];
|
722 | }
|
723 | export interface TemplateLiteral extends ExpressionBase, TplBase {
|
724 | type: "TemplateLiteral";
|
725 | }
|
726 | export interface TaggedTemplateExpression extends ExpressionBase, TplBase {
|
727 | type: "TaggedTemplateExpression";
|
728 | tag: Expression;
|
729 | typeParameters: TsTypeParameterInstantiation;
|
730 | }
|
731 | export interface TemplateElement extends ExpressionBase {
|
732 | type: "TemplateElement";
|
733 | tail: boolean;
|
734 | cooked: StringLiteral;
|
735 | raw: StringLiteral;
|
736 | }
|
737 | export interface ParenthesisExpression extends ExpressionBase {
|
738 | type: "ParenthesisExpression";
|
739 | expression: Expression;
|
740 | }
|
741 | export interface Fn extends HasSpan, HasDecorator {
|
742 | params: Param[];
|
743 | body: BlockStatement;
|
744 | generator: boolean;
|
745 | async: boolean;
|
746 | typeParameters?: TsTypeParameterDeclaration;
|
747 | returnType?: TsTypeAnnotation;
|
748 | }
|
749 | interface PatternBase {
|
750 | typeAnnotation?: TsTypeAnnotation;
|
751 | }
|
752 | export interface Identifier extends HasSpan, PatternBase {
|
753 | type: "Identifier";
|
754 | value: string;
|
755 | optional: boolean;
|
756 | }
|
757 | export interface PrivateName extends ExpressionBase {
|
758 | type: "PrivateName";
|
759 | id: Identifier;
|
760 | }
|
761 | export declare type JSXObject = JSXMemberExpression | Identifier;
|
762 | export interface JSXMemberExpression extends Node {
|
763 | type: "JSXMemberExpression";
|
764 | object: JSXObject;
|
765 | property: Identifier;
|
766 | }
|
767 |
|
768 |
|
769 |
|
770 | export interface JSXNamespacedName extends Node {
|
771 | type: "JSXNamespacedName";
|
772 | namespace: Identifier;
|
773 | name: Identifier;
|
774 | }
|
775 | export interface JSXEmptyExpression extends Node, HasSpan {
|
776 | type: "JSXEmptyExpression";
|
777 | }
|
778 | export interface JSXExpressionContainer extends Node {
|
779 | type: "JSXExpressionContainer";
|
780 | expression: JSXExpression;
|
781 | }
|
782 | export declare type JSXExpression = JSXEmptyExpression | Expression;
|
783 | export interface JSXSpreadChild extends Node {
|
784 | type: "JSXSpreadChild";
|
785 | expression: Expression;
|
786 | }
|
787 | export declare type JSXElementName = Identifier | JSXMemberExpression | JSXNamespacedName;
|
788 | export interface JSXOpeningElement extends Node, HasSpan {
|
789 | type: "JSXOpeningElement";
|
790 | name: JSXElementName;
|
791 | attrs?: JSXAttributeOrSpread[];
|
792 | selfClosing: boolean;
|
793 | typeArguments?: TsTypeParameterInstantiation;
|
794 | }
|
795 | export declare type JSXAttributeOrSpread = JSXAttribute | SpreadElement;
|
796 | export interface JSXClosingElement extends Node, HasSpan {
|
797 | type: "JSXClosingElement";
|
798 | name: JSXElementName;
|
799 | }
|
800 | export interface JSXAttribute extends Node, HasSpan {
|
801 | type: "JSXAttribute";
|
802 | name: JSXAttributeName;
|
803 | value?: JSXAttrValue;
|
804 | }
|
805 | export declare type JSXAttributeName = Identifier | JSXNamespacedName;
|
806 | export declare type JSXAttrValue = Literal | JSXExpressionContainer | JSXElement | JSXFragment;
|
807 | export interface JSXText extends Node, HasSpan {
|
808 | type: "JSXText";
|
809 | value: string;
|
810 | raw: string;
|
811 | }
|
812 | export interface JSXElement extends Node, HasSpan {
|
813 | type: "JSXElement";
|
814 | opening: JSXOpeningElement;
|
815 | children: JSXElementChild[];
|
816 | closing?: JSXClosingElement;
|
817 | }
|
818 | export declare type JSXElementChild = JSXText | JSXExpressionContainer | JSXSpreadChild | JSXElement | JSXFragment;
|
819 | export interface JSXFragment extends Node, HasSpan {
|
820 | type: "JSXFragment";
|
821 | opening: JSXOpeningFragment;
|
822 | children: JSXElementChild[];
|
823 | closing: JSXClosingFragment;
|
824 | }
|
825 | export interface JSXOpeningFragment extends Node, HasSpan {
|
826 | type: "JSXOpeningFragment";
|
827 | }
|
828 | export interface JSXClosingFragment extends Node, HasSpan {
|
829 | type: "JSXClosingFragment";
|
830 | }
|
831 | export declare type Literal = StringLiteral | BooleanLiteral | NullLiteral | NumericLiteral | RegExpLiteral | JSXText;
|
832 | export interface StringLiteral extends Node, HasSpan {
|
833 | type: "StringLiteral";
|
834 | value: string;
|
835 | has_escape: boolean;
|
836 | }
|
837 | export interface BooleanLiteral extends Node, HasSpan {
|
838 | type: "BooleanLiteral";
|
839 | value: boolean;
|
840 | }
|
841 | export interface NullLiteral extends Node, HasSpan {
|
842 | type: "NullLiteral";
|
843 | }
|
844 | export interface RegExpLiteral extends Node, HasSpan {
|
845 | type: "RegExpLiteral";
|
846 | pattern: string;
|
847 | flags: string;
|
848 | }
|
849 | export interface NumericLiteral extends Node, HasSpan {
|
850 | type: "NumericLiteral";
|
851 | value: number;
|
852 | }
|
853 | export declare type ModuleDeclaration = ImportDeclaration | ExportDeclaration | ExportNamedDeclaration | ExportDefaultDeclaration | ExportDefaultExpression | ExportAllDeclaration | TsImportEqualsDeclaration | TsExportAssignment | TsNamespaceExportDeclaration;
|
854 | export interface ExportDefaultExpression extends Node, HasSpan {
|
855 | type: "ExportDefaultExpression";
|
856 | expression: Expression;
|
857 | }
|
858 | export interface ExportDeclaration extends Node, HasSpan {
|
859 | type: "ExportDeclaration";
|
860 | declaration: Declaration;
|
861 | }
|
862 | export interface ImportDeclaration extends Node, HasSpan {
|
863 | type: "ImportDeclaration";
|
864 | specifiers: ImportSpecifier[];
|
865 | source: StringLiteral;
|
866 | }
|
867 | export interface ExportAllDeclaration extends Node, HasSpan {
|
868 | type: "ExportAllDeclaration";
|
869 | source: StringLiteral;
|
870 | }
|
871 |
|
872 |
|
873 |
|
874 |
|
875 | export interface ExportNamedDeclaration extends Node, HasSpan {
|
876 | type: "ExportNamedDeclaration";
|
877 | specifiers: ExportSpecifier[];
|
878 | source?: StringLiteral;
|
879 | }
|
880 | export interface ExportDefaultDeclaration extends Node, HasSpan {
|
881 | type: "ExportDefaultDeclaration";
|
882 | decl: DefaultDecl;
|
883 | }
|
884 | export declare type DefaultDecl = ClassExpression | FunctionExpression | TsInterfaceDeclaration;
|
885 | export declare type ImportSpecifier = NamedImportSpecifier | ImportDefaultSpecifier | ImportNamespaceSpecifier;
|
886 |
|
887 |
|
888 |
|
889 | export interface ImportDefaultSpecifier extends Node, HasSpan {
|
890 | type: "ImportDefaultSpecifier";
|
891 | local: Identifier;
|
892 | }
|
893 |
|
894 |
|
895 |
|
896 | export interface ImportNamespaceSpecifier extends Node, HasSpan {
|
897 | type: "ImportNamespaceSpecifier";
|
898 | local: Identifier;
|
899 | }
|
900 |
|
901 |
|
902 |
|
903 |
|
904 |
|
905 |
|
906 |
|
907 |
|
908 |
|
909 | export interface NamedImportSpecifier extends Node, HasSpan {
|
910 | type: "ImportSpecifier";
|
911 | local: Identifier;
|
912 | imported: Identifier;
|
913 | }
|
914 | export declare type ExportSpecifier = ExportNamespaceSpecifer | ExportDefaultSpecifier | NamedExportSpecifier;
|
915 |
|
916 |
|
917 |
|
918 | export interface ExportNamespaceSpecifer extends Node, HasSpan {
|
919 | type: "ExportNamespaceSpecifer";
|
920 | name: Identifier;
|
921 | }
|
922 | export interface ExportDefaultSpecifier extends Node, HasSpan {
|
923 | type: "ExportDefaultSpecifier";
|
924 | exported: Identifier;
|
925 | }
|
926 | export interface NamedExportSpecifier extends Node, HasSpan {
|
927 | type: "ExportSpecifier";
|
928 | orig: Identifier;
|
929 | |
930 |
|
931 |
|
932 | exported: Identifier;
|
933 | }
|
934 | interface HasInterpreter {
|
935 | |
936 |
|
937 |
|
938 | interpreter: string;
|
939 | }
|
940 | export declare type Program = Module | Script;
|
941 | export interface Module extends Node, HasSpan, HasInterpreter {
|
942 | type: "Module";
|
943 | body: ModuleItem[];
|
944 | }
|
945 | export interface Script extends Node, HasSpan, HasInterpreter {
|
946 | type: "Script";
|
947 | body: Statement[];
|
948 | }
|
949 | export declare type ModuleItem = ModuleDeclaration | Statement;
|
950 | export declare type BinaryOperator = "==" | "!=" | "===" | "!==" | "<" | "<=" | ">" | ">=" | "<<" | ">>" | ">>>" | "+" | "-" | "*" | "/" | "%" | "**" | "|" | "^" | "&" | "||" | "&&" | "in" | "instanceof" | "??";
|
951 | export declare type AssignmentOperator = "=" | "+=" | "-=" | "*=" | "/=" | "%=" | "**=" | "<<=" | ">>=" | ">>>=" | "|=" | "^=" | "&=";
|
952 | export declare type UpdateOperator = "++" | "--";
|
953 | export declare type UnaryOperator = "-" | "+" | "!" | "~" | "typeof" | "void" | "delete";
|
954 | export declare type Pattern = Identifier | ArrayPattern | RestElement | ObjectPattern | AssignmentPattern | Invalid | Expression;
|
955 | export interface ArrayPattern extends Node, HasSpan, PatternBase {
|
956 | type: "ArrayPattern";
|
957 | elements: (Pattern | undefined)[];
|
958 | }
|
959 | export interface ObjectPattern extends Node, HasSpan, PatternBase {
|
960 | type: "ObjectPattern";
|
961 | props: ObjectPatternProperty[];
|
962 | }
|
963 | export interface AssignmentPattern extends Node, HasSpan, PatternBase {
|
964 | type: "AssignmentPattern";
|
965 | left: Pattern;
|
966 | right: Expression;
|
967 | }
|
968 | export interface RestElement extends Node, HasSpan, PatternBase {
|
969 | type: "RestElement";
|
970 | rest: Span;
|
971 | argument: Pattern;
|
972 | }
|
973 | export declare type ObjectPatternProperty = KeyValuePatternProperty | AssignmentPatternProperty | RestElement;
|
974 |
|
975 |
|
976 |
|
977 | export interface KeyValuePatternProperty extends Node {
|
978 | type: "KeyValuePatternProperty";
|
979 | key: PropertyName;
|
980 | value: Pattern;
|
981 | }
|
982 |
|
983 |
|
984 |
|
985 | export interface AssignmentPatternProperty extends Node, HasSpan {
|
986 | type: "AssignmentPatternProperty";
|
987 | key: Identifier;
|
988 | value?: Expression;
|
989 | }
|
990 |
|
991 | export declare type Property = Identifier | KeyValueProperty | AssignmentProperty | GetterProperty | SetterProperty | MethodProperty;
|
992 | interface PropBase extends Node {
|
993 | key: PropertyName;
|
994 | }
|
995 | export interface KeyValueProperty extends PropBase {
|
996 | type: "KeyValueProperty";
|
997 | value: Expression;
|
998 | }
|
999 | export interface AssignmentProperty extends Node {
|
1000 | type: "AssignmentProperty";
|
1001 | key: Identifier;
|
1002 | value: Expression;
|
1003 | }
|
1004 | export interface GetterProperty extends PropBase, HasSpan {
|
1005 | type: "GetterProperty";
|
1006 | typeAnnotation?: TsTypeAnnotation;
|
1007 | body: BlockStatement;
|
1008 | }
|
1009 | export interface SetterProperty extends PropBase, HasSpan {
|
1010 | type: "SetterProperty";
|
1011 | param: Pattern;
|
1012 | body: BlockStatement;
|
1013 | }
|
1014 | export interface MethodProperty extends PropBase, Fn {
|
1015 | type: "MethodProperty";
|
1016 | }
|
1017 | export declare type PropertyName = Identifier | StringLiteral | NumericLiteral | ComputedPropName;
|
1018 | export interface ComputedPropName extends Node, HasSpan {
|
1019 | type: "Computed";
|
1020 | expression: Expression;
|
1021 | }
|
1022 | export interface BlockStatement extends Node, HasSpan {
|
1023 | type: "BlockStatement";
|
1024 | stmts: Statement[];
|
1025 | }
|
1026 | export interface ExpressionStatement extends Node, HasSpan {
|
1027 | type: "ExpressionStatement";
|
1028 | expression: Expression;
|
1029 | }
|
1030 | export declare type Statement = ExpressionStatement | BlockStatement | EmptyStatement | DebuggerStatement | WithStatement | ReturnStatement | LabeledStatement | BreakStatement | ContinueStatement | IfStatement | SwitchStatement | ThrowStatement | TryStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | Declaration;
|
1031 | export interface EmptyStatement extends Node, HasSpan {
|
1032 | type: "EmptyStatement";
|
1033 | }
|
1034 | export interface DebuggerStatement extends Node, HasSpan {
|
1035 | type: "DebuggerStatement";
|
1036 | }
|
1037 | export interface WithStatement extends Node, HasSpan {
|
1038 | type: "WithStatement";
|
1039 | object: Expression;
|
1040 | body: Statement;
|
1041 | }
|
1042 | export interface ReturnStatement extends Node, HasSpan {
|
1043 | type: "ReturnStatement";
|
1044 | argument: Expression;
|
1045 | }
|
1046 | export interface LabeledStatement extends Node, HasSpan {
|
1047 | type: "LabeledStatement";
|
1048 | label: Identifier;
|
1049 | body: Statement;
|
1050 | }
|
1051 | export interface BreakStatement extends Node, HasSpan {
|
1052 | type: "BreakStatement";
|
1053 | label: Identifier;
|
1054 | }
|
1055 | export interface ContinueStatement extends Node, HasSpan {
|
1056 | type: "ContinueStatement";
|
1057 | label: Identifier;
|
1058 | }
|
1059 | export interface IfStatement extends Node, HasSpan {
|
1060 | type: "IfStatement";
|
1061 | test: Expression;
|
1062 | consequent: Statement;
|
1063 | alternate?: Statement;
|
1064 | }
|
1065 | export interface SwitchStatement extends Node, HasSpan {
|
1066 | type: "SwitchStatement";
|
1067 | discriminant: Expression;
|
1068 | cases: SwitchCase[];
|
1069 | }
|
1070 | export interface ThrowStatement extends Node, HasSpan {
|
1071 | type: "ThrowStatement";
|
1072 | argument: Expression;
|
1073 | }
|
1074 | export interface TryStatement extends Node, HasSpan {
|
1075 | type: "TryStatement";
|
1076 | block: BlockStatement;
|
1077 | handler?: CatchClause;
|
1078 | finalizer: BlockStatement;
|
1079 | }
|
1080 | export interface WhileStatement extends Node, HasSpan {
|
1081 | type: "WhileStatement";
|
1082 | test: Expression;
|
1083 | body: Statement;
|
1084 | }
|
1085 | export interface DoWhileStatement extends Node, HasSpan {
|
1086 | type: "DoWhileStatement";
|
1087 | test: Expression;
|
1088 | body: Statement;
|
1089 | }
|
1090 | export interface ForStatement extends Node, HasSpan {
|
1091 | type: "ForStatement";
|
1092 | init?: VariableDeclaration | Expression;
|
1093 | test?: Expression;
|
1094 | update?: Expression;
|
1095 | body: Statement;
|
1096 | }
|
1097 | export interface ForInStatement extends Node, HasSpan {
|
1098 | type: "ForInStatement";
|
1099 | left: VariableDeclaration | Pattern;
|
1100 | right: Expression;
|
1101 | body: Statement;
|
1102 | }
|
1103 | export interface ForOfStatement extends Node, HasSpan {
|
1104 | type: "ForOfStatement";
|
1105 | |
1106 |
|
1107 |
|
1108 |
|
1109 |
|
1110 | await: Span;
|
1111 | left: VariableDeclaration | Pattern;
|
1112 | right: Expression;
|
1113 | body: Statement;
|
1114 | }
|
1115 | export interface SwitchCase extends Node, HasSpan {
|
1116 | type: "SwitchCase";
|
1117 | |
1118 |
|
1119 |
|
1120 | test?: Expression;
|
1121 | consequent: Statement[];
|
1122 | }
|
1123 | export interface CatchClause extends Node, HasSpan {
|
1124 | type: "CatchClause";
|
1125 | |
1126 |
|
1127 |
|
1128 | param: Pattern;
|
1129 | body: BlockStatement;
|
1130 | }
|
1131 | export interface TsTypeAnnotation extends Node, HasSpan {
|
1132 | type: "TsTypeAnnotation";
|
1133 | typeAnnotation: TsType;
|
1134 | }
|
1135 | export interface TsTypeParameterDeclaration extends Node, HasSpan {
|
1136 | type: "TsTypeParameterDeclaration";
|
1137 | parameters: TsTypeParameter[];
|
1138 | }
|
1139 | export interface TsTypeParameter extends Node, HasSpan {
|
1140 | type: "TsTypeParameter";
|
1141 | name: Identifier;
|
1142 | constraint: TsType;
|
1143 | default: TsType;
|
1144 | }
|
1145 | export interface TsTypeParameterInstantiation extends Node, HasSpan {
|
1146 | type: "TsTypeParameterInstantiation";
|
1147 | params: TsType[];
|
1148 | }
|
1149 | export interface TsParameterProperty extends Node, HasSpan, HasDecorator {
|
1150 | type: "TsParameterProperty";
|
1151 | accessibility?: Accessibility;
|
1152 | readonly: boolean;
|
1153 | param: TsParameterPropertyParameter;
|
1154 | }
|
1155 | export declare type TsParameterPropertyParameter = Identifier | AssignmentPattern;
|
1156 | export interface TsQualifiedName extends Node {
|
1157 | type: "TsQualifiedName";
|
1158 | left: TsEntityName;
|
1159 | right: Identifier;
|
1160 | }
|
1161 | export declare type TsEntityName = TsQualifiedName | Identifier;
|
1162 | export declare type TsSignatureDeclaration = TsCallSignatureDeclaration | TsConstructSignatureDeclaration | TsMethodSignature | TsFunctionType | TsConstructorType;
|
1163 | export declare type TsTypeElement = TsCallSignatureDeclaration | TsConstructSignatureDeclaration | TsPropertySignature | TsMethodSignature | TsIndexSignature;
|
1164 | export interface TsCallSignatureDeclaration extends Node, HasSpan {
|
1165 | type: "TsCallSignatureDeclaration";
|
1166 | params: TsFnParameter[];
|
1167 | typeAnnotation: TsTypeAnnotation;
|
1168 | typeParams: TsTypeParameterDeclaration;
|
1169 | }
|
1170 | export interface TsConstructSignatureDeclaration extends Node, HasSpan {
|
1171 | type: "TsConstructSignatureDeclaration";
|
1172 | params: TsFnParameter[];
|
1173 | typeAnnotation: TsTypeAnnotation;
|
1174 | typeParams: TsTypeParameterDeclaration;
|
1175 | }
|
1176 | export interface TsPropertySignature extends Node, HasSpan {
|
1177 | type: "TsPropertySignature";
|
1178 | readonly: boolean;
|
1179 | key: Expression;
|
1180 | computed: boolean;
|
1181 | optional: boolean;
|
1182 | init: Expression;
|
1183 | params: TsFnParameter[];
|
1184 | typeAnnotation?: TsTypeAnnotation;
|
1185 | typeParams: TsTypeParameterDeclaration;
|
1186 | }
|
1187 | export interface TsMethodSignature extends Node, HasSpan {
|
1188 | type: "TsMethodSignature";
|
1189 | readonly: boolean;
|
1190 | key: Expression;
|
1191 | computed: boolean;
|
1192 | optional: boolean;
|
1193 | params: TsFnParameter[];
|
1194 | typeAnnotation: TsTypeAnnotation;
|
1195 | typeParams: TsTypeParameterDeclaration;
|
1196 | }
|
1197 | export interface TsIndexSignature extends Node, HasSpan {
|
1198 | type: "TsIndexSignature";
|
1199 | readonly: boolean;
|
1200 | params: TsFnParameter[];
|
1201 | typeAnnotation?: TsTypeAnnotation;
|
1202 | }
|
1203 | export declare type TsType = TsKeywordType | TsThisType | TsFnOrConstructorType | TsTypeReference | TsTypeQuery | TsTypeLiteral | TsArrayType | TsTupleType | TsOptionalType | TsRestType | TsUnionOrIntersectionType | TsConditionalType | TsInferType | TsParenthesizedType | TsTypeOperator | TsIndexedAccessType | TsMappedType | TsLiteralType | TsImportType | TsTypePredicate;
|
1204 | export declare type TsFnOrConstructorType = TsFunctionType | TsConstructorType;
|
1205 | export interface TsKeywordType extends Node, HasSpan {
|
1206 | type: "TsKeywordType";
|
1207 | kind: TsKeywordTypeKind;
|
1208 | }
|
1209 | export declare type TsKeywordTypeKind = "any" | "unknown" | "number" | "object" | "boolean" | "bigint" | "string" | "symbol" | "void" | "undefined" | "null" | "never";
|
1210 | export interface TsThisType extends Node, HasSpan {
|
1211 | type: "TsThisType";
|
1212 | }
|
1213 | export declare type TsFnParameter = Identifier | RestElement | ObjectPattern;
|
1214 | export interface TsFunctionType extends Node, HasSpan {
|
1215 | type: "TsFunctionType";
|
1216 | typeParams: TsTypeParameterDeclaration;
|
1217 | typeAnnotation: TsTypeAnnotation;
|
1218 | }
|
1219 | export interface TsConstructorType extends Node, HasSpan {
|
1220 | type: "TsConstructorType";
|
1221 | params: TsFnParameter[];
|
1222 | typeParams: TsTypeParameterDeclaration;
|
1223 | typeAnnotation: TsTypeAnnotation;
|
1224 | }
|
1225 | export interface TsTypeReference extends Node, HasSpan {
|
1226 | type: "TsTypeReference";
|
1227 | typeName: TsEntityName;
|
1228 | typeParams: TsTypeParameterInstantiation;
|
1229 | }
|
1230 | export interface TsTypePredicate extends Node, HasSpan {
|
1231 | type: "TsTypePredicate";
|
1232 | asserts: boolean;
|
1233 | paramName: TsThisTypeOrIdent;
|
1234 | typeAnnotation: TsTypeAnnotation;
|
1235 | }
|
1236 | export declare type TsThisTypeOrIdent = TsThisType | Identifier;
|
1237 | export interface TsImportType extends Node, HasSpan {
|
1238 | argument: StringLiteral;
|
1239 | qualifier?: TsEntityName;
|
1240 | typeArguments?: TsTypeParameterInstantiation;
|
1241 | }
|
1242 |
|
1243 |
|
1244 |
|
1245 | export interface TsTypeQuery extends Node, HasSpan {
|
1246 | type: "TsTypeQuery";
|
1247 | exprName: TsTypeQueryExpr;
|
1248 | }
|
1249 | export declare type TsTypeQueryExpr = TsEntityName | TsImportType;
|
1250 | export interface TsTypeLiteral extends Node, HasSpan {
|
1251 | type: "TsTypeLiteral";
|
1252 | members: TsTypeElement[];
|
1253 | }
|
1254 | export interface TsArrayType extends Node, HasSpan {
|
1255 | type: "TsArrayType";
|
1256 | elemType: TsType;
|
1257 | }
|
1258 | export interface TsTupleType extends Node, HasSpan {
|
1259 | type: "TsTupleType";
|
1260 | elemTypes: TsType[];
|
1261 | }
|
1262 | export interface TsOptionalType extends Node, HasSpan {
|
1263 | type: "TsOptionalType";
|
1264 | typeAnnotation: TsType;
|
1265 | }
|
1266 | export interface TsRestType extends Node, HasSpan {
|
1267 | type: "TsRestType";
|
1268 | typeAnnotation: TsType;
|
1269 | }
|
1270 | export declare type TsUnionOrIntersectionType = TsUnionType | TsIntersectionType;
|
1271 | export interface TsUnionType extends Node, HasSpan {
|
1272 | type: "TsUnionType";
|
1273 | types: TsType[];
|
1274 | }
|
1275 | export interface TsIntersectionType extends Node, HasSpan {
|
1276 | type: "TsIntersectionType";
|
1277 | types: TsType[];
|
1278 | }
|
1279 | export interface TsConditionalType extends Node, HasSpan {
|
1280 | type: "TsConditionalType";
|
1281 | checkType: TsType;
|
1282 | extendsType: TsType;
|
1283 | trueType: TsType;
|
1284 | falseType: TsType;
|
1285 | }
|
1286 | export interface TsInferType extends Node, HasSpan {
|
1287 | type: "TsInferType";
|
1288 | typeParam: TsTypeParameter;
|
1289 | }
|
1290 | export interface TsParenthesizedType extends Node, HasSpan {
|
1291 | type: "TsParenthesizedType";
|
1292 | typeAnnotation: TsType;
|
1293 | }
|
1294 | export interface TsTypeOperator extends Node, HasSpan {
|
1295 | type: "TsTypeOperator";
|
1296 | op: TsTypeOperatorOp;
|
1297 | typeAnnotation: TsType;
|
1298 | }
|
1299 | export declare type TsTypeOperatorOp = "keyof" | "unique";
|
1300 | export interface TsIndexedAccessType extends Node, HasSpan {
|
1301 | type: "TsIndexedAccessType";
|
1302 | objectType: TsType;
|
1303 | indexType: TsType;
|
1304 | }
|
1305 | export declare type TruePlusMinus = true | "+" | "-";
|
1306 | export interface TsMappedType extends Node, HasSpan {
|
1307 | type: "TsMappedType";
|
1308 | readonly: TruePlusMinus;
|
1309 | typeParam: TsTypeParameter;
|
1310 | optional: TruePlusMinus;
|
1311 | typeAnnotation: TsType;
|
1312 | }
|
1313 | export interface TsLiteralType extends Node, HasSpan {
|
1314 | type: "TsLiteralType";
|
1315 | literal: TsLiteral;
|
1316 | }
|
1317 | export declare type TsLiteral = NumericLiteral | StringLiteral | BooleanLiteral | TemplateLiteral;
|
1318 | export interface TsInterfaceDeclaration extends Node, HasSpan {
|
1319 | type: "TsInterfaceDeclaration";
|
1320 | id: Identifier;
|
1321 | declare: boolean;
|
1322 | typeParams?: TsTypeParameterDeclaration;
|
1323 | extends: TsExpressionWithTypeArguments[];
|
1324 | body: TsInterfaceBody;
|
1325 | }
|
1326 | export interface TsInterfaceBody extends Node, HasSpan {
|
1327 | type: "TsInterfaceBody";
|
1328 | body: TsTypeElement[];
|
1329 | }
|
1330 | export interface TsExpressionWithTypeArguments extends Node, HasSpan {
|
1331 | type: "TsExpressionWithTypeArguments";
|
1332 | expression: TsEntityName;
|
1333 | typeArguments?: TsTypeParameterInstantiation;
|
1334 | }
|
1335 | export interface TsTypeAliasDeclaration extends Node, HasSpan {
|
1336 | type: "TsTypeAliasDeclaration";
|
1337 | declare: boolean;
|
1338 | id: Identifier;
|
1339 | typeParams?: TsTypeParameterDeclaration;
|
1340 | typeAnnotation: TsType;
|
1341 | }
|
1342 | export interface TsEnumDeclaration extends Node, HasSpan {
|
1343 | type: "TsEnumDeclaration";
|
1344 | declare: boolean;
|
1345 | is_const: boolean;
|
1346 | id: Identifier;
|
1347 | member: TsEnumMember[];
|
1348 | }
|
1349 | export interface TsEnumMember extends Node, HasSpan {
|
1350 | type: "TsEnumMember";
|
1351 | id: TsEnumMemberId;
|
1352 | init?: Expression;
|
1353 | }
|
1354 | export declare type TsEnumMemberId = Identifier | StringLiteral;
|
1355 | export interface TsModuleDeclaration extends Node, HasSpan {
|
1356 | type: "TsModuleDeclaration";
|
1357 | declare: boolean;
|
1358 | global: boolean;
|
1359 | id: TsModuleName;
|
1360 | body?: TsNamespaceBody;
|
1361 | }
|
1362 |
|
1363 |
|
1364 |
|
1365 | export declare type TsNamespaceBody = TsModuleBlock | TsNamespaceDeclaration;
|
1366 | export interface TsModuleBlock extends Node, HasSpan {
|
1367 | type: "TsModuleBlock";
|
1368 | body: ModuleItem[];
|
1369 | }
|
1370 | export interface TsNamespaceDeclaration extends Node, HasSpan {
|
1371 | type: "TsNamespaceDeclaration";
|
1372 | declare: boolean;
|
1373 | global: boolean;
|
1374 | id: Identifier;
|
1375 | body: TsNamespaceBody;
|
1376 | }
|
1377 | export declare type TsModuleName = Identifier | StringLiteral;
|
1378 | export interface TsImportEqualsDeclaration extends Node, HasSpan {
|
1379 | type: "TsImportEqualsDeclaration";
|
1380 | declare: boolean;
|
1381 | is_export: boolean;
|
1382 | id: Identifier;
|
1383 | moduleRef: TsModuleReference;
|
1384 | }
|
1385 | export declare type TsModuleReference = TsEntityName | TsExternalModuleReference;
|
1386 | export interface TsExternalModuleReference extends Node, HasSpan {
|
1387 | type: "TsExternalModuleReference";
|
1388 | expression: Expression;
|
1389 | }
|
1390 | export interface TsExportAssignment extends Node, HasSpan {
|
1391 | type: "TsExportAssignment";
|
1392 | expression: Expression;
|
1393 | }
|
1394 | export interface TsNamespaceExportDeclaration extends Node, HasSpan {
|
1395 | type: "TsNamespaceExportDeclaration";
|
1396 | id: Identifier;
|
1397 | }
|
1398 | export interface TsAsExpression extends ExpressionBase {
|
1399 | type: "TsAsExpression";
|
1400 | expression: Expression;
|
1401 | typeAnnotation: TsType;
|
1402 | }
|
1403 | export interface TsTypeAssertion extends ExpressionBase {
|
1404 | type: "TsTypeAssertion";
|
1405 | expression: Expression;
|
1406 | typeAnnotation: TsType;
|
1407 | }
|
1408 | export interface TsNonNullExpression extends ExpressionBase {
|
1409 | type: "TsNonNullExpression";
|
1410 | expression: Expression;
|
1411 | }
|
1412 | export declare type Accessibility = "public" | "protected" | "private";
|
1413 | export interface Invalid extends Node, HasSpan {
|
1414 | type: "Invalid";
|
1415 | }
|
1416 | export {};
|