FortAwesome / vue-fontawesome

Font Awesome Vue component
https://fontawesome.com
MIT License
2.38k stars 132 forks source link

3.x Types Issue: FontAwesomeIconProps missing values #415

Closed brandon-mork closed 1 year ago

brandon-mork commented 1 year ago

Describe the bug Types in index.d.ts FontAwesomeIconProps do not match actual expected props in FontAwesomeIcon.js.

Expected behavior Exact match of supported props and associated types definition.

Reproduction In any typescript app consuming v3.0.2 of vue-fontawesome, attempt to utilize prop size="xl". See type error: error TS2322: Type '"xl"' is not assignable to type '"lg" | "xs" | "sm" | "1x" | "2x" | "3x" | "4x" | "5x" | "6x" | "7x" | "8x" | "9x" | "10x" | undefined'.

Additional context Issue introduced by: https://github.com/FortAwesome/vue-fontawesome/pull/366

Exact diff of expected types

- size?:         'xs' | 'sm' | 'lg'                | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x'
+ size?: '2xs' | 'xs' | 'sm' | 'lg' | 'xl' | '2xl' | '1x' | '2x' | '3x' | '4x' | '5x' | '6x' | '7x' | '8x' | '9x' | '10x'
+ bounce?: boolean
+ shake?: boolean
+ beat?: boolean
+ fade?: boolean
+ beatFade?: boolean
+ flash?: boolean
+ spinPulse?: boolean
+ spinReverse?: boolean
jasonlundien commented 1 year ago

@brandon-mork ---

I have added in the missing sizes. I will go ahead and close this issues. Let us know if anything else pops up.

brandon-mork commented 1 year ago

@jasonlundien your PR fails to sync the other props available on the component but missing in the types... Logged as a separate issue: https://github.com/FortAwesome/vue-fontawesome/issues/428

Provided PR would have fixed all of the documented issues: https://github.com/FortAwesome/vue-fontawesome/pull/416