@sigi/core
Version:
Sigi core library
19 lines (18 loc) • 807 B
TypeScript
import { Action } from '@sigi/types';
import { Draft } from 'immer';
import { Observable } from 'rxjs';
interface DecoratorReturnType<V> {
(target: any, propertyKey: string, descriptor: {
value?: V;
}): PropertyDescriptor;
}
export declare const DefineAction: () => any;
export declare const ImmerReducer: <S = any>() => DecoratorReturnType<(state: Draft<S>, params: any) => void>;
export declare const Reducer: <S = any>() => DecoratorReturnType<(state: S, params: any) => S>;
export interface EffectOptions {
ssr?: boolean;
payloadGetter?: (ctx: any, skipSymbol: symbol) => any | Promise<any>;
skipFirstClientDispatch?: boolean;
}
export declare const Effect: <A = any>(options?: EffectOptions) => DecoratorReturnType<(action: Observable<A>) => Observable<Action>>;
export {};