UNPKG

@neo4j/cypher-builder

Version:

A programmatic API for building Cypher queries for Neo4j

17 lines (16 loc) 1.07 kB
import { ListExpr } from "../expressions/list/ListExpr"; import { MapExpr } from "../expressions/map/MapExpr"; import { Literal } from "../references/Literal"; import type { Variable } from "../references/Variable"; import type { Expr } from "../types"; /** Something that can be coerced into a Variable */ type VariableLike = string | number | Variable | Literal; /** Coerces a {@link VariableLike} into an Expression. Returns undefined if the value is undefined */ export declare function normalizeExpr(value: undefined): undefined; export declare function normalizeExpr(value: VariableLike | Expr): Expr; export declare function normalizeExpr(value: VariableLike | Expr | undefined): Expr | undefined; /** Applies {@link normalizeExpr} to the properties of a map. Returns a {@link MapExpr} */ export declare function normalizeMap(map: Record<string, VariableLike | Expr>): MapExpr; /** Applies {@link normalizeExpr} to the elements of a list. Returns a {@link ListExpr} */ export declare function normalizeList(list: Array<VariableLike | Expr>): ListExpr; export {};