export declare const enum ASTTypes { JS = 0, JSHoist = 1, JSXText = 2, JSXCommonElement = 3, JSXComponent = 4, JSXComment = 5, JSXVdt = 6, JSXBlock = 7, JSXExpression = 8, JSXDirectiveIf = 9, JSXUnescapeText = 10, JSXAttribute = 11, JSXString = 12, JSXStrings = 13, JSXNone = 14 } export interface SourceLocation { line: number; column: number; } export interface ASTNode { type: ASTTypes; loc: SourceLocation; } export interface ASTJS extends ASTNode { type: ASTTypes.JS; value: string[]; spaces: number; } export interface ASTHoist extends ASTNode { type: ASTTypes.JSHoist; value: string; } export interface ASTText extends ASTNode { type: ASTTypes.JSXText; value: string; } export interface ASTBaseElement extends ASTNode { value: string; attributes: (ASTAttribute | ASTExpression)[]; directives: { [key in DirectiveCommon]?: ASTAttribute; } & { [key in DirectiveIf]?: ASTDirectiveIf; }; children: ASTElementChild[]; keyed: boolean; } export interface ASTCommonElement extends ASTBaseElement { type: ASTTypes.JSXCommonElement; hasVRaw: boolean; } export interface ASTComponent extends ASTBaseElement { type: ASTTypes.JSXComponent; } export interface ASTVdt extends ASTBaseElement { type: ASTTypes.JSXVdt; } export interface ASTBlock extends ASTBaseElement { type: ASTTypes.JSXBlock; } export interface ASTComment extends ASTNode { type: ASTTypes.JSXComment; value: string; } export interface ASTExpression extends ASTNode { type: ASTTypes.JSXExpression; value: ASTExpressionChild[]; } export interface ASTAttribute extends ASTNode { type: ASTTypes.JSXAttribute; name: string; value: ASTAttributeValue; } export interface ASTNone extends ASTNode { type: ASTTypes.JSXNone; } export interface ASTDirectiveIf extends ASTNode { type: ASTTypes.JSXDirectiveIf; name: string; value: ASTAttributeTemplateValue; next: ASTElement | null; } export interface ASTString extends ASTNode { type: ASTTypes.JSXString; value: string; } export interface ASTStrings extends ASTNode { type: ASTTypes.JSXStrings; value: (ASTText | ASTExpression)[]; } export interface ASTUnescapeText extends ASTNode { type: ASTTypes.JSXUnescapeText; value: ASTExpressionChild[]; } export declare type ASTElement = ASTCommonElement | ASTComponent | ASTVdt | ASTBlock; export declare type ASTRootChild = ASTHoist | ASTJS | ASTElement | ASTComment; export declare type ASTExpressionChild = ASTJS | ASTElement | ASTComment | ASTText; export declare type ASTElementChild = ASTElement | ASTComment | ASTText | ASTExpression | ASTUnescapeText; export declare type ASTChild = ASTRootChild | ASTExpressionChild | ASTElementChild; export declare type ASTAttributeTemplateNoneValue = ASTString | ASTExpression | ASTStrings; export declare type ASTAttributeTemplateValue = ASTAttributeTemplateNoneValue | ASTNone; export declare type ASTAttributeValue = ASTAttributeTemplateValue | ASTElementChild | ASTElementChild[]; export declare const enum Directives { If = "v-if", ElseIf = "v-else-if", Else = "v-else", For = "v-for", ForValue = "v-for-value", ForKey = "v-for-key", Raw = "v-raw" } export declare type DirectiveIf = Directives.If | Directives.ElseIf | Directives.Else; export declare type DirectiveCommon = Exclude; export interface DirectiveFor { data: ASTExpression; value?: ASTString; key?: ASTString; } export declare type Options = { delimiters: [string, string]; }; export declare const enum ChildrenFlags { UnknownChildren = 0, HasInvalidChildren = 1, HasKeyedVNodeChildren = 2, HasNonKeyedVNodeChildren = 4, HasKeyedChildren = 8, HasNonKeyedChildren = 16, HasTextChildren = 32, VNodeChildren = 6, KeydChildren = 10, NonKeydChildren = 20, MultipleChildren = 24 }