/** * Interpolation of `${{name}}` references in literal text. * * Shared by the render pipeline and the data-pack generator executor: a * generator's `` output uses the same interpolation as a config's * ``. */ import type { SequenceRegistry } from '../sequence/index.js'; /** * Interpolate sequence references in a literal string using the `inject` * pattern. The pattern contains exactly one `%` marking the variable-name * slot, e.g. "${{%}}" means the markers are `${{` and `}}`. * * Resolution: * - The name is looked up in `registry` (built-ins `_count`/etc. plus * declared sequences). * - A present value at `iteration` is substituted; `undefined` * (parent-filtered row) becomes an empty string. * - An unknown name is left as-is (helps spot typos). */ export declare function interpolate(text: string, inject: string, iteration: number, registry: SequenceRegistry): string; /** * The same interpolation, resolved by a READER rather than by a registry. * * A `` inside a `` has no registry of its own to look in: it is * built for one row at a time, and the row's other columns reach it through the * `valueAt` seam a nested `` already uses. Sharing the compiler and the * filters keeps `${{Name|upper}}` meaning one thing wherever it is written. * * `undefined` from `read` leaves the reference as it was written, which the * validator has already refused — the engine never invents a value for a name * nobody declared. */ export declare function interpolateWith(text: string, inject: string, read: (name: string) => string | undefined): string; /** The marker a document uses unless `` says otherwise. */ export declare const DEFAULT_INJECT = "${{%}}"; /** * A `` written inside a ``, as a reader of ONE row — or undefined * when the text holds no reference and is the literal it has always been. * * Both engines build case bodies their own way and ask for this one thing, so * the question "what does `${{Name}}` mean here" is answered in a single place. */ export declare function caseDataReader(text: string, inject: string | undefined, hasColumn: ((name: string) => boolean) | undefined, valueAt: ((name: string, row: number) => string | undefined) | undefined): ((row: number) => string) | undefined; /** Whether the text holds any `${{…}}` reference at all — the cheap way out. */ export declare function hasInterpolation(text: string, inject: string): boolean; //# sourceMappingURL=interpolate.d.ts.map