Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit e9964e1

Browse filesBrowse files
authored
fix define-prps-declaration docs (#1977)
1 parent 4d0ffae commit e9964e1
Copy full SHA for e9964e1

File tree

Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-6
lines changed

‎docs/rules/define-props-declaration.md

Copy file name to clipboardExpand all lines: docs/rules/define-props-declaration.md
+7-6Lines changed: 7 additions & 6 deletions
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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.