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

feat: add FontAwesomeIconProps export in index.d.ts #496

Conversation

lctech-jeff
Copy link

This will fix the export issue like mentioned before.

FaIcon.vue

<template>
  <FontAwesomeIcon :icon="props.icon" />
</template>

<script setup lang="ts">
import { type FontAwesomeIconProps, FontAwesomeIcon } from '@fortawesome/vue-fontawesome'

// will get error with @vue/compiler-sfc
const props = defineProps<InstanceType<typeof FontAwesomeIcon>['$props']>()

// missing FontAwesomeIconProps in export
// const props = defineProps<FontAwesomeIconProps>()
</script>

<style lang="scss" scoped></style>

if I use InstanceType<typeof FontAwesomeIcon>['$props'], then error occur like this picture.

截圖 2024-04-02 下午2 14 15





We except to use the code like this `const props = defineProps()`.

@lctech-LeoLioa
Copy link

Also interested in this

@jasonlundien
Copy link
Member

I do not believe this is needed any longer with the Release of 3.0.8.

These props are now being exported:

export { FontAwesomeIcon, FontAwesomeIconProps, FontAwesomeLayers, FontAwesomeLayersProps, FontAwesomeLayersText, FontAwesomeLayersTextProps }

If you feel otherwise, just let me know.

Thank you,
-jason

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

Successfully merging this pull request may close these issues.

None yet

3 participants