Skip to content

Typescript error in Nuxt 3 integration #400

@cmitjans-at-wiris

Description

@cmitjans-at-wiris

Describe the bug
Followed the steps on how to integrate FontAwesome with Nuxt 3.

It seems the steps are not correct. I get an error when adding FontAwesomeIcon to vueApp.
image

When removing the last parameter (as you would do when integrating FontAwesome with Vue 3 directly - no Nuxt) the following error shows:

image

View Problem
Argument of type 'ComponentPublicInstance<FontAwesomeIconProps, {}, {}, {}, {}, {}, FontAwesomeIconProps, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>' is not assignable to parameter of type 'Component<any, any, any, ComputedOptions, MethodOptions>'.
  Type 'ComponentPublicInstance<FontAwesomeIconProps, {}, {}, {}, {}, {}, FontAwesomeIconProps, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>' is not assignable to type 'ComponentOptions<any, any, any, ComputedOptions, MethodOptions, any, any, any>'.
    Type 'ComponentPublicInstance<FontAwesomeIconProps, {}, {}, {}, {}, {}, FontAwesomeIconProps, {}, false, ComponentOptionsBase<any, any, any, any, any, any, any, any, any, {}>>' is not assignable to type 'ComponentOptionsBase<any, any, any, ComputedOptions, MethodOptions, any, any, any, string, {}>'.
      Types of property 'computed' are incompatible.
        Type '{ <T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; <T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<...>; }' is not assignable to type 'ComputedOptions'.
          Index signature for type 'string' is missing in type '{ <T>(getter: ComputedGetter<T>, debugOptions?: DebuggerOptions): ComputedRef<T>; <T>(options: WritableComputedOptions<T>, debugOptions?: DebuggerOptions): WritableComputedRef<...>; }'.ts(2345)

Expected behavior
There should be no typescript errors.

Additional context
Dependencies I'm using:

  "dependencies": {
    "@fortawesome/fontawesome-svg-core": "^6.2.0",
    "@fortawesome/free-solid-svg-icons": "^6.2.0",
    "@fortawesome/vue-fontawesome": "^3.0.1"
  }

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions