import { ExtractRematchDispatchersFromEffects, Plugin, Models, Reducer, NamedModel } from '@rematch/core'; export declare type LoadingPluginType = 'number' | 'boolean' | 'full'; export interface LoadingConfig { name?: string; whitelist?: string[]; blacklist?: string[]; type?: LoadingPluginType; asNumber?: boolean; } declare type PickLoadingPluginType = WhichType extends 'number' ? number : WhichType extends 'full' ? DetailedPayload : boolean; interface LoadingState, WhichType extends LoadingPluginType> { global: PickLoadingPluginType; models: { [modelName in keyof TModels]: PickLoadingPluginType; }; effects: { [modelName in keyof TModels]: { [effectName in keyof ExtractRematchDispatchersFromEffects]: PickLoadingPluginType; }; }; } interface LoadingModel, WhichType extends LoadingPluginType> extends NamedModel> { reducers: { hide: Reducer>; show: Reducer>; }; } export interface ExtraModelsFromLoading, TConfig extends LoadingConfig = { type: 'boolean'; }> extends Models { loading: LoadingModel; } declare type DetailedPayload = { error: unknown; success: boolean; loading?: boolean; }; declare const _default: , TExtraModels extends Models, TConfig extends LoadingConfig>(config?: TConfig) => Plugin>; export default _default; //# sourceMappingURL=index.d.ts.map