@hono/zod-validator
Advanced tools
Comparing version 0.1.9 to 0.1.10
@@ -11,8 +11,10 @@ import type { Context, MiddlewareHandler, Env, ValidationTargets, TypedResponse } from 'hono'; | ||
}, c: Context<E, P>) => Response | Promise<Response> | void | Promise<Response | void> | TypedResponse<O>; | ||
export declare const zValidator: <T extends z.ZodType<any, z.ZodTypeDef, any>, Target extends keyof ValidationTargets, E extends Env, P extends string, V extends { | ||
in: { [K in Target]: z.input<T>; }; | ||
out: { [K_1 in Target]: z.output<T>; }; | ||
type HasUndefined<T> = undefined extends T ? true : false; | ||
export declare const zValidator: <T extends z.ZodType<any, z.ZodTypeDef, any>, Target extends keyof ValidationTargets, E extends Env, P extends string, I = z.input<T>, O = z.output<T>, V extends { | ||
in: HasUndefined<I> extends true ? { [K in Target]?: I | undefined; } : { [K_1 in Target]: I; }; | ||
out: { [K_2 in Target]: O; }; | ||
} = { | ||
in: { [K_2 in Target]: z.input<T>; }; | ||
out: { [K_3 in Target]: z.output<T>; }; | ||
in: HasUndefined<I> extends true ? { [K_3 in Target]?: I | undefined; } : { [K_4 in Target]: I; }; | ||
out: { [K_5 in Target]: O; }; | ||
}>(target: Target, schema: T, hook?: Hook<z.TypeOf<T>, E, P, {}> | undefined) => MiddlewareHandler<E, P, V>; | ||
export {}; |
{ | ||
"name": "@hono/zod-validator", | ||
"version": "0.1.9", | ||
"version": "0.1.10", | ||
"description": "Validator middleware using Zod", | ||
@@ -5,0 +5,0 @@ "main": "dist/cjs/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
4265
63