/** * Rx expression evaluator — parse and evaluate {{ expr }} at runtime. * * Handles: * - State references: {{ count }}, {{ user.name }} * - Arithmetic: {{ count + 1 }}, {{ price * quantity }} * - Comparisons: {{ count > 0 }}, {{ status === 'active' }} * - Ternary: {{ active ? 'Yes' : 'No' }} * - Logical: {{ a && b }}, {{ !loading }} * - Pipe filters: {{ price | currency:'USD' }}, {{ name | upper }} * - Built-in vars: $item, $index, $event, $error, $result, $state */ import type { Store } from './state.js'; /** Scope for expression evaluation (loop variables, event data, etc.) */ export interface EvalScope { $item?: unknown; $index?: number; $event?: unknown; $error?: unknown; $result?: unknown; [key: string]: unknown; } /** * Check if a string contains {{ }} expressions. */ export declare function isRxExpression(value: unknown): value is string; /** * Evaluate a string that may contain {{ expr }} templates. * If the entire string is a single {{ expr }}, returns the raw value (not stringified). * If mixed with text, interpolates as string. */ export declare function evaluateTemplate(template: string, store: Store, scope?: EvalScope): unknown; /** * Evaluate a raw expression string (without {{ }}). */ export declare function evaluateExpression(expr: string, store: Store, scope?: EvalScope): unknown; //# sourceMappingURL=rx.d.ts.map