Skip to content

Commit e9964e1

Browse files
authored
fix define-prps-declaration docs (#1977)
1 parent 4d0ffae commit e9964e1

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

docs/rules/define-props-declaration.md

+7-6
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,15 @@ const props = defineProps({
4848

4949
```vue
5050
<script setup lang="ts">
51+
/* ✓ GOOD */
52+
const props = defineProps({
53+
kind: { type: String }
54+
})
55+
5156
/* ✗ BAD */
52-
const emit = defineEmits<{
53-
(e: 'change', id: number): void
54-
(e: 'update', value: string): void
57+
const props = defineProps<{
58+
kind: string
5559
}>()
56-
57-
/* ✓ GOOD */
58-
const emit = defineEmits(['change', 'update'])
5960
</script>
6061
```
6162

0 commit comments

Comments
 (0)