/** * Array / string method lowering for the Jinja2 template adapter. * * Ported from `packages/adapter-xslate/src/adapter/expr/array-method.ts`. * Pure free functions shared by both the filter-context emitter and the * top-level emitter — they take an `emit` callback for receiver / argument * recursion and read no adapter instance state. * * The receiver/array helpers are the same runtime methods the Xslate adapter * calls, invoked as `bf.NAME(...)` (bare, no `$` sigil) instead of * `$bf.NAME(...)`. */ import type { ParsedExpr, ArrayMethod, SortComparator, FlatDepth, CallbackEvalSpelling } from '@barefootjs/jsx'; /** * Lower `object.method(...args)` through the shared catalogue * (`@barefootjs/jsx`'s `adapters/array-method.ts`). This adapter only spells * the helper call. */ export declare function renderArrayMethod(method: ArrayMethod, object: ParsedExpr, args: ParsedExpr[], emit: (e: ParsedExpr) => string): string; /** * How this adapter spells a runtime-evaluator call. What to call, with which * operands and captured names, is decided by `@barefootjs/jsx`'s * `adapters/callback-method.ts`. */ export declare const EVAL_SPELLING: CallbackEvalSpelling; /** * Shared Jinja emit for `.sort(cmp)` / `.toSorted(cmp)`. Used by both the * filter-context emitter and the top-level emitter, plus the loop-array * wrap in `renderLoop`. The runtime `bf.sort` accepts an opts dict and * returns a fresh list. */ export declare function renderSortMethod(recv: string, c: SortComparator): string; export declare function renderFlatMethod(recv: string, depth: FlatDepth | { expr: ParsedExpr; }, emit: (e: ParsedExpr) => string): string; //# sourceMappingURL=array-method.d.ts.map