import { LiteralValue } from '.'; import { BigodonOptions } from './options'; /** * Template execution, holds contexts, extra helpers, data. */ export declare class Execution { readonly contexts: object[]; readonly extraHelpers: Map; readonly data: object; readonly maxExecutionMillis: number; /** * Indicates whether the execution has been halted by a flow control helper. */ isHalted: boolean; /** * Timestamp of the template execution start */ private startMillis; /** * Bigodon variables */ readonly variables: Record; /** * Template execution, holds contexts, extra helpers, data. * * @param {object[]} contexts Contexts from which bigodon path expressions will evaluate * @param {Map} extraHelpers Extra helpers that can be called other than default bigodon helpers * @param {object?} data Data that cannot be accessed from the template but can be accessed and modified from helpers * @param {number} maxExecutionMillis Maximum milliseconds allowed for the template execution */ private constructor(); /** * Current context to be used by path expressions. * * @return {object} Current context to be used by path expressions. */ get context(): object; /** * Push a new context on the stack. * Used to change context allowing for $parent and $root access of previous contexts. */ pushContext(context: object): void; /** * Pop the current context from the stack. */ popContext(): void; /** * Halt the execution. */ halt(): void; /** * Milliseconds since the template execution started. * @return {number} Milliseconds since the template execution started. */ get elapsedMillis(): number; /** * Creates an execution from context, helpers and options. * * @param {object} context Context from which bigodon path expressions will evaluate * @param {Map?} extraHelpers Extra helpers that can be called other than default bigodon helpers * @param {BigodonOptions} options Options for the current execution only * @return {Execution} */ static of(context: object, extraHelpers?: Map, options?: BigodonOptions): Execution; }