milesj / babel-plugin-typescript-to-proptypes

Generate React PropTypes from TypeScript interfaces or type aliases.
MIT License
367 stars 25 forks source link

Unions compiling down to invalid values #31

Closed milesj closed 4 years ago

milesj commented 4 years ago

Ran into this myself today. This prop type scrollToGroup: _pt.oneOfType([_pt.oneOf([''])]), was crashing our builds.

Source: https://github.com/milesj/interweave/blob/master/packages/emoji-picker/src/EmojiList.tsx#L25

Looks like I need to also filter out empty strings? Man, dealing with unknown refs is getting gross.