jcamp-code / nuxt-icon-tw

The <Icon> component, supporting Tailwind CSS Icons, Iconify, Emojis and custom JSON files.
MIT License
1 stars 1 forks source link

chore(linter): fix typecheck error #6

Closed moifort closed 2 months ago

moifort commented 3 months ago

Fix error when running nuxi generate when type check is activated. I know that is not a clean way.

node_modules/.pnpm/nuxt-icon-tw@0.1.3_@nuxtjs+tailwindcss@6.12.0_rollup@4.17.2_ts-node@10.9.2_@swc+core@1.4.17_@_dmp2fs736wffqmjuqie53ju5j4/node_modules/nuxt-icon-tw/dist/runtime/IconTw.vue:5:19 - error TS2352: Conversion of type 'AppConfig' to type '{ nuxtIcon: { size?: string | undefined; class?: string | undefined; aliases?: Record<string, string> | undefined; }; }' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first.
  Property 'nuxtIcon' is missing in type 'AppConfig' but required in type '{ nuxtIcon: { size?: string | undefined; class?: string | undefined; aliases?: Record<string, string> | undefined; }; }'.

  5 const appConfig = useAppConfig() as {
                      ~~~~~~~~~~~~~~~~~~~
  6   nuxtIcon: {
    ~~~~~~~~~~~~~
... 
 10   }
    ~~~
 11 }
    ~

  node_modules/.pnpm/nuxt-icon-tw@0.1.3_@nuxtjs+tailwindcss@6.12.0_rollup@4.17.2_ts-node@10.9.2_@swc+core@1.4.17_@_dmp2fs736wffqmjuqie53ju5j4/node_modules/nuxt-icon-tw/dist/runtime/IconTw.vue:6:3
    6   nuxtIcon: {
        ~~~~~~~~
    'nuxtIcon' is declared here.