/** * The small ESTree toolkit the source-docs extractor reads `parseAst` output * with: typed child access, string and identifier reads, decorators, and the * doc comment that belongs to a declaration. */ import { type JsDoc } from './jsdoc.js'; export type Node = Record & { type: string; start: number; end: number; }; export declare const nodes: (value: unknown) => Node[]; export declare const child: (node: Node | undefined, key: string) => Node | undefined; export declare const nameOf: (node: Node | undefined) => string | undefined; export declare const stringLiteral: (node: Node | undefined) => string | undefined; /** Every node below `node`, depth first. */ export declare function walk(node: unknown): Generator; export declare const put: (target: T, key: K, value: T[K] | undefined) => void; /** The callee name of a decorator: `customElement` for `@customElement('x')`. */ export declare const decoratorCall: (decorator: Node) => { name: string | undefined; args: Node[]; }; export declare const findDecorator: (node: Node, name: string) => { name: string | undefined; args: Node[]; } | undefined; /** The doc comment above a declaration, also tolerated between its decorators and it. */ export declare const docOf: (code: string, node: Node, wrapper?: Node) => JsDoc | undefined; //# sourceMappingURL=ast.d.ts.map