@brizy/media-gallery
Version:
23 lines (22 loc) • 855 B
TypeScript
import { IActionWithPayload } from "~/redux/action";
import { Action } from "redux";
export declare enum Types {
Add = "notifications:add",
Remove = "notifications:remove"
}
interface AddPayload {
type: "info" | "success" | "error";
key: string;
message: string;
duration?: number;
}
export type Add = IActionWithPayload<Types.Add, AddPayload>;
export declare const add: (payload: AddPayload) => Add;
export declare const info: (key: string, message: string) => Add;
export declare const success: (key: string, message: string) => Add;
export declare const error: (key: string, message: string) => Add;
export type Remove = IActionWithPayload<Types.Remove, string>;
export declare const remove: (payload: string) => Remove;
export type Actions = Add | Remove;
export declare const isAction: (a: Action) => a is Actions;
export {};