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

Open
wants to merge 1 commit into
base: 3.x
Choose a base branch
from

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

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

2 participants