#No autocompletion for the "astro-icon" package

1 messages · Page 1 of 1 (latest)

drifting stream
#

I wasn't sure where to post this, but I hope here is fine.

The "astro-icon" package provides types, which you can see by visiting .astro/icon.d.ts. (image 1)

Unfortunately, the package is not type safe. You can see (image 2) that the package will accept anything as the icon name.

There is a hacky workaround. By including /// <reference path="../.astro/icon.d.ts" /> in the src/env.d.ts file, (image 3) astro-icon will now provide autocompletion for icon names.

#

No autocompletion for the "astro-icon" package

#

cc @tepid horizon sorry for the ping 😅