UNPKG

remix-toast

Version:

Utility functions for server-side toast notifications

22 lines (19 loc) 866 B
import { SessionStorage, MiddlewareFunction, RouterContextProvider } from 'react-router'; import { T as ToastMessage } from '../schema-797d9a10.js'; import 'zod'; declare function toastMiddleware(props?: { customSession?: SessionStorage; }): MiddlewareFunction; declare const setToast: (context: RouterContextProvider | Readonly<RouterContextProvider>, toast: ToastMessage | null) => void; declare const getToast: (context: RouterContextProvider | Readonly<RouterContextProvider>) => { [x: string]: unknown; message: string; type: "error" | "info" | "success" | "warning"; description?: string | undefined; duration?: number | undefined; } | null; /** * @deprecated Use `toastMiddleware` instead. */ declare const unstable_toastMiddleware: typeof toastMiddleware; export { getToast, setToast, toastMiddleware, unstable_toastMiddleware };