exome
Version:
State manager for deeply nested states
16 lines (15 loc) • 450 B
TypeScript
/**
* @module exome/utils
*/
import { type Exome } from "exome";
interface ActionStatus<E = any, R = any> {
loading: boolean;
error: false | E;
response: void | R;
unsubscribe: () => void;
}
/**
* Subscribes to specific action in specific instance and returns satus about that action.
*/
export declare function getActionStatus<E = Error, T extends Exome = any, R = any>(store: T, action: keyof T): ActionStatus<E, R>;
export {};