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.