Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tsx error #276

Closed
mivui opened this issue Jan 3, 2021 · 7 comments
Closed

tsx error #276

mivui opened this issue Jan 3, 2021 · 7 comments

Comments

@mivui
Copy link

mivui commented Jan 3, 2021

Describe the bug
JSX element type 'FontAwesomeIcon' does not have any construct or call signatures.

Reproducible test case
Include a URL (codepen.io, jsfiddle.net, Git repository, codesandbox.io, stackblitz.com, etc.) that demonstrates the problem.

Expected behavior
image

Desktop (please complete the following information):

  • Version
    "vue": "^3.0.5",
    @fortawesome/vue-fontawesome": "^3.0.0-3"

Additional context
Add any other context about the problem here.

@robmadole
Copy link
Member

@uinio if you can provide a reproducible test case we'll be happy to take a look. Until then I'll close this. (and I'll re-open as soon as you provide the test case)

@mivui
Copy link
Author

mivui commented Jan 17, 2021

fix
https://github.com/FortAwesome/vue-fontawesome/blob/3.x/index.d.ts
EndOfLine

declare const FontAwesomeIcon: DefineComponent<FontAwesomeIconProps>
declare const FontAwesomeLayers: DefineComponent<FontAwesomeLayersProps>
declare const FontAwesomeLayersText: DefineComponent<FontAwesomeLayersTextProps>

@XiNiHa
Copy link

XiNiHa commented Feb 3, 2021

Just faced the same issue. Use FontAwesomeIcon inside TSX and a type error will pop in.

parkeyparker added a commit to SourceCube-Ltd/vue-fontawesome that referenced this issue Mar 4, 2022
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per FortAwesome#276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
parkeyparker added a commit to SourceCube-Ltd/vue-fontawesome that referenced this issue Mar 4, 2022
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per FortAwesome#276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
@Maxim-Mazurok
Copy link

Same issue, using with boilerplate vue 3 TSX repo. Fix by uinio works, will use https://www.npmjs.com/package/patch-package for now

@Maxim-Mazurok
Copy link

@robmadole here's a reproduction repo: https://github.com/Maxim-Mazurok/vue3-fa-repro, please see README.md for instructions, and please reopen this issue, thanks!

@robmadole
Copy link
Member

perfect @Maxim-Mazurok we'll take a look.

@robmadole robmadole reopened this Apr 12, 2022
parkeyparker added a commit to SourceCube-Ltd/vue-fontawesome that referenced this issue Oct 17, 2022
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per FortAwesome#276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
jasonlundien pushed a commit that referenced this issue Nov 3, 2022
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per #276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
@mivui
Copy link
Author

mivui commented Nov 27, 2022

@fortawesome/vue-fontawesome 3.0.2 fixed #276 (comment)

@mivui mivui closed this as completed Nov 27, 2022
jasonlundien pushed a commit that referenced this issue Jan 5, 2023
`FontAwesomeIcon` and other components needed to be of type `DefineComponent` for Vue 3 Composition API TypeScript support (as per #276). The type definitions for the component props also needed updating to denote required and optional props. Whilst checking which props were required it was noted that the `FontAwesomeLayer` component uses `fixedWidth` but the README and example use `full-width` so these have been updated to match the component code.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants