From b7fe359dbc63b493d275df09f00c676de80b3f11 Mon Sep 17 00:00:00 2001 From: Sacramentix <35272156+Sacramentix@users.noreply.github.com> Date: Thu, 11 May 2023 15:03:08 +0200 Subject: [PATCH] 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 --- .changeset/modern-squids-invent.md | 5 +++++ packages/zod-validator/src/index.ts | 3 +-- 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 .changeset/modern-squids-invent.md diff --git a/.changeset/modern-squids-invent.md b/.changeset/modern-squids-invent.md new file mode 100644 index 00000000..7312905b --- /dev/null +++ b/.changeset/modern-squids-invent.md @@ -0,0 +1,5 @@ +--- +'@hono/zod-validator': patch +--- + +merge zod import into 1 line diff --git a/packages/zod-validator/src/index.ts b/packages/zod-validator/src/index.ts index 75878ea4..a3882fd5 100644 --- a/packages/zod-validator/src/index.ts +++ b/packages/zod-validator/src/index.ts @@ -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 = ( result: { success: true; data: T } | { success: false; error: ZodError },