remix-toast
Version:
Utility functions for server-side toast notifications
36 lines (33 loc) • 1.65 kB
TypeScript
import { z } from 'zod';
declare const toastMessageSchema: z.ZodObject<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
type: z.ZodType<"info" | "success" | "error" | "warning", z.ZodTypeDef, "info" | "success" | "error" | "warning">;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
type: z.ZodType<"info" | "success" | "error" | "warning", z.ZodTypeDef, "info" | "success" | "error" | "warning">;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
type: z.ZodType<"info" | "success" | "error" | "warning", z.ZodTypeDef, "info" | "success" | "error" | "warning">;
}, z.ZodTypeAny, "passthrough">>;
declare const toastMessageWithoutTypeSchema: z.ZodObject<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
}, "passthrough", z.ZodTypeAny, z.objectOutputType<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
}, z.ZodTypeAny, "passthrough">, z.objectInputType<{
message: z.ZodString;
description: z.ZodOptional<z.ZodString>;
duration: z.ZodOptional<z.ZodNumber>;
}, z.ZodTypeAny, "passthrough">>;
type ToastMessage = z.infer<typeof toastMessageSchema> & {};
type ToastMessageWithoutType = z.infer<typeof toastMessageWithoutTypeSchema> & {};
export { ToastMessage as T, ToastMessageWithoutType as a };