gcanti / io-ts-codegen

Code generation for io-ts
https://gcanti.github.io/io-ts-codegen/
MIT License
156 stars 14 forks source link

update optional property support #27

Closed mmkal closed 6 years ago

mmkal commented 6 years ago

@gcanti @giogonzo

For interfaces with optional properties, use either partialCombinator (for all optional) or intersectionCombinator (for mixed) to allow for true optional properties, which don't require explicitly assigning undefined.

Addresses https://github.com/gcanti/io-ts-codegen/issues/26. This can likely be simplified or reverted if a solution for https://github.com/gcanti/io-ts/issues/140 is found.

gcanti commented 6 years ago

Thanks @mmkal, released