sebinside / StreamAwesome

Stream Awesome - The Stream Deck Icon Generator using Font Awesome
MIT License
52 stars 15 forks source link

refactor: implement prop types #203

Closed MichaHuhn closed 5 months ago

MichaHuhn commented 5 months ago

Implement prop types by using the type-based declaration.

Convert the runtime declaration:

defineProps({
  icon: {
    type: Object as () => CustomIcon
  }
})

to the type-based declaration:

defineProps<{
  icon: CustomIcon
}>()

The type-based declaration provides type-safety and autocompletion when using props. The prop types work exactly like the emit types (#199).