Skip to content

Commit

Permalink
chore(dx): fix defineProps jsdoc + update defineEmits jsdoc example
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Dec 7, 2023
1 parent 2744a09 commit b4ac0e6
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/runtime-core/src/apiSetupHelpers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,9 @@ const warnRuntimeUsage = (method: string) =>
* foo?: string
* bar: number
* }>()
* ```
*
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineprops-defineemits}
* ```
*
* This is only usable inside `<script setup>`, is compiled away in the
* output and should **not** be actually called at runtime.
Expand Down Expand Up @@ -116,8 +116,9 @@ type BooleanKey<T, K extends keyof T = keyof T> = K extends any
* Example type-based declaration:
* ```ts
* const emit = defineEmits<{
* (event: 'change'): void
* (event: 'update', id: number): void
* // <eventName>: <expected arguments>
* change: []
* update: [value: string] // named tuple syntax
* }>()
*
* emit('change')
Expand Down

0 comments on commit b4ac0e6

Please sign in to comment.