feat(Modal): open programmatically (#78)

Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
Neil Richter
2024-05-28 17:14:13 +02:00
committed by GitHub
parent cf38e7ed78
commit 2bf99e1eb4
8 changed files with 146 additions and 1 deletions

14
src/runtime/types/component.d.ts vendored Normal file
View File

@@ -0,0 +1,14 @@
export type ComponentProps<T> =
T extends new () => { $props: infer P } ? NonNullable<P> :
T extends (props: infer P, ...args: any) => any ? P :
Record<string, never>
export type ComponentSlots<T> =
T extends new () => { $slots: infer S } ? NonNullable<S> :
T extends (props: any, ctx: { slots: infer S, attrs: any, emit: any }, ...args: any) => any ? NonNullable<S> :
Record<string, never>
export type ComponentEmit<T> =
T extends new () => { $emit: infer E } ? NonNullable<E> :
T extends (props: any, ctx: { slots: any, attrs: any, emit: infer E }, ...args: any) => any ? NonNullable<E> :
Record<string, never>