From fec4f4786f568d313d35728c2dea1960a0ee6338 Mon Sep 17 00:00:00 2001 From: Hunter Date: Fri, 15 Dec 2023 12:27:41 +0800 Subject: [PATCH] fix: fixed type ComponentEmit --- packages/vue-final-modal/src/Component.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/vue-final-modal/src/Component.ts b/packages/vue-final-modal/src/Component.ts index 45265e8f..8b1543c4 100644 --- a/packages/vue-final-modal/src/Component.ts +++ b/packages/vue-final-modal/src/Component.ts @@ -18,10 +18,10 @@ T extends new () => { $slots: infer S } ? NonNullable : T extends (props: any, ctx: { slots: infer S; attrs: any; emit: any }, ...args: any) => any ? NonNullable : {} -// export type ComponentEmit = -// T extends new () => { $emit: infer E } ? NonNullable : -// T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E }, ...args: any) => any ? NonNullable : -// {} +export type ComponentEmit = +T extends new () => { $emit: infer E } ? NonNullable : + T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E }, ...args: any) => any ? NonNullable : + {} // export type ComponentExposed = // T extends new () => infer E ? E :