UNPKG

sveltekit-flash-message

Version:

Send temporary data to the next request after redirect. Works with both SSR and client.

13 lines (12 loc) 554 B
import { FlashMessage, type FlashMessageType } from './flashMessage.js'; import { type FlashOptions } from './options.js'; export declare class FlashRouter { readonly routes: Map<string, FlashMessage>; private messageStore; constructor(); get defaultRoute(): FlashMessage; has(routeId: string): boolean; getFlashMessage(routeId: string | null | undefined): FlashMessage; getClosestRoute(routeId: string): FlashMessage; createRoute(routeId: string, data: FlashMessageType, options?: Partial<FlashOptions>): FlashMessage; }