export declare type Condition = (state: State) => boolean; export declare type Executor = (state: State) => void; export declare class State { private value_; private actions; constructor(value?: T); get value(): T | undefined; set value(value: T | undefined); register(action: Action): void; unregister(id: string): void; hasNoAction(): boolean; release(): void; } export declare class Action { readonly id: string; readonly isOnce: boolean; private func; private condition; private isTimeout; private executed; private isRegistered; constructor(isOnce: boolean, func: Executor, id: string, condition?: Condition); get isExecuted(): boolean; isMeetCondition(state: State): boolean; withTimeout(duration: number, handle?: () => void): this; execute(state: State): void; private executeAndTryUnregister; }