Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's also possible -- for specific cases, probably not generally -- define your schema object as const and use type manipulation to generate "real" types automagically. Toy example here: https://github.com/andrewaylett/aylett.co.uk/blob/3fffae1bab...

This lets me run my inputs through a schema validator, and ensure that the type I'm using statically will match the schema used at runtime.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: