@@ -22,10 +22,14 @@ export interface MethodOptions {
2222 [ key : string ] : Function
2323}
2424
25- export type SetupFunction < Props , RawBindings = { } > = (
25+ export type SetupFunction <
26+ Props ,
27+ RawBindings = { } ,
28+ Emits extends EmitsOptions = { }
29+ > = (
2630 this : void ,
2731 props : Readonly < Props > ,
28- ctx : SetupContext
32+ ctx : SetupContext < Emits >
2933) => RawBindings | ( ( ) => VNode | null ) | void
3034
3135interface ComponentOptionsBase <
@@ -70,7 +74,7 @@ export type ComponentOptionsWithProps<
7074> = ComponentOptionsBase < Props , D , C , M > & {
7175 props ?: PropsOptions
7276 emits ?: Emits & ThisType < void >
73- setup ?: SetupFunction < Props , RawBindings >
77+ setup ?: SetupFunction < Props , RawBindings , Emits >
7478} & ThisType <
7579 ComponentRenderProxy < Props , RawBindings , D , C , M , Mixin , Extends , Emits >
7680 >
@@ -88,7 +92,7 @@ export type ComponentOptionsWithArrayProps<
8892> = ComponentOptionsBase < Props , D , C , M > & {
8993 props ?: PropNames [ ]
9094 emits ?: Emits & ThisType < void >
91- setup ?: SetupFunction < Props , RawBindings >
95+ setup ?: SetupFunction < Props , RawBindings , Emits >
9296} & ThisType <
9397 ComponentRenderProxy < Props , RawBindings , D , C , M , Mixin , Extends , Emits >
9498 >
@@ -105,7 +109,7 @@ export type ComponentOptionsWithoutProps<
105109> = ComponentOptionsBase < Props , D , C , M > & {
106110 props ?: undefined
107111 emits ?: Emits & ThisType < void >
108- setup ?: SetupFunction < Props , RawBindings >
112+ setup ?: SetupFunction < Props , RawBindings , Emits >
109113} & ThisType <
110114 ComponentRenderProxy < Props , RawBindings , D , C , M , Mixin , Extends , Emits >
111115 >
0 commit comments