@@ -28,7 +28,6 @@ import {
28
28
normalizePropsOptions
29
29
} from './componentProps'
30
30
import {
31
- Slots ,
32
31
initSlots ,
33
32
InternalSlots ,
34
33
SlotsType ,
@@ -126,12 +125,13 @@ export interface ComponentInternalOptions {
126
125
export interface FunctionalComponent <
127
126
P = { } ,
128
127
E extends EmitsOptions = { } ,
129
- S extends SlotsType = { }
128
+ S extends Record < string , any [ ] > = { }
130
129
> extends ComponentInternalOptions {
131
130
// 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
133
132
props ?: ComponentPropsOptions < P >
134
133
emits ?: E | ( keyof E ) [ ]
134
+ slots ?: SlotsType < S >
135
135
inheritAttrs ?: boolean
136
136
displayName ?: string
137
137
compatConfig ?: CompatConfig
@@ -156,7 +156,7 @@ export type ConcreteComponent<
156
156
M extends MethodOptions = MethodOptions
157
157
> =
158
158
| ComponentOptions < Props , RawBindings , D , C , M >
159
- | FunctionalComponent < Props , any >
159
+ | FunctionalComponent < Props , any , any >
160
160
161
161
/**
162
162
* A type used in public APIs where a component type is expected.
@@ -183,7 +183,7 @@ export type SetupContext<
183
183
> = E extends any
184
184
? {
185
185
attrs : Data
186
- slots : [ keyof S ] extends [ never ] ? Slots : TypedSlots < S >
186
+ slots : TypedSlots < S >
187
187
emit : EmitFn < E >
188
188
expose : ( exposed ?: Record < string , any > ) => void
189
189
}
0 commit comments