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

TypeScript compiler error using counter #15648

Open
heruan opened this issue Oct 3, 2019 · 3 comments
Open

TypeScript compiler error using counter #15648

heruan opened this issue Oct 3, 2019 · 3 comments
Assignees
Labels

Comments

@heruan
Copy link

heruan commented Oct 3, 2019

Describe the bug
This code:

import { faEnvelopeSquare } from '@fortawesome/free-solid-svg-icons'
import { layer, icon, counter } from '@fortawesome/fontawesome-svg-core'

layer((push) => {
  push(icon(faEnvelopeSquare))
  push(counter(5)) // <-- error here
}).html

raises this compiler error:

Argument of type 'Counter' is not assignable to parameter of type 'Icon | Text | IconOrText[]'.

To Reproduce
Code above.

Expected behavior
No compiler error.

Version and implementation
Version: 5.10.2
Browser and version: none

@tagliala
Copy link
Member

tagliala commented Oct 4, 2019

Hi!

Thanks for being part of the Font Awesome Community.

Sorry, I cannot replicate.

Demo: https://codesandbox.io/s/epic-water-xt07j

Could you please check that you are using the latest available versions of the following packages?

    "@fortawesome/fontawesome-svg-core": "1.2.25",
    "@fortawesome/free-solid-svg-icons": "5.11.2"

@heruan
Copy link
Author

heruan commented Oct 4, 2019

Hi @tagliala and thank you for the feedback. It replicates with your demo:

Screenshot 2019-10-04 at 09 10 42 (3)

This change should fix: #15651

@tagliala
Copy link
Member

tagliala commented Oct 4, 2019

@heruan oh thanks, didn't see the underlined counter!

Let's assign @mlwilkerson and @robmadole

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants