refactor: add types for emits
This commit is contained in:
parent
a0b2062137
commit
07bd197c29
2 changed files with 10 additions and 2 deletions
|
@ -9,8 +9,12 @@ interface Props {
|
|||
value: number
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: number[]): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
const checked = computed({
|
||||
get() {
|
||||
|
|
|
@ -7,8 +7,12 @@ interface Props {
|
|||
name?: string
|
||||
}
|
||||
|
||||
interface Emits {
|
||||
(e: 'update:modelValue', value: boolean): void
|
||||
}
|
||||
|
||||
const props = defineProps<Props>()
|
||||
const emit = defineEmits(['update:modelValue'])
|
||||
const emit = defineEmits<Emits>()
|
||||
|
||||
const checked = computed({
|
||||
get() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue