nuxt / icon

The <Icon> component, supporting Iconify, Emojis and custom components.
https://stackblitz.com/edit/nuxt-icon-playground?file=app.vue
MIT License
874 stars 38 forks source link

error TS7053: Element implicitly has an 'any' type because expression of type '(string & {}) | "nuxt"' can't be used to index type '{ nuxt: string; }'. #71

Closed devbyP closed 1 year ago

devbyP commented 1 year ago

this error occur when I build the project


error TS7053: Element implicitly has an 'any' type because expression of type '(string & {}) | "nuxt"' can't be used to index type '{ nuxt: string; }'.

28 const iconName = computed(() => (appConfig.nuxtIcon?.aliases || {})[props.name] || props.name)
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Found 1 error in node_modules/nuxt-icon/dist/runtime/Icon.vue:28

Screenshot 2566-04-25 at 19 45 48

my setting Screenshot 2566-04-25 at 19 39 35

Screenshot 2566-04-25 at 19 39 23

Screenshot 2566-04-25 at 19 41 23

Atinux commented 1 year ago

Should be fixed with latest version of the module and Nuxt.