mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-21 15:31:46 +01:00
feat(useToast): proxy emits
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user