Skip to content

Commit

Permalink
fix: fixed type ComponentEmit
Browse files Browse the repository at this point in the history
  • Loading branch information
hunterliu1003 committed Dec 15, 2023
1 parent 53e1812 commit fec4f47
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/vue-final-modal/src/Component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ 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> :
{}

// 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> :
// {}
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> :
{}

// export type ComponentExposed<T> =
// T extends new () => infer E ? E :
Expand Down

0 comments on commit fec4f47

Please sign in to comment.