loop-modules
Version:
Shared modules for the Loop product suite.
55 lines (54 loc) • 1.73 kB
TypeScript
import { Action } from '@ngrx/store';
/**
* For each action type in an action group, make a simple
* enum object for all of this group's action types.
*
* The 'type' utility function coerces strings into string
* literal types and runs a simple check to guarantee all
* action types in the application are unique.
*/
export interface IEmployeeActions {
SUBORDINATES: string;
SET_ENTRIES: string;
TOGGLE_SELECTED: string;
SET_SELECTED: string;
ACTIVE: string;
}
export declare const ActionTypes: IEmployeeActions;
/**
* Every action is comprised of at least a type and an optional
* payload. Expressing actions as classes enables powerful
* type checking in reducer functions.
*
* See Discriminated Unions: https://www.typescriptlang.org/docs/handbook/advanced-types.html#discriminated-unions
*/
export declare class SubordinatesAction implements Action {
payload: any[];
type: string;
constructor(payload: any[]);
}
export declare class SetEntriesAction implements Action {
payload: any[];
type: string;
constructor(payload?: any[]);
}
export declare class ToggleSelectedAction implements Action {
payload: any;
type: string;
constructor(payload: any);
}
export declare class SetSelectedAction implements Action {
payload: any[];
type: string;
constructor(payload?: any[]);
}
export declare class ActiveAction implements Action {
payload: any;
type: string;
constructor(payload: any);
}
/**
* Export a type alias of all actions in this action group
* so that reducers can easily compose action types
*/
export declare type Actions = SubordinatesAction | SetEntriesAction | ToggleSelectedAction | SetSelectedAction | ActiveAction;