UNPKG

loop-modules

Version:

Shared modules for the Loop product suite.

37 lines (36 loc) 1.21 kB
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 ILoopTrendingActivityActions { QUERY: string; SET_ENTRIES: string; } export declare const ActionTypes: ILoopTrendingActivityActions; /** * 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 QueryAction implements Action { payload: any[]; type: string; constructor(payload: any[]); } export declare class SetEntriesAction 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 = QueryAction | SetEntriesAction;