diff --git a/packages/component-type-helpers/index.d.ts b/packages/component-type-helpers/index.d.ts index 0ce45dcf0d..033e56ce51 100644 --- a/packages/component-type-helpers/index.d.ts +++ b/packages/component-type-helpers/index.d.ts @@ -14,12 +14,12 @@ export type ComponentProps = export type ComponentSlots = T extends new () => { $slots: infer S; } ? NonNullable : - T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? 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: { emit: infer E; }, ...args: any) => any ? NonNullable : + T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E; }, ...args: any) => any ? NonNullable : {}; export type ComponentExposed = diff --git a/packages/component-type-helpers/index.js b/packages/component-type-helpers/index.js index 49123c5d9c..90132268f3 100644 --- a/packages/component-type-helpers/index.js +++ b/packages/component-type-helpers/index.js @@ -13,12 +13,12 @@ export type ComponentProps = export type ComponentSlots = T extends new () => { $slots: infer S; } ? NonNullable : - T extends (props: any, ctx: { slots: infer S; }, ...args: any) => any ? 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: { emit: infer E; }, ...args: any) => any ? NonNullable : + T extends (props: any, ctx: { slots: any; attrs: any; emit: infer E; }, ...args: any) => any ? NonNullable : {}; export type ComponentExposed =