import { ValibotSchemaLike } from '../services/valibot'; import { ZodSchemaLike } from '../services/zod'; export type ParamExtras = { invalid: (message?: string) => never; }; export type ParamGetter = (value: string, extras: ParamExtras) => T; export type ParamSetter = (value: T, extras: ParamExtras) => string; export type ParamGetSet = { get: ParamGetter; set: ParamSetter; defaultValue?: T; }; export type LiteralParam = string | number | boolean; export type Param = ParamGetter | ParamGetSet | RegExp | BooleanConstructor | NumberConstructor | StringConstructor | DateConstructor | JSON | ZodSchemaLike | ValibotSchemaLike | LiteralParam;