Closed salimfadhley closed 5 years ago
This definition would be very useful eg to avoid invalid dataclass instances.
In JavaScript it's not possible because Babel removes class fields with no value as "Flow type annotation". The same happens in TypeScript. This means, there are no "keys" to operate in runtime.
I want to define a simple Record in which all fields are compulsory. This code complies fine:
But what I'd really like to do is this:
Where I don't provide a default value to my compulsory fields. Can this be done?