react-unicons icon indicating copy to clipboard operation
react-unicons copied to clipboard

Add TypeScript type declaration file

Open Tooni opened this issue 1 year ago • 4 comments

  • 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:

Screenshot 2023-08-17 at 16 06 12 Screenshot 2023-08-17 at 16 07 39

Tooni avatar Aug 17 '23 15:08 Tooni

@rankarpan any chance this could get a review? who is maintaining this repository nowadays?

Tooni avatar Aug 22 '23 09:08 Tooni

Any way this PR can get some love?

jameshschuler avatar May 09 '24 21:05 jameshschuler