phosphor-icons / vue

A flexible icon family for Vue
https://phosphoricons.com
MIT License
199 stars 20 forks source link

TypeScript errors: "no exported member..." #19

Closed Clex1o1 closed 1 year ago

Clex1o1 commented 2 years ago

Hello,

we've got some type errors while importing single icons in vue/nuxt with typescript. The import looks like this:

<script lang="ts">
import { PhXCircle, PhCalendarBlank, PhClock } from 'phosphor-vue'

And the error in VS Code is:

Module '"phosphor-vue"' has no exported member 'PhXCircle'. Did you mean to use 'import PhXCircle from "phosphor-vue"' instead?ts(2614)

But the result works, with this error?

I found this import statement which i never saw like this before. https://github.com/phosphor-icons/phosphor-vue/blob/4f28cd2e29ca8350b7a0283e241dac5546a8c631/phosphor-vue.d.ts#L3 I guess what i should do, is to pass the exported components from index.ts through the phoshor.d.ts, but this seems not to be valid in TypeScript.

cn-2k commented 2 years ago

Same here.

dnlsndr commented 1 year ago

This should be fixed with the next major version release. You can try it out by installing @phosphor-icons/vue@next.

OfficialCRUGG commented 1 year ago

Any solution for solving this issue with Vue 2 support?