/** * E2E Test Runner - Variable Interpolator * * Handles {{variable}} interpolation and built-in functions */ import type { InterpolationContext, BuiltInFunction } from '../types'; /** * Registry of built-in functions available in interpolation */ export declare const BUILT_IN_FUNCTIONS: Record; /** Maximum number of interpolation passes before aborting */ export declare const MAX_INTERPOLATION_DEPTH = 10; /** * Interpolate variables and functions in a template string * * Performs multi-pass resolution: after each replacement pass, checks whether * the result still contains {{...}} patterns. Loops until stable (no more * patterns) or until MAX_INTERPOLATION_DEPTH is reached. Detects cycles by * comparing each pass result to the previous one. * * Supports: * - Variable references: {{varName}} * - Nested variables: {{captured.fieldName}} * - Built-in functions: {{$uuid}}, {{$random(1, 100)}} * - Base URL: {{baseUrl}} */ export declare function interpolate(template: string, context: InterpolationContext): string; /** * Recursively interpolate all string values in an object */ export declare function interpolateObject(obj: T, context: InterpolationContext): T; /** * Resolve cross-references between variables using topological sort * * Scans variable values for {{...}} references to other variables, builds a * dependency graph, and resolves them in dependency order using Kahn's * algorithm. Variables that only reference runtime values (baseUrl, * captured.*) are skipped. * * @param variables - Mutable variables object; values are resolved in-place * @param baseUrl - Base URL for interpolation context * @returns The same variables object with cross-references resolved * @throws InterpolationError on circular references */ export declare function resolveVariableValues(variables: Record, baseUrl?: string): Record; /** * Get a nested value from an object using dot notation */ export declare function getNestedValue(obj: Record | undefined, path: string): unknown; /** * Set a nested value in an object using dot notation */ export declare function setNestedValue(obj: Record, path: string, value: unknown): void; /** * Create an interpolation context */ export declare function createInterpolationContext(variables: Record, captured: Record, baseUrl: string): InterpolationContext; /** * Check if a string contains interpolation placeholders */ export declare function hasInterpolation(str: string): boolean; /** * Extract all variable names from a template */ export declare function extractVariableNames(template: string): string[]; //# sourceMappingURL=variable-interpolator.d.ts.map