@@ -150,7 +150,71 @@ export type ComponentPublicInstanceConstructor<
150150 new ( ...args : any [ ] ) : T
151151}
152152
153+ /**
154+ * @deprecated This is no longer used internally, but exported and relied on by
155+ * existing library types generated by vue-tsc.
156+ */
153157export type CreateComponentPublicInstance <
158+ P = { } ,
159+ B = { } ,
160+ D = { } ,
161+ C extends ComputedOptions = { } ,
162+ M extends MethodOptions = { } ,
163+ Mixin extends ComponentOptionsMixin = ComponentOptionsMixin ,
164+ Extends extends ComponentOptionsMixin = ComponentOptionsMixin ,
165+ E extends EmitsOptions = { } ,
166+ PublicProps = P ,
167+ Defaults = { } ,
168+ MakeDefaultsOptional extends boolean = false ,
169+ I extends ComponentInjectOptions = { } ,
170+ S extends SlotsType = { } ,
171+ PublicMixin = IntersectionMixin < Mixin > & IntersectionMixin < Extends > ,
172+ PublicP = UnwrapMixinsType < PublicMixin , 'P' > & EnsureNonVoid < P > ,
173+ PublicB = UnwrapMixinsType < PublicMixin , 'B' > & EnsureNonVoid < B > ,
174+ PublicD = UnwrapMixinsType < PublicMixin , 'D' > & EnsureNonVoid < D > ,
175+ PublicC extends ComputedOptions = UnwrapMixinsType < PublicMixin , 'C' > &
176+ EnsureNonVoid < C > ,
177+ PublicM extends MethodOptions = UnwrapMixinsType < PublicMixin , 'M' > &
178+ EnsureNonVoid < M > ,
179+ PublicDefaults = UnwrapMixinsType < PublicMixin , 'Defaults' > &
180+ EnsureNonVoid < Defaults > ,
181+ > = ComponentPublicInstance <
182+ PublicP ,
183+ PublicB ,
184+ PublicD ,
185+ PublicC ,
186+ PublicM ,
187+ E ,
188+ PublicProps ,
189+ PublicDefaults ,
190+ MakeDefaultsOptional ,
191+ ComponentOptionsBase <
192+ P ,
193+ B ,
194+ D ,
195+ C ,
196+ M ,
197+ Mixin ,
198+ Extends ,
199+ E ,
200+ string ,
201+ Defaults ,
202+ { } ,
203+ string ,
204+ S
205+ > ,
206+ I ,
207+ S
208+ >
209+
210+ /**
211+ * This is the same as `CreateComponentPublicInstance` but adds local components,
212+ * global directives, exposed, and provide inference.
213+ * It changes the arguments order so that we don't need to repeat mixin
214+ * inference everywhere internally, but it has to be a new type to avoid
215+ * breaking types that relies on previous arguments order (#10842)
216+ */
217+ export type CreateComponentPublicInstanceWithMixins <
154218 P = { } ,
155219 B = { } ,
156220 D = { } ,
@@ -167,6 +231,8 @@ export type CreateComponentPublicInstance<
167231 LC extends Record < string , Component > = { } ,
168232 Directives extends Record < string , Directive > = { } ,
169233 Exposed extends string = string ,
234+ Provide extends ComponentProvideOptions = ComponentProvideOptions ,
235+ // mixin inference
170236 PublicMixin = IntersectionMixin < Mixin > & IntersectionMixin < Extends > ,
171237 PublicP = UnwrapMixinsType < PublicMixin , 'P' > & EnsureNonVoid < P > ,
172238 PublicB = UnwrapMixinsType < PublicMixin , 'B' > & EnsureNonVoid < B > ,
@@ -177,7 +243,6 @@ export type CreateComponentPublicInstance<
177243 EnsureNonVoid < M > ,
178244 PublicDefaults = UnwrapMixinsType < PublicMixin , 'Defaults' > &
179245 EnsureNonVoid < Defaults > ,
180- Provide extends ComponentProvideOptions = ComponentProvideOptions ,
181246> = ComponentPublicInstance <
182247 PublicP ,
183248 PublicB ,
0 commit comments