kanwren / augustus

Serialization/data validation combinator library for TypeScript
MIT License
1 stars 1 forks source link

`classOf` can't be used with private or optional fields #6

Open kanwren opened 4 years ago

kanwren commented 4 years ago

Handling private fields is likely impossible without unsafely casting away the private, which I don't want to do. In either case, we can just fall back to the more general contra over a recordOf. Still, an optional foo?: Bar field should not force the user to either use foo: Bar | undefined or fall back to contra.