react-unicons
react-unicons copied to clipboard
Add TypeScript type declaration file
- Adds a type declaration file, including types for the icons and their props (based on the declaration seen here)
- Adds code to
generate.js
to generate that type declaration file
This is a simple way to address https://github.com/Iconscout/react-unicons/issues/25, the TypeScript support issue.
The other PR addressing it is https://github.com/Iconscout/react-unicons/pull/50. It's great but is a full conversion. I thought perhaps the reason it wasn't merged is that it has too many changes.
My PR adds the types in a more minimal way, by adding solely the declaration file index.d.ts
. This is enough to greatly improve the development experience for anyone using TypeScript i.e. most major tech companies.
Some screenshots of it working in VS Code:
@rankarpan any chance this could get a review? who is maintaining this repository nowadays?
Any way this PR can get some love?