unplugin / unplugin-icons

🤹 Access thousands of icons as components on-demand universally.
https://www.npmjs.com/package/unplugin-icons
MIT License
3.66k stars 131 forks source link

fix: preact type definition #270

Closed jonathandion closed 1 year ago

jonathandion commented 1 year ago

I've updated the Preact type declaration to resolve an error that was occurring during my project builds. The error message was:

node_modules/unplugin-icons/types/preact.d.ts(2,22): error TS2305: Module '"node_modules/preact/src"' has no exported member 'SVGProps'.

The error message indicates that Preact doesn't export the SVGProps interface like React does, so I've updated the type definition to use JSX.SVGAttributes instead. This should resolve the error.

Thank you for your time and consideration.