export interface ArrayPattern { type: 'ArrayPattern'; elements: (DestructuringPattern | null)[]; } export interface ArrowFunctionExpression { type: 'ArrowFunctionExpression'; generator: boolean; id: null; params: Parameter[]; async: boolean; } export interface AssignmentPattern { type: 'AssignmentPattern'; left: BindingName; } export declare type BindingName = BindingPattern | Identifier; export declare type BindingPattern = ArrayPattern | ObjectPattern; interface ClassDeclarationBase { id: Identifier | null; } export interface ClassDeclaration extends ClassDeclarationBase { type: 'ClassDeclaration'; } export interface ClassExpression extends ClassDeclarationBase { type: 'ClassExpression'; } export declare type DestructuringPattern = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement; export declare type Expression = ArrowFunctionExpression | ClassExpression | FunctionExpression | { type: 'UnknownExpression'; }; export interface ExportAllDeclaration { type: 'ExportAllDeclaration'; source: StringLiteral | null; exported: Identifier | null; } export declare type ExportDeclaration = ClassDeclaration | ClassExpression | FunctionDeclaration | VariableDeclaration; export interface ExportDefaultDeclaration { type: 'ExportDefaultDeclaration'; declaration: ExportDeclaration | Expression; } export interface ExportNamedDeclaration { type: 'ExportNamedDeclaration'; declaration: ExportDeclaration | null; specifiers: ExportSpecifier[]; source: StringLiteral | null; } export interface ExportSpecifier { type: 'ExportSpecifier'; local: Identifier; exported: Identifier; } export interface FunctionDeclaration extends FunctionDeclarationBase { type: 'FunctionDeclaration'; } interface FunctionDeclarationBase { id: Identifier | null; generator: boolean; async: boolean; params: Parameter[]; } export interface FunctionExpression extends FunctionDeclarationBase { type: 'FunctionExpression'; } export interface Identifier { type: 'Identifier'; name: string; } export declare type ImportClause = ImportDefaultSpecifier | ImportNamespaceSpecifier | ImportSpecifier; export interface ImportDeclaration { type: 'ImportDeclaration'; source: StringLiteral; specifiers: ImportClause[]; } export interface ImportDefaultSpecifier { type: 'ImportDefaultSpecifier'; local: Identifier; } export interface ImportNamespaceSpecifier { type: 'ImportNamespaceSpecifier'; local: Identifier; } export interface ImportSpecifier { type: 'ImportSpecifier'; local: Identifier; imported: Identifier; } interface LiteralBase { type: 'Literal'; raw: string; value: RegExp | bigint | boolean | number | string | null; } export interface NumberLiteral extends LiteralBase { value: number; } export interface ObjectPattern { type: 'ObjectPattern'; properties: (Property | RestElement)[]; } export declare type Parameter = ArrayPattern | AssignmentPattern | Identifier | ObjectPattern | RestElement; export declare type Property = PropertyNonComputedName; interface PropertyBase { type: 'Property'; key: PropertyName; computed: boolean; method: boolean; shorthand: boolean; kind: 'get' | 'init' | 'set'; } export declare type PropertyName = PropertyNameNonComputed; export declare type PropertyNameNonComputed = Identifier | NumberLiteral | StringLiteral; export interface PropertyNonComputedName extends PropertyBase { key: PropertyNameNonComputed; computed: false; } export interface RestElement { type: 'RestElement'; argument: DestructuringPattern; } export interface StringLiteral extends LiteralBase { value: string; } export interface VariableDeclaration { type: 'VariableDeclaration'; declarations: VariableDeclarator[]; kind: 'const' | 'let' | 'var'; } export interface VariableDeclarator { type: 'VariableDeclarator'; id: BindingName; init: Expression | null; } export {};