react-star-ratings icon indicating copy to clipboard operation
react-star-ratings copied to clipboard

Add TypeScript typings

Open pschyma opened this issue 5 years ago • 3 comments

This PR adds typings to allow for an easier integration in TypeScript based projects.

All types are extracted from the source files and the documentation. Here the values found in the source code take precedence. For example the type of the changeRating handler is ((rating, name?) => void) | null with a default of null instead of () => {} like stated in the documentation.

This also fixes #10 in TypeScript projects, because I added the corresponding property to the component, since the feature is already implemented but the propTypes lack the correspondig property whilst its default is set to Star.

pschyma avatar Jun 09 '19 19:06 pschyma

Pls create a new npm package for typescript :)

ergofriend avatar Aug 16 '19 08:08 ergofriend

When will this be merged?

blimpmason avatar Aug 03 '20 19:08 blimpmason

can this pr get merged?

mayinghan avatar May 03 '21 01:05 mayinghan