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