@@ -134,6 +134,9 @@ export type DefineSetupFnComponent<
134
134
S
135
135
>
136
136
137
+ type ToResolvedProps < Props , Emits extends EmitsOptions > = Readonly < Props > &
138
+ Readonly < EmitsToProps < Emits > >
139
+
137
140
// defineComponent is a utility that is primarily used for type inference
138
141
// when declaring components. Type inference is provided in the component
139
142
// options (provided as the argument). The returned value has artificial types
@@ -210,8 +213,6 @@ export function defineComponent<
210
213
: ExtractPropTypes < RuntimePropsOptions >
211
214
: { [ key in RuntimePropsKeys ] ?: any }
212
215
: TypeProps ,
213
- ResolvedProps = Readonly < InferredProps > &
214
- Readonly < EmitsToProps < ResolvedEmits > > ,
215
216
TypeRefs extends Record < string , unknown > = { } ,
216
217
> (
217
218
options : {
@@ -229,7 +230,7 @@ export function defineComponent<
229
230
*/
230
231
__typeRefs ?: TypeRefs
231
232
} & ComponentOptionsBase <
232
- ResolvedProps ,
233
+ ToResolvedProps < InferredProps , ResolvedEmits > ,
233
234
SetupBindings ,
234
235
Data ,
235
236
Computed ,
@@ -249,7 +250,7 @@ export function defineComponent<
249
250
> &
250
251
ThisType <
251
252
CreateComponentPublicInstanceWithMixins <
252
- ResolvedProps ,
253
+ ToResolvedProps < InferredProps , ResolvedEmits > ,
253
254
SetupBindings ,
254
255
Data ,
255
256
Computed ,
@@ -278,7 +279,7 @@ export function defineComponent<
278
279
ResolvedEmits ,
279
280
RuntimeEmitsKeys ,
280
281
PublicProps ,
281
- ResolvedProps ,
282
+ ToResolvedProps < InferredProps , ResolvedEmits > ,
282
283
ExtractDefaultPropTypes < RuntimePropsOptions > ,
283
284
Slots ,
284
285
LocalComponents ,
0 commit comments