UNPKG

reactive-blocs

Version:
16 lines (15 loc) 463 B
export type Action<T = any> = { id: string; type: string; args: T; }; export type ActionResult = { id: string; result: any; }; type ActionHandler<A = any, R = any> = (args: A) => R; export declare const createActionContext: () => { dispatch: <T = any>(type: string, args?: T | undefined) => import("rxjs").Observable<any>; actionOf: <A = any>(type: string, handler: ActionHandler<A, any>) => import("rxjs").Subscription; }; export {};