4 ms·
Could you give an example or two of “more than that”?
by vosper 1y ago
Could you give an example or two of “more than that”?
- mintplant 1y agoYeah, you can walk the AST of your types at runtime and do arbitrary things with it. For example, we're using ArkTypes as our single source of truth for our data and deriving database schemas from them. This becomes very nice because ArkType's data model is close to an enriched version of TypeScript's own data model. So it's like having your TypeScript types introspectable and transformable at runtime.
- vosper 1y agoThat's neat, thanks!
- retropragma 1y agoTypeBox is similar by virtue of its goal of its runtime types matching JSON Schema's data model without need for conversion.
- epolanski 1y agoYou can do whatever you want with the AST in effect schema too, it's a parser with a decoder/encoder architecture: https://effect.website/docs/schema/transformations/ https://effect.website/docs/schema/transformations/