typebox-codegen icon indicating copy to clipboard operation
typebox-codegen copied to clipboard

Always supply Zod record key type

Open greenlynx opened this issue 5 months ago • 0 comments

In Zod v4, the single argument overload of z.record() has been dropped: https://zod.dev/v4/changelog?id=drops-single-argument-usage

This PR supplies z.string() as the key instead of using the single argument overload, which is equivalent, and also compatible with Zod v3.

This provides enough Zod v4 compatibility for us to use typebox-codegen today, before a "proper" Zod v4-compatible version is release.

greenlynx avatar Oct 08 '25 12:10 greenlynx