tailwindlabs / heroicons

A set of free MIT-licensed high-quality SVG icons for UI development.
https://heroicons.com
MIT License
21.22k stars 1.27k forks source link

Fix vue TypeScript declarations #322

Closed zmwangx closed 3 years ago

zmwangx commented 3 years ago

The declarations generated by #254 aren't correct, leading to tsc errors as seen in #318.

manast commented 3 years ago

Can this be merged? currently blocked by this issue when using tailwind UI components...

VottusCode commented 3 years ago

The import("vue") should work normally. It always worked for me and others with Vue3+Vite+TS setups. There must be another issue why this happens.

SniC commented 3 years ago

@VottusCode I've created an example repository here that reproduces the problem: https://github.com/SniC/heroicons-vite-typescript-problem

bradlc commented 3 years ago

Thanks for this! I think it should be RenderFunction instead of DefineComponent though? I'm going to make that change then publish a new version 👍