@@ -28,7 +28,6 @@ import {
2828 normalizePropsOptions
2929} from './componentProps'
3030import {
31- Slots ,
3231 initSlots ,
3332 InternalSlots ,
3433 SlotsType ,
@@ -126,12 +125,13 @@ export interface ComponentInternalOptions {
126125export interface FunctionalComponent <
127126 P = { } ,
128127 E extends EmitsOptions = { } ,
129- S extends SlotsType = { }
128+ S extends Record < string , any [ ] > = { }
130129> extends ComponentInternalOptions {
131130 // use of any here is intentional so it can be a valid JSX Element constructor
132- ( props : P , ctx : Omit < SetupContext < E , S > , 'expose' > ) : any
131+ ( props : P , ctx : Omit < SetupContext < E , SlotsType < S > > , 'expose' > ) : any
133132 props ?: ComponentPropsOptions < P >
134133 emits ?: E | ( keyof E ) [ ]
134+ slots ?: SlotsType < S >
135135 inheritAttrs ?: boolean
136136 displayName ?: string
137137 compatConfig ?: CompatConfig
@@ -156,7 +156,7 @@ export type ConcreteComponent<
156156 M extends MethodOptions = MethodOptions
157157> =
158158 | ComponentOptions < Props , RawBindings , D , C , M >
159- | FunctionalComponent < Props , any >
159+ | FunctionalComponent < Props , any , any >
160160
161161/**
162162 * A type used in public APIs where a component type is expected.
@@ -183,7 +183,7 @@ export type SetupContext<
183183> = E extends any
184184 ? {
185185 attrs : Data
186- slots : [ keyof S ] extends [ never ] ? Slots : TypedSlots < S >
186+ slots : TypedSlots < S >
187187 emit : EmitFn < E >
188188 expose : ( exposed ?: Record < string , any > ) => void
189189 }
0 commit comments