import { SqrlObject } from "../object/SqrlObject"; import bluebird = require("bluebird"); import SqrlSourcePrinter from "../compile/SqrlSourcePrinter"; import { RuleSpecMap } from "../api/spec"; import { DatabaseSet, Context } from "../api/ctx"; import { Manipulator, ExecutionErrorProperties, FeatureMap, Execution } from "../api/execute"; import { SourcePrinter } from "../api/executable"; export interface SqrlExecutionOptions { featureTimeout: number; ruleSpecs: RuleSpecMap; requiredSlots?: number[]; sourcePrinter?: SqrlSourcePrinter; slotCost?: number[]; } export declare class SlotMissingCallbackError extends Error { slotName: string; constructor(slotName: string); } export declare class SqrlExecutionState implements Execution { manipulator: Manipulator; slots: bluebird[]; names: string[]; functionCache: any; counterBumps: any; loggedCodedErrors: Set; sourcePrinter: SqrlSourcePrinter; featureTimeout: number; currentCost: number; traceFunctions: boolean; databaseSet: DatabaseSet | null; private clockMs; ruleSpecs: RuleSpecMap; ctx: Context; private data; _fetch: (slot: number) => bluebird; constructor(ctx: Context, slotCallbacks: any, names: any[], manipulator: Manipulator, props: SqrlExecutionOptions, features: FeatureMap); get(symbol: symbol, defaultValue?: T): T; set(symbol: symbol, value: T): void; setDefault(symbol: symbol, defaultValue?: T): T; fetchClock(): Promise; getSourcePrinter(): SourcePrinter; getClock(): number; getClockMs(): number; fetchFeature(featureName: string): Promise; fetchValue(featureName: string): Promise; functionCacheAccessor(key: string, callback: () => T): T; cacheAccessor(symbol: symbol, key: string, callback: () => T): T; trace(props: { [key: string]: any; }, format: string, ...args: Array): any; debug(props: { [key: string]: any; }, format: string, ...args: Array): any; info(props: { [key: string]: any; }, format: string, ...args: Array): any; warn(props: { [key: string]: any; }, format: string, ...args: Array): any; error(props: { [key: string]: any; }, format: string, ...args: Array): any; fatal(props: { [key: string]: any; }, format: string, ...args: Array): any; codedWarning(format: string, ...args: Array): void; setFeatures(featureMap: FeatureMap): void; setFutureFeatures(featureMap: any): void; fetch(slot: any): bluebird; getFeatureNames(): string[]; getSlot(name: string): number; tryWait(name: string): Promise; fetchByName(name: any): any; fetchByName_(name: any): Promise; fetchBasicByName(name: any): any; prepare(slotIndexes: number[]): bluebird; prepare_(slotIndexes: number[]): Promise; wait(slotIndexes: number[]): bluebird; build(slotIndexes: number[]): bluebird; load(slotIndexes: any): any; loadByNames(featureNames: any): any; logCodedErrorMessage(format: string, ...args: Array): void; logError(err: Error, props?: ExecutionErrorProperties): void; getNamedGlobals(): string[]; }