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

Feature: autogenerated types #396

Open
3 tasks done
Namchee opened this issue Jan 22, 2025 · 0 comments
Open
3 tasks done

Feature: autogenerated types #396

Namchee opened this issue Jan 22, 2025 · 0 comments
Labels
enhancement New feature or request

Comments

@Namchee
Copy link

Namchee commented Jan 22, 2025

Clear and concise description of the problem

When using unplugin-icons compared to dedicated library of icon pack such as lucide-react, I missed being able to auto complete when trying to import icons on my project as unplugin-icons only provides very generic type definition that is designed to cater all icon pack without having to worry what packs that are installed.

Suggested solution

We can generate stronger types as a postinstall script that scans the @iconify-json declarations and define modules for each of them with previews, same as what lucide-react does.

To this end, I've create a small proof-of-concept that generates better types for unplugin-icons based on what icon packs that are available.

Alternative

No response

Additional context

Demo

Screen.Recording.2025-01-22.221336.mp4

What the documentation looks like

Image

Validations

@Namchee Namchee added the enhancement New feature or request label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant