1
1
diff --git a/dist/runtime-core.d.ts b/dist/runtime-core.d.ts
2
- index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4cfd98d76 100644
2
+ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..539385c2754e1b5882ac6c3bc272372f2b43018c 100644
3
3
--- a/dist/runtime-core.d.ts
4
4
+++ b/dist/runtime-core.d.ts
5
5
@@ -1,7 +1,7 @@
@@ -252,7 +252,7 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
252
252
253
253
export declare const ssrContextKey: unique symbol;
254
254
export declare const useSSRContext: <T = Record<string, any>>() => T | undefined;
255
- @@ -1437,6 +1481,128 @@ interface DevtoolsHook {
255
+ @@ -1437,6 +1481,138 @@ interface DevtoolsHook {
256
256
export declare let devtools: DevtoolsHook;
257
257
export declare function setDevtoolsHook(hook: DevtoolsHook, target: any): void;
258
258
@@ -280,9 +280,9 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
280
280
+ slots: infer S;
281
281
+ } ? S : T extends {
282
282
+ slots: infer S extends Slots;
283
- + } ? S : T extends (props: any, opts: {
284
- + slots: infer S ;
285
- + }) => any ? S : T extends {
283
+ + } ? S : T extends (props: any, opts: infer Ctx extends {
284
+ + slots: any ;
285
+ + }) => any ? Ctx['slots'] : T extends (props: any, opts: SetupContext<unknown, infer S>) => any ? S : T extends {
286
286
+ new (): {
287
287
+ $slots: infer S extends Slots;
288
288
+ };
@@ -315,7 +315,7 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
315
315
+ */
316
316
+ export type ResolvePropsFromOptions<T> = T extends {
317
317
+ props: infer P;
318
- + } ? [P] extends [Array<infer PA>] ? [PA] extends [string] ? ObjectToComponentProps<Record<PA, any>> : never : P : T extends (props: infer P) => any ? ObjectToComponentProps<P> : T extends {
318
+ + } ? [P] extends [Array<infer PA>] ? [PA] extends [string] ? ObjectToComponentProps<Record<PA, any>> : never : P : T extends (props: infer P, ctx?: any ) => any ? ObjectToComponentProps<P> : T extends {
319
319
+ new (): {
320
320
+ $props: infer P;
321
321
+ };
@@ -327,7 +327,9 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
327
327
+ export type ComponentPropsWithDefaultOptional<T> = (ResolvePropsFromOptions<T> extends infer Props ? ExtractDefaultPropTypes<Props> extends infer Defaults ? Partial<Defaults> & Omit<ExtractPropTypes<Props>, keyof Defaults> : {} : {}) & (T extends {
328
328
+ props: any;
329
329
+ } ? ResolveMixinProps<Omit<T, 'props'>> : T extends ((...args: any) => any) | (abstract new (...args: any) => any) ? {} : ResolveMixinProps<T>);
330
+ + type FixMixinResolve<T> = [T] extends [never] ? {} : T;
330
331
+ type ResolveMixinProps<T> = UnwrapMixinsType<ResolveMixin<T>, 'P'>;
332
+ + type ResolveMixinData<T> = FixMixinResolve<UnwrapMixinsType<ResolveMixin<T>, 'D'>>;
331
333
+ /**
332
334
+ * Returns the emits as props
333
335
+ */
@@ -351,16 +353,24 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
351
353
+ $props: infer P;
352
354
+ } ? P : (ExtractComponentProp<T> extends infer P ? P extends Readonly<Array<infer V>> ? [V] extends [string] ? Readonly<{
353
355
+ [key in V]?: any;
354
- + }> : {} : P extends ComponentPropsOptions ? ExtractPropTypes<P> : P : {}) & (T extends {
355
- + props: any;
356
- + } ? ResolveMixinProps<Omit<T, 'props'>> : ResolveMixinProps<T>);
356
+ + }> : {} : P extends ComponentPropsOptions ? ExtractPropTypes<P> : P : {}) & ResolveMixinProps<T>;
357
+ + export type RetrieveSlotArgument<T extends any[] = any[]> = (...args: T) => any;
357
358
+ /**
358
359
+ * Returns runtime type for `slots`
359
360
+ */
360
- + export type ComponentSlots<T> = ExtractComponentSlots<T> extends infer S ? {
361
- + [K in keyof S]: S[K] extends Slot<infer V> ? (arg: V) => VNode : never;
362
- + } : {};
361
+ + export type ComponentSlots<T> = ExtractComponentSlots<T> extends infer S ? S extends SlotsType<infer SS> ? Record<string, any> extends SS ? {
362
+ + [K in keyof S & string]: S[K] extends RetrieveSlotArgument<infer A> ? (...arg: A) => VNode[] : (arg: S[K]) => VNode[];
363
+ + } : UnwrapSlotsType<S> : S extends Record<string, any> ? {
364
+ + [K in keyof S & string]: S[K] extends RetrieveSlotArgument<infer A> ? (...arg: A) => VNode[] : (arg: S[K]) => VNode[];
365
+ + } : {} : {};
363
366
+ export type ComponentEmits<T> = ExtractComponentEmits<T> extends infer E ? {} extends E ? () => void : EmitFn<E> : () => void;
367
+ + export type ComponentData<T> = (T extends {
368
+ + data: () => infer D;
369
+ + } ? D : T extends {
370
+ + setup(...args: any[]): infer S;
371
+ + } ? S extends Record<string, any> ? S : {} : T extends new () => {
372
+ + data: () => infer D;
373
+ + } ? D : {}) & ResolveMixinData<T>;
364
374
+ /**
365
375
+ * Retrieves the component public instance
366
376
+ *
@@ -381,7 +391,7 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
381
391
type HMRComponent = ComponentOptions | ClassComponent;
382
392
export interface HMRRuntime {
383
393
createRecord: typeof createRecord;
384
- @@ -1568,12 +1734 ,12 @@ interface LegacyPublicProperties {
394
+ @@ -1568,12 +1744 ,12 @@ interface LegacyPublicProperties {
385
395
*/
386
396
export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
387
397
configureCompat: typeof configureCompat;
@@ -396,7 +406,7 @@ index 5d4c1fb2c6859f7982ea7bb55f65a5c613d91038..a4377187d514a0663c3a35c073e794b4
396
406
component(name: string): Component | undefined;
397
407
component(name: string, component: Component): CompatVue;
398
408
directive(name: string): Directive | undefined;
399
- @@ -1582,7 +1748 ,7 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
409
+ @@ -1582,7 +1758 ,7 @@ export type CompatVue = Pick<App, 'version' | 'component' | 'directive'> & {
400
410
/**
401
411
* @deprecated Vue 3 no longer supports extending constructors.
402
412
*/
0 commit comments