Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add TypeScript type declaration file #84

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

Tooni
Copy link

@Tooni Tooni commented Aug 17, 2023

  • 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 #25, the TypeScript support issue.

The other PR addressing it is #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
Copy link
Author

Tooni commented Aug 22, 2023

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

@jameshschuler
Copy link

Any way this PR can get some love?

@willibix
Copy link

@tarunmangukiya and @rankarpan please review and merge this. Same update to Iconscout/react-unicons-solid would be aprciated.

@Tooni
Copy link
Author

Tooni commented Aug 26, 2024

i have made a new repo here that supports all the Unicon icon styles (line, thinline, monochrome, solid) in typescript with react

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants