Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fdb67d1 commit 467e85fCopy full SHA for 467e85f
docs/rules/define-emits-declaration.md
@@ -25,6 +25,12 @@ const emit = defineEmits<{
25
(e: 'update', value: string): void
26
}>()
27
28
+/* ✗ BAD */
29
+const emit = defineEmits({
30
+ change: (id) => typeof id == 'number',
31
+ update: (value) => typeof value == 'string'
32
+})
33
+
34
/* ✗ BAD */
35
const emit = defineEmits(['change', 'update'])
36
</script>
@@ -53,6 +59,12 @@ const emit = defineEmits<{
53
59
54
60
55
61
62
+/* ✓ GOOD */
63
64
65
66
67
56
68
/* ✓ GOOD */
57
69
58
70
0 commit comments