overmind
Version:
Frictionless state management
30 lines (29 loc) • 1.45 kB
TypeScript
import { Execution, OperatorContextFunction } from './internalTypes';
import { IConfiguration, IContext } from './types';
export declare function action<T extends OperatorContextFunction<any, any>>(operation: T): T;
export declare function operatorStarted(type: any, arg: any, context: any): void;
export declare function operatorStopped(context: any, value: any, details?: {
error?: Error;
isIntercepted?: boolean;
isSkipped?: boolean;
}): void;
export declare function createContext(context: any, value: any, path?: any): any;
export declare function createNextPath(next: any): any;
export declare function createOperator<ThisConfig extends IConfiguration>(type: string, name: string, cb: (err: Error | null, context: IContext<ThisConfig> & {
execution: Execution;
}, value: any, next: (err: Error | null, value: any, options?: {
path?: {
name: string;
operator: Function;
};
isSkipped?: boolean;
}) => void, final: (err: Error | null, value: any) => void) => any): any;
export declare function createMutationOperator<ThisConfig extends IConfiguration>(type: string, name: string, cb: (err: Error | null, context: IContext<ThisConfig> & {
execution: Execution;
}, value: any, next: (err: Error | null, value: any, options?: {
path?: {
name: string;
operator: Function;
};
isSkipped?: boolean;
}) => void, final: (err: Error | null, value: any) => void) => any): any;