mirror of
https://github.com/ArthurDanjou/ui.git
synced 2026-01-18 14:08:06 +01:00
feat(Modal): open programmatically (#78)
Co-authored-by: Benjamin Canac <canacb1@gmail.com>
This commit is contained in:
14
src/runtime/types/component.d.ts
vendored
Normal file
14
src/runtime/types/component.d.ts
vendored
Normal 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>
|
||||
Reference in New Issue
Block a user