-
-
Notifications
You must be signed in to change notification settings - Fork 688
Closed
Description
Please describe what the rule should do:
Forces the TypeScript only way of defining emits.
What category should the rule belong to?
[x] Enforces code style (layout)
[ ] Warns about a potential error (problem)
[ ] Suggests an alternate way of doing something (suggestion)
[ ] Other (please specify:)
Provide 2-3 code examples that this rule should warn about:
GOOD
const emit = defineEmits<{
/**
* The click event
*/
(e: 'click', event: PointerEvent): void
}>()
BAD
const emit = defineEmits({
/**
* The click event
*/
click: (event: PointerEvent) => !!event
})
BAD
const emit = defineEmits([
/**
* The click event
*/
'click'
])