typebox-codegen
typebox-codegen copied to clipboard
Code Generation for TypeBox Types
Hi! This commit adds code generation for **functions** for **valibot**. Currently, functions were treated as an unsupported type. In reality, valibot has the following function-centric methods: - https://valibot.dev/api/function/ - https://valibot.dev/api/args/...
The JSDoc parser breaks negative numbers in tags like `@minimum -10` because it treats - as a delimiter at any position, yielding empty strings instead of the negative value.
Hi @sinclairzx81 ! First of all, thank you for creating and maintaining this project, it helped me a lot through the `typed-openapi` lib. **TL;DR:** TypescriptToModel.Generate silently produces incorrect output from...
This simple type throws the Syntax Error below. ```ts // This does not work: type Test = { ids: { status: string; }[]; } // This works type IDStatus =...
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,...
When transforming an interface that includes nested objects (I have flattened it here for convenience, but even this flattened version does not work): ```/*** The response from the ISteamUserAuth/AuthenticateUserTicket/v1 endpoint....
Compiling the following type results in a syntax error: ```ts Codegen.TypeScriptToModel.Generate(`export type T = [string, ...string[]]`); ``` The thrown error: ``` ...Type.Rest(string[]) ^ SyntaxError: Unexpected token ']' ``` The TypeScript...
- Refactored string schema (format, pattern, minLength, maxLength) validation logic into dedicated functions - Improved Record type to generate key validators based on pattern - Added support for format validations...
Zod v4 has been released alongside zod v3 as of Zod v3.25 at the `zod/v4` subpath. It would be good to have this codegen code for Zod updated to use...