| Post Reply | RetroFed Forum Forum Index » TypeScript |
| Author | Message | ||
|---|---|---|---|
|
sbv
sh.itjust.works
sbv@sh.itjust.works Joined: 2023-06-11 |
I'd like to validate untrusted config JSON submitted to my application against a TypeScript interface. If it's bad, I'd like to serialize a TypeScript object with default values, and suggest it as a pattern. Last time I looked, TypeScript didn't provide runtime access to types and interfaces, so I'm not clear if that's possible without build-time tomfoolery. I'd prefer to avoid JSON schemas if I can, but I guess that's an option too. Are there libraries or new-ish language features that I could use? |
||
| 1 Original | |||
| Post Reply |
Back to top |