/** * Template walker for the optional view compiler. * * Discovers every `bq-*` directive expression that reaches the runtime * evaluator and compiles each one ahead of time. The walker mirrors each * directive's evaluation strategy exactly — object syntax for * `bq-class`/`bq-style`/`bq-aria` is split through the same * `parseObjectExpression()` the runtime uses, and `bq-for` contributes its list * and `:key` sub-expressions — so the compiled set is a faithful subset of what * the runtime would evaluate. * * @module bquery/view/compiler */ import type { CompiledView, CompileOptions } from './types'; /** * Compiles every `bq-*` expression in an HTML template ahead of time. * * Returns the compiled subset (expression → emitted function source) plus * coverage statistics. Expressions that cannot be statically compiled are * listed in `stats.skipped` with a reason and transparently fall back to the * runtime evaluator — so a partially compiled template still behaves * identically. * * @example * ```ts * import { compileViews } from '@bquery/bquery/view/compiler'; * * const { expressions, stats } = compileViews('

'); * // expressions['count + 1'] === '(__bq_ctx) => (__bq_ctx.count + 1)' * ``` */ export declare const compileViews: (template: string, options?: CompileOptions) => CompiledView; //# sourceMappingURL=compile.d.ts.map