Skip to content

Commit b4ac0e6

Browse files
committed
chore(dx): fix defineProps jsdoc + update defineEmits jsdoc example
1 parent 2744a09 commit b4ac0e6

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

packages/runtime-core/src/apiSetupHelpers.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,9 @@ const warnRuntimeUsage = (method: string) =>
6666
* foo?: string
6767
* bar: number
6868
* }>()
69+
* ```
6970
*
7071
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
71-
* ```
7272
*
7373
* This is only usable inside `<script setup>`, is compiled away in the
7474
* output and should **not** be actually called at runtime.
@@ -116,8 +116,9 @@ type BooleanKey<T, K extends keyof T = keyof T> = K extends any
116116
* Example type-based declaration:
117117
* ```ts
118118
* const emit = defineEmits<{
119-
* (event: 'change'): void
120-
* (event: 'update', id: number): void
119+
* // <eventName>: <expected arguments>
120+
* change: []
121+
* update: [value: string] // named tuple syntax
121122
* }>()
122123
*
123124
* emit('change')

0 commit comments

Comments
 (0)