Skip to content

Support for zod/v4 #33

@theshadow27

Description

@theshadow27

Zod is preparing for the v4 release, and v3.25+ can use import {z} from "zod/v4" to get access to the new API.

Since typemap hard-imports import * as z from "zod", the Zod and TypeBoxFromZod don't work with v4.

Is there a plan for a TypeBoxFromZodV4 or something? You open to a contrib?

Edit: Hopefully you're open to a contrib... see #34 .

My use case is a bun monorepo with an Elysia server, but I had already typed everything in "zod/v4" before I realized that it wouldn't work. Since Elysia relies on TypeMap types, a conversion is necessary to leverage the nice fluent API that Elysia provides while keeping my single-source-of-truth types intact.

Awesome library btw - if it weren't so well structured no way that this could have been added in < 5h. 👍

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions