feat(useToast): proxy emits

This commit is contained in:
Benjamin Canac
2025-02-05 15:44:15 +01:00
parent abd2be1aa6
commit 089185fbe4
2 changed files with 10 additions and 3 deletions

View File

@@ -38,3 +38,9 @@ export type StringOrVNode =
| string
| VNode
| (() => VNode)
export type EmitsToProps<T> = {
[K in keyof T as `on${Capitalize<string & K>}`]: T[K] extends [...args: infer Args]
? (...args: Args) => void
: never
}