/** * A value in the text form of a `pg_node_tree`: a scalar token, `null` for * `<>`, a list, or a node. Integer, OID and bitmapset lists (`(i 1 2)`, * `(o 23)`, `(b 3)`) lose their marker and become lists of scalar tokens. */ export type NodeTreeValue = string | null | NodeTreeValue[] | NodeTreeNode; export interface NodeTreeNode { type: string; fields: Record; } /** * Parse the text form of a `pg_node_tree` (for example * `pg_rewrite.ev_action::text`), following the tokenizer of PostgreSQL's * `read.c`: tokens are separated by whitespace, `(`, `)`, `{` and `}` are * tokens of their own, and a backslash escapes the next character. */ export declare function parseNodeTree(text: string): NodeTreeValue; export declare function isNode(value: NodeTreeValue | undefined, type?: string): value is NodeTreeNode;