You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks again for this wonderful piece of software! We currently rely on typebox-codegen in production for a few things and unfortunately this is making it difficult for us to upgrade to Typebox 1.x as typebox-codegen (to my understanding) doesn't yet support 1.x
Is this something that is planned on being supported?
Is this something that is planned on being supported?
Yes, it's possible, but am trying to decide how I want to approach it. The TypeBox-Codegen project is developed on top of the TypeScript Compiler API (JavaScript), but where TypeBox 1.x actually developed it's own TypeScript Parser (and where the Codegen was a research prototype for the eventual 1.x Script function)
The current TypeScript Compiler will eventually be phased out in favor of the Native GO compiler (TS7+), so I need to make a decision as to what I want to do here.
Update Codegen to use the TypeScript 7 Native Compiler (WASM)
Update Codegen to use the TypeBox Script Parse| Evaluator.
I am somewhat leaning towards option (2), but there would be a few caveats to be mindful of. Mostly the JSDoc support isn't available in the TypeBox Script function, so If i do go this route, it would be a breaking change (implementations would need to update to the TB1X Options<T> type to specify metadata.
Out of interest, what specific features of Codegen were you using? Was it just TS to TypeBox translation, or were you using some of the other library transforms? Let me know, as it would help being a bit of insight into how users are leveraging Codegen in projects.
Hope this brings some insight into future updates to Codegen.
Cheers!
S
We only use TypeScriptToTypeBox.Generate() (currently specifically for ts-proto generated interfaces). We don't currently use JSDoc or the other library transforms and don't currently plan on using it so option (2) seems very reasonable!
Activity
sinclairzx81 commentedon May 11, 2026
@jackyzha0 Hi,
Yes, it's possible, but am trying to decide how I want to approach it. The TypeBox-Codegen project is developed on top of the TypeScript Compiler API (JavaScript), but where TypeBox 1.x actually developed it's own TypeScript Parser (and where the Codegen was a research prototype for the eventual 1.x Script function)
https://github.com/sinclairzx81/typebox#script
The current TypeScript Compiler will eventually be phased out in favor of the Native GO compiler (TS7+), so I need to make a decision as to what I want to do here.
I am somewhat leaning towards option (2), but there would be a few caveats to be mindful of. Mostly the JSDoc support isn't available in the TypeBox Script function, so If i do go this route, it would be a breaking change (implementations would need to update to the TB1X
Options<T>type to specify metadata.Out of interest, what specific features of Codegen were you using? Was it just TS to TypeBox translation, or were you using some of the other library transforms? Let me know, as it would help being a bit of insight into how users are leveraging Codegen in projects.
Hope this brings some insight into future updates to Codegen.
Cheers!
S
jackyzha0 commentedon May 11, 2026
We only use
TypeScriptToTypeBox.Generate()(currently specifically for ts-proto generated interfaces). We don't currently use JSDoc or the other library transforms and don't currently plan on using it so option (2) seems very reasonable!