UNPKG

mst-effect

Version:

Designed to be used with MobX-State-Tree to create asynchronous actions using RxJS.

7 lines 465 B
import { Observable } from 'rxjs'; import { AnyInstance, PayloadFunc } from '../types'; export declare type SignalFactory<P, R> = (payload$: Observable<P>) => Observable<R>; export declare type SignalResult<P, R> = [Observable<R>, PayloadFunc<P, void>]; export declare function signal<P>(self: AnyInstance): SignalResult<P, P>; export declare function signal<P, R>(self: AnyInstance, fn: SignalFactory<P, R>): SignalResult<P, R>; //# sourceMappingURL=index.d.ts.map