UNPKG

371 BTypeScriptView Raw
1import { Id } from '../types';
2export declare const enum ActionType {
3 ADD = 0,
4 REMOVE = 1
5}
6export declare type State = Array<Id>;
7export declare type Action = {
8 type: ActionType.ADD;
9 toastId: Id;
10 staleId?: Id;
11} | {
12 type: ActionType.REMOVE;
13 toastId?: Id;
14};
15export declare function reducer(state: State, action: Action): Id[];