icon icon indicating copy to clipboard operation
icon copied to clipboard

error TS2339: Property 'aliases' does not exist on type '{}'

Open some-user123 opened this issue 1 year ago • 8 comments

Details in this (closed) issue: https://github.com/nuxt-modules/icon/issues/62

some-user123 avatar Jun 20 '23 08:06 some-user123

Details in this (closed) issue: #62

Re-emerged in [email protected].

ennioVisco avatar Jun 27 '23 11:06 ennioVisco

Anyone know a workaround for this other than disabling typecheck?

stephiescastle avatar Jul 27 '23 15:07 stephiescastle

One workaround could be to add this to the app.config.ts

nuxtIcon: { aliases: undefined, class: undefined, size: undefined, },

Me-Phew avatar Jul 29 '23 23:07 Me-Phew

@Atinux any updates on this issue? We're using nuxt-icon in production and this is something we're hoping to not need to create a workaround for.

jamesray avatar Jul 31 '23 19:07 jamesray

One workaround could be to add this to the app.config.ts

nuxtIcon: { aliases: undefined, class: undefined, size: undefined, },

Thanks @Me-Phew! This worked as a temporary fix and allows us to keep typeCheck enabled for everything else.

stephiescastle avatar Jul 31 '23 20:07 stephiescastle

Are you also getting this error?

Me-Phew avatar Aug 01 '23 22:08 Me-Phew

Are you also getting this error?

You could add index.d.ts to temporarily solve it as it is mentioned in pull#63 by luke-z:

// workaround for https://github.com/nuxt-modules/icon/pull/63
import * as _nuxt_schema from '@nuxt/schema'

interface NuxtIconModuleOptions {
  size?: string | false
  class?: string
  aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
  interface AppConfig {
    nuxtIcon?: NuxtIconModuleOptions
  }
}

zllvm avatar Aug 06 '23 07:08 zllvm

Are you also getting this error?

You could add index.d.ts to temporarily solve it as it is mentioned in pull#63 by luke-z:

// workaround for https://github.com/nuxt-modules/icon/pull/63
import * as _nuxt_schema from '@nuxt/schema'

interface NuxtIconModuleOptions {
  size?: string | false
  class?: string
  aliases?: { [alias: string]: string }
}

declare module '@nuxt/schema' {
  interface AppConfig {
    nuxtIcon?: NuxtIconModuleOptions
  }
}

It works, thanks!

Me-Phew avatar Aug 06 '23 14:08 Me-Phew