Re:Show HN: TypeScript Editor that generates structured form...
by fwouts on Friday July 29, 2022 @04:20AM
(#32274356)
Yes! They're called discriminated unions: https://www.typescriptlang.org/docs/handbook/typescript-in-5...
Here's an example: https://tseditor.fwouts.com/?t=ZXhwb3J0IHR5cGUgVmFsdWUgPSBVc...
I have an app doing almost the same except it has its own schema editor, not typescript, work directly with ast.