@@ -134,6 +134,9 @@ export type DefineSetupFnComponent<
134134 S
135135>
136136
137+ type ToResolvedProps < Props , Emits extends EmitsOptions > = Readonly < Props > &
138+ Readonly < EmitsToProps < Emits > >
139+
137140// defineComponent is a utility that is primarily used for type inference
138141// when declaring components. Type inference is provided in the component
139142// options (provided as the argument). The returned value has artificial types
@@ -210,8 +213,6 @@ export function defineComponent<
210213 : ExtractPropTypes < RuntimePropsOptions >
211214 : { [ key in RuntimePropsKeys ] ?: any }
212215 : TypeProps ,
213- ResolvedProps = Readonly < InferredProps > &
214- Readonly < EmitsToProps < ResolvedEmits > > ,
215216 TypeRefs extends Record < string , unknown > = { } ,
216217> (
217218 options : {
@@ -229,7 +230,7 @@ export function defineComponent<
229230 */
230231 __typeRefs ?: TypeRefs
231232 } & ComponentOptionsBase <
232- ResolvedProps ,
233+ ToResolvedProps < InferredProps , ResolvedEmits > ,
233234 SetupBindings ,
234235 Data ,
235236 Computed ,
@@ -249,7 +250,7 @@ export function defineComponent<
249250 > &
250251 ThisType <
251252 CreateComponentPublicInstanceWithMixins <
252- ResolvedProps ,
253+ ToResolvedProps < InferredProps , ResolvedEmits > ,
253254 SetupBindings ,
254255 Data ,
255256 Computed ,
@@ -278,7 +279,7 @@ export function defineComponent<
278279 ResolvedEmits ,
279280 RuntimeEmitsKeys ,
280281 PublicProps ,
281- ResolvedProps ,
282+ ToResolvedProps < InferredProps , ResolvedEmits > ,
282283 ExtractDefaultPropTypes < RuntimePropsOptions > ,
283284 Slots ,
284285 LocalComponents ,
0 commit comments