import type { Result } from '../../libs/standard-result'; import type { ResolverSeedData } from './common'; import type { MixedAST, PureAST } from './types.external'; import type { ScopeWithPathToken } from './types.internal'; /** * Checks that a given value is an AST * * @param value * @return */ export declare const isExpression: (value: unknown) => value is import("./types.external").MixedAbstractSyntaxTree; /** * Helper function that tells us if the dql is a pure or embedded expression * * @param syntaxTree the dql ast * @return whether it is a pure expression */ export declare const isPureExpression: (syntaxTree: MixedAST | PureAST) => boolean; /** * Helper function that gives us back the pure ast or an error if it isn't pure, wrapped in an either * * @param syntaxTree dql ast * @return returns the Pure AST or an error message wrapped in an Either */ export declare const ensurePureExpression: (syntaxTree: MixedAST | PureAST) => Result; /** * Helper function that tells us if the dql is a simple reference to data, without any pipes or other processing * * @param syntaxTree the dql ast * @return whether it is a simple expression */ export declare const isSimpleExpression: (syntaxTree: PureAST) => boolean; /** * Returns true if the given tree represents nothing but a simple unescaped expression * * @param syntaxTree dql ast * @return true for a static expression, false if not */ export declare const isStatic: (syntaxTree: import("./types.external").MixedAbstractSyntaxTree) => boolean; /** * Takes in the ast, finds the root for every expression inside, and dedupes the root array. * The roots are essentially the dependencies we use to control re-rendering logic * * We dedupe the array just to simplify the array. There is no need to have equal dependencies * * @param syntaxTree dql ast * @return an array of DataContext */ export declare const getDataRoots: (syntaxTree: import("./types.external").MixedAbstractSyntaxTree) => readonly ScopeWithPathToken[]; /** * A curried function that takes in the roots and ResolverSeedData, gives us back a list of values for each root * * A small subset of what `resolveAST` does. This only has to handle Data Contexts and no recursive * pipe defs or anything like that. Performance is critical here. * * @param roots all the roots of a dql expression * @return an array of Either wrapped values for each root */ export declare const evaluateDataRoots: (roots: readonly ScopeWithPathToken[]) => (data: ResolverSeedData) => readonly unknown[];