import type { SubscriptionContainer } from './subscription'; import type { Observer } from './observer'; export declare class RuntimeJob { config: ConfigType; key?: RuntimeJobKey; observer: ObserverType; rerender: boolean; subscriptionContainersToUpdate: Set; timesTriedToUpdateCount: number; performed: boolean; /** * A Runtime Job is sent to the Runtime on behalf of the Observer it represents. * * In the Runtime, the Observer is performed via its `perform()` method * and the Subscription Containers (UI-Components) * to which it is subscribed are updated (re-rendered) accordingly. * * @internal * @param observer - Observer to be represented by the Runtime Job. * @param config - Configuration object */ constructor(observer: ObserverType, config?: CreateRuntimeJobConfigInterface); } export declare type RuntimeJobKey = string | number; export interface CreateRuntimeJobConfigInterface extends RuntimeJobConfigInterface { /** * Key/Name identifier of the Runtime Job. * @default undefined */ key?: RuntimeJobKey; } export interface RuntimeJobConfigInterface { /** * Whether to perform the Runtime Job in background. * So that the Subscription Containers (UI-Components) aren't notified * of these changes and thus doesn't update (re-render). * @default false */ background?: boolean; /** * Configuration of the execution of defined side effects. * @default {enabled: true, exclude: []} */ sideEffects?: SideEffectConfigInterface; /** * Whether the Runtime Job should be forced through the runtime * although it might be useless from the current viewpoint of the runtime. * @default false */ force?: boolean; /** * How often the Runtime should try to update not ready Subscription Containers * subscribed by the Observer which the Job represents. * * When `null` the Runtime tries to update the not ready Subscription Containers * until they are ready (infinite). * @default 3 */ maxTriesToUpdate?: number | null; /** * Anything unrelated that might be required by a side effect. */ any?: any; } export interface SideEffectConfigInterface { /** * Whether to execute the defined side effects. * @default true */ enabled?: boolean; /** * Side effect key identifier that won't be executed. * @default [] */ exclude?: string[]; }