import { GenericSchema, GenericSchemaAsync, InferInput, InferOutput, SafeParseResult } from "valibot"; import { Context, Env, Handler, Input, TypedResponse, ValidationTargets } from "hono"; //#region src/index.d.ts type FailedResponse = SafeParseResult extends infer U ? Response & TypedResponse : never; type MustBeResponse = T$1 extends Promise ? Promise> : T$1 extends Response | TypedResponse ? T$1 : never; type Hook | Promise | void> = void | Response | TypedResponse | Promise | void>> = (result: SafeParseResult & { target: Target$1; }, c: Context) => R$1; type HasUndefined = undefined extends T$1 ? true : false; declare const vValidator: , Out = InferOutput, I extends Input = { in: HasUndefined extends true ? { [K in Target]?: In extends ValidationTargets[K] ? In : { [K2 in keyof In]?: ValidationTargets[K][K2] } } : { [K in Target]: In extends ValidationTargets[K] ? In : { [K2 in keyof In]: ValidationTargets[K][K2] } }; out: { [K in Target]: Out }; }, V extends I = I, R extends void | Response | TypedResponse | Promise | void> = FailedResponse>(target: Target, schema: T, hook?: Hook) => Handler>; //#endregion export { FailedResponse, Hook, vValidator }; //# sourceMappingURL=index.d.ts.map