ngrx-loading-state
Version:
NgRx Loading State consistently manages loading actions such as API fetches.
28 lines (27 loc) • 779 B
TypeScript
import { FailureAction, LoadAction, LoadingState } from '../loading-state/loading-state-types';
export declare const ID_LOADING_STATE: "ID_LOADING_STATE";
export declare type Id = string;
export interface IdLoadingState extends LoadingState {
/** For dynamic type checking */
isIdLoadingState: true;
/** ID to identify this state */
id: Id | null;
}
export interface IdLoadAction extends LoadAction {
id: Id;
}
export interface IdSuccessAction {
id: Id;
}
export interface IdFailureAction extends FailureAction {
id: Id;
}
export interface IdLoadingStateMap {
[key: Id]: IdLoadingState;
}
export interface IdLoadingStates {
[key: string]: IdLoadingStateMap;
}
export interface WithIdLoadingStatesOnly {
idLoadingStates: IdLoadingStates;
}