merceyz / typescript-to-proptypes

Generate proptypes from typescript declarations
MIT License
53 stars 21 forks source link

fix: unknown can be optional #7

Closed eps1lon closed 4 years ago

eps1lon commented 4 years ago

Fixes { value?: unknown } being considered value: PropTypes.any.isRequired.

The propTypes validator would throw runtime errors for undefined which is fine at the type-level. We want the type-level semantics at runtime.

merceyz commented 4 years ago

Thanks!