UNPKG

core-native

Version:

A lightweight framework based on React Native + Redux + Redux Saga, in strict TypeScript.

31 lines 1.7 kB
import { type ActionHandler } from "../module"; import { Module } from "../platform/Module"; import { type State } from "../reducer"; import { type Logger } from "../Logger"; import { type SagaGenerator } from "../typed-saga"; export { Interval } from "./Interval"; export { Loading } from "./Loading"; export { Log } from "./Log"; export { Mutex } from "./Mutex"; export { RetryOnNetworkConnectionError } from "./RetryOnNetworkConnectionError"; export { SilentOnNetworkConnectionError } from "./SilentOnNetworkConnectionError"; /** * Decorator type declaration, required by TypeScript. */ type HandlerDecorator = (target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<ActionHandler>) => TypedPropertyDescriptor<ActionHandler>; type VoidFunctionDecorator = (target: object, propertyKey: string, descriptor: TypedPropertyDescriptor<(...args: any[]) => void>) => TypedPropertyDescriptor<(...args: any[]) => void>; type ActionHandlerWithMetaData = ActionHandler & { actionName: string; maskedParams: string; }; type HandlerInterceptor<RootState extends State = State> = (handler: ActionHandlerWithMetaData, thisModule: Module<RootState, any>) => SagaGenerator; type FunctionInterceptor<S> = (handler: () => void, rootState: Readonly<S>, logger: Logger) => void; /** * A helper for ActionHandler functions (Saga). */ export declare function createActionHandlerDecorator<RootState extends State = State>(interceptor: HandlerInterceptor<RootState>): HandlerDecorator; /** * A helper for regular functions. */ export declare function createRegularDecorator<S extends State = State>(interceptor: FunctionInterceptor<S>): VoidFunctionDecorator; //# sourceMappingURL=index.d.ts.map