import type * as t from "./ast"; export declare type TypeAssertion = { [N in T as `is${N["type"]}`]: (x?: T | null) => x is N; }; declare const factory: { directive: (value: t.Directive["value"]) => t.Directive; directiveLiteral: (value: string) => t.DirectiveLiteral; variableDeclaration: (kind: t.VariableKind, declarations: t.VariableDeclarator[]) => t.VariableDeclaration; variableDeclarator: (id: t.LVal, init?: t.Expression | null | undefined) => t.VariableDeclarator; expressionStatement: (expression: t.Expression) => t.ExpressionStatement; blockStatement: (body: t.Statement[], directives?: t.Directive[]) => t.BlockStatement; breakStatement: (label?: t.Identifier | null) => t.BreakStatement; continueStatement: (label?: t.Identifier | null) => t.ContinueStatement; debuggerStatement: () => t.DebuggerStatement; doWhileStatement: (test: t.Expression, body: t.Statement) => t.DoWhileStatement; emptyStatement: () => t.EmptyStatement; forInStatement: (left: t.VariableDeclaration | t.LVal, right: t.Expression, body: t.Statement) => t.ForInStatement; forStatement: (init: t.VariableDeclaration | t.Expression | null | undefined, test: t.Expression | null | undefined, update: t.Expression | null | undefined, body: t.Statement) => t.ForStatement; identifier: (name: string) => t.Identifier; ifStatement: (test: t.Expression, consequent: t.Statement, alternate?: t.Statement | null | undefined) => t.IfStatement; labeledStatement: (label: t.Identifier, body: t.Statement) => t.LabeledStatement; returnStatement: (argument?: t.Expression | null | undefined) => t.ReturnStatement; sequenceExpression: (expressions: Array) => t.SequenceExpression; switchCase: (test: t.Expression | null | undefined, consequent: Array) => t.SwitchCase; thisExpression: () => t.ThisExpression; throwStatement: (argument: t.Expression) => t.ThrowStatement; tryStatement: (block: t.BlockStatement, handler?: t.CatchClause | null | undefined, finalizer?: t.BlockStatement | null | undefined) => t.TryStatement; catchClause: (param: t.Identifier | t.ArrayPattern | t.ObjectPattern | null | undefined, body: t.BlockStatement) => t.CatchClause; unaryExpression: (operator: "void" | "throw" | "delete" | "!" | "+" | "-" | "~" | "typeof", argument: t.Expression, prefix?: boolean) => t.UnaryExpression; whileStatement: (test: t.Expression, body: t.Statement) => t.WhileStatement; withStatement: (object: t.Expression, body: t.Statement) => t.WithStatement; classDeclaration: (id: t.Identifier, superClass: t.Expression | null | undefined, body: t.ClassBody) => t.ClassDeclaration; classExpression: (id: t.Identifier | null | undefined, superClass: t.Expression | null | undefined, body: t.ClassBody) => t.ClassExpression; classBody: (body: Array) => t.ClassBody; classMethod: (kind: "get" | "set" | "method" | "constructor" | undefined, key: t.Identifier | t.StringLiteral | t.NumericLiteral | t.Expression, params: Array, body: t.BlockStatement, computed?: boolean | undefined, _static?: boolean | undefined, generator?: boolean | undefined, async?: boolean | undefined) => t.ClassMethod; classPrivateMethod: (kind: "get" | "set" | "method" | "constructor" | undefined, key: t.PrivateName, params: Array, body: t.BlockStatement, computed?: boolean | undefined, _static?: boolean | undefined, generator?: boolean | undefined, async?: boolean | undefined) => t.ClassPrivateMethod; classProperty: (key: t.Identifier | t.StringLiteral | t.NumericLiteral | t.Expression, value?: t.Expression | null | undefined, typeAnnotation?: null | undefined, decorators?: null | undefined, computed?: boolean | undefined, _static?: boolean | undefined) => t.ClassProperty; classPrivateProperty: (key: t.PrivateName, value?: t.Expression | null | undefined, decorators?: null | undefined, _static?: boolean | undefined) => t.ClassPrivateProperty; privateName: (id: t.Identifier) => t.PrivateName; exportAllDeclaration: (source: t.StringLiteral) => t.ExportAllDeclaration; exportDefaultDeclaration: (declaration: t.FunctionDeclaration | t.ClassDeclaration | t.Expression) => t.ExportDefaultDeclaration; exportNamedDeclaration: (declaration?: t.Declaration | null | undefined, specifiers?: Array, source?: t.StringLiteral | null | undefined) => t.ExportNamedDeclaration; exportSpecifier: (local: t.Identifier, exported: t.Identifier) => t.ExportSpecifier; forOfStatement: (left: t.VariableDeclaration | t.LVal, right: t.Expression, body: t.Statement, _await?: boolean) => t.ForOfStatement; importDeclaration: (specifiers: Array, source: t.StringLiteral) => t.ImportDeclaration; importDefaultSpecifier: (local: t.Identifier) => t.ImportDefaultSpecifier; importNamespaceSpecifier: (local: t.Identifier) => t.ImportNamespaceSpecifier; importSpecifier: (local: t.Identifier, imported: t.Identifier) => t.ImportSpecifier; importAttribute: (key: t.Identifier, value: t.StringLiteral) => t.ImportAttribute; metaProperty: (meta: t.Identifier, property: t.Identifier) => t.MetaProperty; super: () => t.Super; taggedTemplateExpression: (tag: t.Expression, quasi: t.TemplateLiteral) => t.TaggedTemplateExpression; templateElement: (value: { raw: string; cooked?: string; }, tail?: boolean) => t.TemplateElement; templateLiteral: (quasis: Array, expressions: Array) => t.TemplateLiteral; yieldExpression: (argument?: t.Expression | null | undefined, delegate?: boolean) => t.YieldExpression; import: () => t.Import; bigIntLiteral: (value: string) => t.BigIntLiteral; updateExpression: (operator: "++" | "--", argument: t.Expression, prefix?: boolean) => t.UpdateExpression; arrowFunctionExpression: (params: Array, body: t.BlockStatement | t.Expression, async?: boolean | undefined) => t.ArrowFunctionExpression; binaryExpression: (operator: t.BinaryExpression["operator"], left: t.Expression | t.PrivateName, right: t.Expression) => t.BinaryExpression; assignmentExpression: (operator: t.AssignmentExpression["operator"], left: t.LVal, right: t.Expression) => t.AssignmentExpression; memberExpression: (object: t.Expression, property: t.Expression | t.Identifier | t.PrivateName) => t.MemberExpression; logicalExpression: (operator: "||" | "&&" | "??", left: t.Expression, right: t.Expression) => t.LogicalExpression; newExpression: (callee: t.Expression, _arguments: Array) => t.NewExpression; objectExpression: (properties: Array) => t.ObjectExpression; objectProperty: (key: t.Expression | t.Identifier | t.StringLiteral | t.NumericLiteral, value: t.Expression | t.PatternLike, computed?: boolean, shorthand?: boolean) => t.ObjectProperty; objectMethod: (kind: "method" | "get" | "set" | undefined, key: t.Expression | t.Identifier | t.StringLiteral | t.NumericLiteral, params: Array, body: t.BlockStatement, computed?: boolean, generator?: boolean | undefined, async?: boolean | undefined) => t.ObjectMethod; arrayExpression: (elements?: Array) => t.ArrayExpression; bindExpression: (object: t.Expression, callee: t.Expression) => t.BindExpression; callExpression: (callee: t.Expression, _arguments: Array) => t.CallExpression; conditionalExpression: (test: t.Expression, consequent: t.Expression, alternate: t.Expression) => t.ConditionalExpression; functionDeclaration: (id: t.Identifier | null | undefined, params: Array, body: t.BlockStatement, generator?: boolean | undefined, async?: boolean | undefined) => t.FunctionDeclaration; functionExpression: (id: t.Identifier | null | undefined, params: Array, body: t.BlockStatement, generator?: boolean | undefined, async?: boolean | undefined) => t.FunctionExpression; spreadElement: (argument: t.Expression) => t.SpreadElement; restElement: (argument: t.LVal) => t.RestElement; stringLiteral: (value: string) => t.StringLiteral; numericLiteral: (value: number) => t.NumericLiteral; nullLiteral: () => t.NullLiteral; booleanLiteral: (value: boolean) => t.BooleanLiteral; regExpLiteral: (pattern: string, flags?: string) => t.RegExpLiteral; objectPattern: (properties: Array) => t.ObjectPattern; assignmentPattern: (left: t.Identifier | t.ObjectPattern | t.ArrayPattern | t.MemberExpression, right: t.Expression) => t.AssignmentPattern; arrayPattern: (elements: Array) => t.ArrayPattern; jsxAttribute: (name: t.JSXIdentifier | t.JSXNamespacedName, value?: t.StringLiteral | t.JSXElement | t.JSXFragment | t.JSXExpressionContainer | null | undefined) => t.JSXAttribute; jsxClosingElement: (name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName) => t.JSXClosingElement; jsxElement: (openingElement: t.JSXOpeningElement, closingElement: t.JSXClosingElement | null | undefined, children: Array, selfClosing?: boolean | null | undefined) => t.JSXElement; jsxEmptyExpression: () => t.JSXEmptyExpression; jsxExpressionContainer: (expression: t.Expression | t.JSXEmptyExpression) => t.JSXExpressionContainer; jsxSpreadChild: (expression: t.Expression) => t.JSXSpreadChild; jsxIdentifier: (name: string) => t.JSXIdentifier; jsxMemberExpression: (object: t.JSXMemberExpression | t.JSXIdentifier, property: t.JSXIdentifier) => t.JSXMemberExpression; jsxNamespacedName: (namespace: t.JSXIdentifier, name: t.JSXIdentifier) => t.JSXNamespacedName; jsxOpeningElement: (name: t.JSXIdentifier | t.JSXMemberExpression | t.JSXNamespacedName, attributes: Array, selfClosing?: boolean) => t.JSXOpeningElement; jsxSpreadAttribute: (argument: t.Expression) => t.JSXSpreadAttribute; jsxText: (value: string) => t.JSXText; jsxFragment: (openingFragment: t.JSXOpeningFragment, closingFragment: t.JSXClosingFragment, children: Array) => t.JSXFragment; jsxOpeningFragment: () => t.JSXOpeningFragment; jsxClosingFragment: () => t.JSXClosingFragment; isProgram: (x: t.AstNode) => x is t.Program; isFunctionParent: (node: t.AstNode) => node is t.FunctionParent; isStatement: (node: t.AstNode) => node is t.Statement; isNodesEquivalent(a: t.AstNode, b: t.AstNode): boolean | undefined; react: { /** * Note: we're optimizing for source parity and don't collapse whitespace. */ buildChildren(node: t.JSXElement): any[]; }; clone(node: T): T; cloneDeep(node: T_1): T_1; }; export declare const types: typeof factory & TypeAssertion; export {};