merceyz / typescript-to-proptypes

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

Does not recognize forwardRef #2

Closed eps1lon closed 4 years ago

eps1lon commented 5 years ago

Looks like it does not add propTypes to forwardRef components. I can provide a full repro if you need one.

See https://github.com/mui-org/material-ui/pull/17841/commits/6e67426ba68cd3c245a848e861e28af4fa424f09

merceyz commented 4 years ago

Turns out I wasn't watching this repository, so sorry about the slow response.


Looks like it does not add propTypes to forwardRef components

This is documented in the readme, because at the time, material-ui didn't need it, so I didn't look into it.


I looked into it now and there seems to be no difference between React.memo and React.forwardRef when it comes to getting the type of the props, so i'll fix that right away.

merceyz commented 4 years ago

Released in v1.4.0

eps1lon commented 4 years ago

@merceyz Much appreciated. Helped us a lot: https://github.com/mui-org/material-ui/pull/18404/commits/9e1fb6e7d92909b6d58ee44995b501cf07079373