import State from "./state"; import Agile from "./agile"; import { SubscriptionContainer } from "./sub"; export interface JobInterface { state: State; newStateValue?: any; options?: { background?: boolean; sideEffects?: boolean; forceRerender?: boolean; }; } export interface JobConfigInterface { perform?: boolean; background?: boolean; sideEffects?: boolean; forceRerender?: boolean; } export default class Runtime { agileInstance: () => Agile; private currentJob; private jobQueue; private jobsToRerender; trackState: boolean; foundStates: Set; internalIngestKey: string; constructor(agileInstance: Agile); /** * @internal * Creates a Job out of State and new Value and than add it to a job queue * Note: its not possible to set a state to undefined because undefined is used for internal activities! */ ingest(state: State, newStateValue?: any, options?: JobConfigInterface): void; /** * @internal * Perform a State Update */ private perform; /** * @internal * SideEffects are sideEffects of the perform function.. for instance the watchers */ private sideEffects; /** * @internal * This will be update all Subscribers of complete jobs */ private updateSubscribers; /** * @internal * Builds an object out of propKeysChanged in the SubscriptionContainer */ formatChangedPropKeys(subscriptionContainer: SubscriptionContainer): { [key: string]: any; }; /** * @internal * Will return all tracked States */ getFoundStates(): Set>; }