natemoo-re / astro-icon

Inline and sprite-based SVGs in Astro made easy!
https://astroicon.dev
Other
1.01k stars 57 forks source link

typescript Props tips? #62

Closed J-env closed 1 year ago

J-env commented 1 year ago

Component has no props tips

stramel commented 1 year ago

@J-env Can you provide more information? I'm able to see the Prop tips in VSCode when using this package.

stramel commented 1 year ago

I'm going to close this for now. I'm willing to re-open if more details are provided and proves to be an issue with the library.

benjavicente commented 1 year ago

Hi and thanks for the awesome library!

I have the same problem in version 0.8.0: The Icon component gives me the following type:

function Icon(_props: Record<string, any>): any

Initializing an empty project and using the Icon component like

<Icon thisShouldGiveAnError="here" />

doesn't give an error while type checking with astro check.

Installing the library with pnpm or npm made no diference.

Edit: this might be an Astro issue 🤔