@vue/runtime-core 3.2.32 → 3.2.34
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/runtime-core.cjs.js +3349 -3258
- package/dist/runtime-core.cjs.prod.js +1171 -1108
- package/dist/runtime-core.d.ts +42 -28
- package/dist/runtime-core.esm-bundler.js +3916 -3821
- package/package.json +3 -3
package/dist/runtime-core.d.ts
CHANGED
|
@@ -165,18 +165,18 @@ export declare interface BaseTransitionProps<HostElement = RendererElement> {
|
|
|
165
165
|
mode?: 'in-out' | 'out-in' | 'default';
|
|
166
166
|
appear?: boolean;
|
|
167
167
|
persisted?: boolean;
|
|
168
|
-
onBeforeEnter?: (el: HostElement) => void
|
|
169
|
-
onEnter?: (el: HostElement, done: () => void) => void
|
|
170
|
-
onAfterEnter?: (el: HostElement) => void
|
|
171
|
-
onEnterCancelled?: (el: HostElement) => void
|
|
172
|
-
onBeforeLeave?: (el: HostElement) => void
|
|
173
|
-
onLeave?: (el: HostElement, done: () => void) => void
|
|
174
|
-
onAfterLeave?: (el: HostElement) => void
|
|
175
|
-
onLeaveCancelled?: (el: HostElement) => void
|
|
176
|
-
onBeforeAppear?: (el: HostElement) => void
|
|
177
|
-
onAppear?: (el: HostElement, done: () => void) => void
|
|
178
|
-
onAfterAppear?: (el: HostElement) => void
|
|
179
|
-
onAppearCancelled?: (el: HostElement) => void
|
|
168
|
+
onBeforeEnter?: Hook<(el: HostElement) => void>;
|
|
169
|
+
onEnter?: Hook<(el: HostElement, done: () => void) => void>;
|
|
170
|
+
onAfterEnter?: Hook<(el: HostElement) => void>;
|
|
171
|
+
onEnterCancelled?: Hook<(el: HostElement) => void>;
|
|
172
|
+
onBeforeLeave?: Hook<(el: HostElement) => void>;
|
|
173
|
+
onLeave?: Hook<(el: HostElement, done: () => void) => void>;
|
|
174
|
+
onAfterLeave?: Hook<(el: HostElement) => void>;
|
|
175
|
+
onLeaveCancelled?: Hook<(el: HostElement) => void>;
|
|
176
|
+
onBeforeAppear?: Hook<(el: HostElement) => void>;
|
|
177
|
+
onAppear?: Hook<(el: HostElement, done: () => void) => void>;
|
|
178
|
+
onAfterAppear?: Hook<(el: HostElement) => void>;
|
|
179
|
+
onAppearCancelled?: Hook<(el: HostElement) => void>;
|
|
180
180
|
}
|
|
181
181
|
|
|
182
182
|
declare const enum BooleanFlags {
|
|
@@ -409,6 +409,14 @@ export declare interface ComponentInternalInstance {
|
|
|
409
409
|
/* Excluded from this release type: da */
|
|
410
410
|
/* Excluded from this release type: ec */
|
|
411
411
|
/* Excluded from this release type: sp */
|
|
412
|
+
/**
|
|
413
|
+
* For caching bound $forceUpdate on public proxy access
|
|
414
|
+
*/
|
|
415
|
+
f?: () => void;
|
|
416
|
+
/**
|
|
417
|
+
* For caching bound $nextTick on public proxy access
|
|
418
|
+
*/
|
|
419
|
+
n?: () => Promise<void>;
|
|
412
420
|
}
|
|
413
421
|
|
|
414
422
|
declare interface ComponentInternalOptions {
|
|
@@ -431,7 +439,7 @@ export declare type ComponentObjectPropsOptions<P = Data> = {
|
|
|
431
439
|
|
|
432
440
|
export declare type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E> & ThisType<CreateComponentPublicInstance<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>>>;
|
|
433
441
|
|
|
434
|
-
export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}> extends LegacyOptions<Props, D, C, M, Mixin, Extends>, ComponentInternalOptions, ComponentCustomOptions {
|
|
442
|
+
export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, Provide extends ComponentProvideOptions = ComponentProvideOptions> extends LegacyOptions<Props, D, C, M, Mixin, Extends, Provide>, ComponentInternalOptions, ComponentCustomOptions {
|
|
435
443
|
setup?: (this: void, props: Readonly<LooseRequired<Props & UnionToIntersection<ExtractOptionProp<Mixin>> & UnionToIntersection<ExtractOptionProp<Extends>>>>, ctx: SetupContext<E>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
|
|
436
444
|
name?: string;
|
|
437
445
|
template?: string | object;
|
|
@@ -456,22 +464,24 @@ export declare interface ComponentOptionsBase<Props, RawBindings, D, C extends C
|
|
|
456
464
|
|
|
457
465
|
export declare type ComponentOptionsMixin = ComponentOptionsBase<any, any, any, any, any, any, any, any, any, any>;
|
|
458
466
|
|
|
459
|
-
export declare type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<{
|
|
467
|
+
export declare type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Readonly<{
|
|
460
468
|
[key in PropNames]?: any;
|
|
461
|
-
}> & EmitsToProps<E>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & {
|
|
469
|
+
}> & EmitsToProps<E>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, Provide> & {
|
|
462
470
|
props: PropNames[];
|
|
463
471
|
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E>>;
|
|
464
472
|
|
|
465
|
-
export declare type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & {
|
|
473
|
+
export declare type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Props = Readonly<ExtractPropTypes<PropsOptions>> & EmitsToProps<E>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, Provide> & {
|
|
466
474
|
props: PropsOptions & ThisType<void>;
|
|
467
475
|
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false>>;
|
|
468
476
|
|
|
469
|
-
export declare type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}> & {
|
|
477
|
+
export declare type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, Provide> & {
|
|
470
478
|
props?: undefined;
|
|
471
479
|
} & ThisType<CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E>>;
|
|
472
480
|
|
|
473
481
|
export declare type ComponentPropsOptions<P = Data> = ComponentObjectPropsOptions<P> | string[];
|
|
474
482
|
|
|
483
|
+
export declare type ComponentProvideOptions = ObjectProvideOptions | Function;
|
|
484
|
+
|
|
475
485
|
export declare type ComponentPublicInstance<P = {}, // props type extracted from props option
|
|
476
486
|
B = {}, // raw bindings returned from setup()
|
|
477
487
|
D = {}, // return from data()
|
|
@@ -552,7 +562,7 @@ declare function createCompatVue(createApp: CreateAppFunction<Element>, createSi
|
|
|
552
562
|
|
|
553
563
|
declare function createComponentInstance(vnode: VNode, parent: ComponentInternalInstance | null, suspense: SuspenseBoundary | null): ComponentInternalInstance;
|
|
554
564
|
|
|
555
|
-
export declare type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults
|
|
565
|
+
export declare type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>, Provide extends ComponentProvideOptions = ComponentProvideOptions> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, Provide>>;
|
|
556
566
|
|
|
557
567
|
/**
|
|
558
568
|
* @private
|
|
@@ -643,17 +653,17 @@ export declare function defineAsyncComponent<T extends Component = {
|
|
|
643
653
|
new (): ComponentPublicInstance;
|
|
644
654
|
}>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T;
|
|
645
655
|
|
|
646
|
-
export declare type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>), Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>> = ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true> & Props> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults> & PP;
|
|
656
|
+
export declare type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, RawOptions extends {} = {}, PP = PublicProps, Props = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>), Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>> = RawOptions & ComponentPublicInstanceConstructor<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, true> & Props> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, Provide> & PP;
|
|
647
657
|
|
|
648
658
|
export declare function defineComponent<Props, RawBindings = object>(setup: (props: Readonly<Props>, ctx: SetupContext) => RawBindings | RenderFunction): DefineComponent<Props, RawBindings>;
|
|
649
659
|
|
|
650
|
-
export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string>(options: ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE>;
|
|
660
|
+
export declare function defineComponent<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Options extends ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide> = ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>>(options: Options & ComponentOptionsWithoutProps<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>): DefineComponent<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide, Options>;
|
|
651
661
|
|
|
652
|
-
export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<Readonly<{
|
|
662
|
+
export declare function defineComponent<PropNames extends string, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Options extends ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide> = ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>>(options: Options & ComponentOptionsWithArrayProps<PropNames, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>): DefineComponent<Readonly<{
|
|
653
663
|
[key in PropNames]?: any;
|
|
654
|
-
}>, RawBindings, D, C, M, Mixin, Extends, E, EE>;
|
|
664
|
+
}>, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide, Options>;
|
|
655
665
|
|
|
656
|
-
export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string>(options: ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE>;
|
|
666
|
+
export declare function defineComponent<PropsOptions extends Readonly<ComponentPropsOptions>, RawBindings, D, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = Record<string, any>, EE extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, Options extends ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide> = ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>>(options: Options & ComponentOptionsWithObjectProps<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide>): DefineComponent<PropsOptions, RawBindings, D, C, M, Mixin, Extends, E, EE, Provide, Options>;
|
|
657
667
|
|
|
658
668
|
/**
|
|
659
669
|
* Vue `<script setup>` compiler macro for declaring a component's emitted
|
|
@@ -860,7 +870,7 @@ declare type ExtractComputedReturns<T extends any> = {
|
|
|
860
870
|
};
|
|
861
871
|
|
|
862
872
|
export declare type ExtractDefaultPropTypes<O> = O extends object ? {
|
|
863
|
-
[K in DefaultKeys<O
|
|
873
|
+
[K in keyof Pick<O, DefaultKeys<O>>]: InferPropType<O[K]>;
|
|
864
874
|
} : {};
|
|
865
875
|
|
|
866
876
|
declare type ExtractMixin<T> = {
|
|
@@ -956,6 +966,8 @@ export declare interface HMRRuntime {
|
|
|
956
966
|
reload: typeof reload;
|
|
957
967
|
}
|
|
958
968
|
|
|
969
|
+
declare type Hook<T = () => void> = T | T[];
|
|
970
|
+
|
|
959
971
|
declare function hydrateSuspense(node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, isSVG: boolean, slotScopeIds: string[] | null, optimized: boolean, rendererInternals: RendererInternals, hydrateNode: (node: Node, vnode: VNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
960
972
|
|
|
961
973
|
declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector } }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
|
|
@@ -1061,14 +1073,14 @@ export declare type LegacyConfig = {
|
|
|
1061
1073
|
productionTip?: boolean;
|
|
1062
1074
|
};
|
|
1063
1075
|
|
|
1064
|
-
declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin> {
|
|
1076
|
+
declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, Provide extends ComponentProvideOptions = ComponentProvideOptions> {
|
|
1065
1077
|
compatConfig?: CompatConfig;
|
|
1066
1078
|
[key: string]: any;
|
|
1067
1079
|
data?: (this: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>, vm: CreateComponentPublicInstance<Props, {}, {}, {}, MethodOptions, Mixin, Extends>) => D;
|
|
1068
1080
|
computed?: C;
|
|
1069
1081
|
methods?: M;
|
|
1070
1082
|
watch?: ComponentWatchOptions;
|
|
1071
|
-
provide?:
|
|
1083
|
+
provide?: Provide;
|
|
1072
1084
|
inject?: ComponentInjectOptions;
|
|
1073
1085
|
filters?: Record<string, Function>;
|
|
1074
1086
|
mixins?: Mixin[];
|
|
@@ -1100,8 +1112,8 @@ declare interface LegacyOptions<Props, D, C extends ComputedOptions, M extends M
|
|
|
1100
1112
|
*
|
|
1101
1113
|
* type-only, used to assist Mixin's type inference,
|
|
1102
1114
|
* typescript will try to simplify the inferred `Mixin` type,
|
|
1103
|
-
* with the `
|
|
1104
|
-
* because the `
|
|
1115
|
+
* with the `__differentiator`, typescript won't be able to combine different mixins,
|
|
1116
|
+
* because the `__differentiator` will be different
|
|
1105
1117
|
*/
|
|
1106
1118
|
__differentiator?: keyof D | keyof C | keyof M;
|
|
1107
1119
|
}
|
|
@@ -1244,6 +1256,8 @@ declare type ObjectInjectOptions = Record<string | symbol, string | symbol | {
|
|
|
1244
1256
|
default?: unknown;
|
|
1245
1257
|
}>;
|
|
1246
1258
|
|
|
1259
|
+
declare type ObjectProvideOptions = Record<string | symbol, unknown>;
|
|
1260
|
+
|
|
1247
1261
|
declare type ObjectWatchOptionItem = {
|
|
1248
1262
|
handler: WatchCallback | string;
|
|
1249
1263
|
} & WatchOptions;
|