Closed Tanner-Scadden closed 1 year ago
Hey! Thank you for your question! Much appreciated! 🙏
The TypeScript declaration files are definitely there, as you can see here:
Here is a screenshot from my editor:
Make sure you have installed the @heroicons/react
or @heroicons/vue
package. You can also try to nuke the node_modules
folder and reinstall. If that doesn't work then you can try to restart your tsserver process. If all of that doesn't work, then I would like to ask you to open a new issue with a reproduction repo attached so that we can take a look.
I think it's when you reference '@heroicons/react/outline', which vscode implies is an option, it shows the red squiggly line.
I'm also having issues because declaration file is missing.
If you are using v2 of Heroicons, then including @heroicons/react/outline
won't work (You will get a runtime error telling you to use v1 because that import only works there).
If you are on v2 and use the correct imports:
import X from '@headlessui/react/20/solid
import X from '@headlessui/react/24/solid
import X from '@headlessui/react/24/outline
import X from '@headlessui/vue/20/solid
import X from '@headlessui/vue/24/solid
import X from '@headlessui/vue/24/outline
Then TypeScript will and should work since they come with TypeScript definitions as mentioned here: https://github.com/tailwindlabs/heroicons/issues/771#issuecomment-1229156206
2.0+ is missing typescript declaration files. Will this be added back in soon?