save 1 lines of import on Zod-validator (#87)

* save 1 lines of import

Just moving ZodSchema and ZodError to the import of z

* add changeset
pull/88/head
Sacramentix 2023-05-11 15:03:08 +02:00 committed by GitHub
parent e0db0f704b
commit b7fe359dbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -0,0 +1,5 @@
---
'@hono/zod-validator': patch
---
merge zod import into 1 line

View File

@ -1,7 +1,6 @@
import type { Context, MiddlewareHandler, Env, ValidationTargets } from 'hono'
import { validator } from 'hono/validator'
import type { z } from 'zod'
import type { ZodSchema, ZodError } from 'zod'
import type { z, ZodSchema, ZodError } from 'zod'
type Hook<T, E extends Env, P extends string> = (
result: { success: true; data: T } | { success: false; error: ZodError },