@vue/runtime-core
Advanced tools
Comparing version 3.0.0-rc.5 to 3.0.0-rc.6
@@ -51,4 +51,4 @@ import { camelize } from '@vue/shared'; | ||
mixin(mixin: ComponentOptions): this; | ||
component(name: string): PublicAPIComponent | undefined; | ||
component(name: string, component: PublicAPIComponent): this; | ||
component(name: string): Component | undefined; | ||
component(name: string, component: Component): this; | ||
directive(name: string): Directive | undefined; | ||
@@ -59,3 +59,3 @@ directive(name: string, directive: Directive): this; | ||
provide<T>(key: InjectionKey<T> | string, value: T): this; | ||
_component: Component; | ||
_component: ConcreteComponent; | ||
_props: Data | null; | ||
@@ -80,3 +80,3 @@ _container: HostElement | null; | ||
mixins: ComponentOptions[]; | ||
components: Record<string, PublicAPIComponent>; | ||
components: Record<string, Component>; | ||
directives: Record<string, Directive>; | ||
@@ -98,4 +98,4 @@ provides: Record<string | symbol, any>; | ||
loader: AsyncComponentLoader<T>; | ||
loadingComponent?: PublicAPIComponent; | ||
errorComponent?: PublicAPIComponent; | ||
loadingComponent?: Component; | ||
errorComponent?: Component; | ||
delay?: number; | ||
@@ -107,3 +107,3 @@ timeout?: number; | ||
declare type AsyncComponentResolveResult<T = PublicAPIComponent> = T | { | ||
declare type AsyncComponentResolveResult<T = Component> = T | { | ||
default: T; | ||
@@ -160,3 +160,7 @@ }; | ||
export declare type Component = ComponentOptions | FunctionalComponent<any>; | ||
/** | ||
* A type used in public APIs where a component type is expected. | ||
* The constructor type is an artificial type returned by defineComponent(). | ||
*/ | ||
export declare type Component = ConcreteComponent | ComponentPublicInstanceConstructor; | ||
@@ -227,3 +231,3 @@ /** | ||
uid: number; | ||
type: Component; | ||
type: ConcreteComponent; | ||
parent: ComponentInternalInstance | null; | ||
@@ -250,3 +254,3 @@ root: ComponentInternalInstance; | ||
/* Excluded from this release type: renderCache */ | ||
proxy: ComponentPublicInstance | null; | ||
/* Excluded from this release type: proxy */ | ||
/* Excluded from this release type: withProxy */ | ||
@@ -307,6 +311,6 @@ /* Excluded from this release type: ctx */ | ||
render?: Function; | ||
components?: Record<string, PublicAPIComponent>; | ||
components?: Record<string, Component>; | ||
directives?: Record<string, Directive>; | ||
inheritAttrs?: boolean; | ||
emits?: E | EE[]; | ||
emits?: (E | EE[]) & ThisType<void>; | ||
/* Excluded from this release type: ssrRender */ | ||
@@ -330,3 +334,3 @@ /* Excluded from this release type: __asyncLoader */ | ||
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>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE> & { | ||
props: PropsOptions; | ||
props: PropsOptions & ThisType<void>; | ||
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E>>; | ||
@@ -360,3 +364,6 @@ | ||
declare type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance> = { | ||
declare type ComponentPublicInstanceConstructor<T extends ComponentPublicInstance = ComponentPublicInstance<any>> = { | ||
__isFragment?: never; | ||
__isTeleport?: never; | ||
__isSuspense?: never; | ||
new (): T; | ||
@@ -376,2 +383,10 @@ }; | ||
/** | ||
* Concrete component type matches its actual value: it's either an options | ||
* object, or a function. Use this where the code expects to work with actual | ||
* values, e.g. checking if its a function or not. This is mostly for internal | ||
* implementation code. | ||
*/ | ||
export declare type ConcreteComponent = ComponentOptions | FunctionalComponent<any, any>; | ||
declare interface Constructor<P = any> { | ||
@@ -386,3 +401,3 @@ __isFragment?: never; | ||
export declare type CreateAppFunction<HostElement> = (rootComponent: PublicAPIComponent, rootProps?: Data | null) => App<HostElement>; | ||
export declare type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>; | ||
@@ -455,5 +470,5 @@ /** | ||
declare type DefaultFactory<T> = () => T | null | undefined; | ||
declare type DefaultFactory<T> = (props: Data) => T | null | undefined; | ||
export declare function defineAsyncComponent<T extends PublicAPIComponent = { | ||
export declare function defineAsyncComponent<T extends Component = { | ||
new (): ComponentPublicInstance; | ||
@@ -586,3 +601,3 @@ }>(source: AsyncComponentLoader<T> | AsyncComponentOptions<T>): T; | ||
export declare function h<Options extends ComponentOptions | FunctionalComponent<{}>>(type: NotDefinedComponent<Options>, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; | ||
export declare function h<T extends ComponentOptions | FunctionalComponent<{}>>(type: T, props?: RawProps | null, children?: RawChildren | RawSlots): VNode; | ||
@@ -615,3 +630,3 @@ export declare function h(type: Constructor, children?: RawChildren): VNode; | ||
type: BooleanConstructor; | ||
} ? boolean : T extends Prop<infer V> ? V : T; | ||
} ? boolean : T extends Prop<infer V, infer D> ? (unknown extends V ? D : V) : T; | ||
@@ -645,4 +660,7 @@ export declare function inject<T>(key: InjectionKey<T> | string): T | undefined; | ||
export declare const KeepAlive: new () => { | ||
$props: VNodeProps & KeepAliveProps; | ||
export declare const KeepAlive: { | ||
new (): { | ||
$props: VNodeProps & KeepAliveProps; | ||
}; | ||
__isKeepAlive: true; | ||
}; | ||
@@ -751,4 +769,2 @@ | ||
declare type NotDefinedComponent<T extends Component> = T extends Constructor ? never : T; | ||
declare const NULL_DYNAMIC_COMPONENT: unique symbol; | ||
@@ -843,3 +859,3 @@ | ||
export declare type Prop<T> = PropOptions<T> | PropType<T>; | ||
export declare type Prop<T, D = T> = PropOptions<T, D> | PropType<T>; | ||
@@ -858,6 +874,6 @@ declare type PropConstructor<T = any> = { | ||
declare interface PropOptions<T = any> { | ||
declare interface PropOptions<T = any, D = T> { | ||
type?: PropType<T> | true | null; | ||
required?: boolean; | ||
default?: T | DefaultFactory<T> | null | undefined; | ||
default?: D | DefaultFactory<D> | null | undefined | object; | ||
validator?(value: unknown): boolean; | ||
@@ -871,6 +887,2 @@ } | ||
declare type PublicAPIComponent = Component | { | ||
new (...args: any[]): CreateComponentPublicInstance<any, any, any, any, any>; | ||
}; | ||
/** | ||
@@ -881,3 +893,3 @@ * @private | ||
export declare function queuePostFlushCb(cb: Function | Function[]): void; | ||
export declare function queuePostFlushCb(cb: SchedulerCbs): void; | ||
@@ -1008,3 +1020,3 @@ declare type RawChildren = string | number | boolean | VNode | VNodeArrayChildren | (() => any); | ||
*/ | ||
export declare function resolveComponent(name: string): Component | string | undefined; | ||
export declare function resolveComponent(name: string): ConcreteComponent | string | undefined; | ||
@@ -1027,2 +1039,8 @@ /** | ||
declare type SchedulerCb = Function & { | ||
id?: number; | ||
}; | ||
declare type SchedulerCbs = SchedulerCb | SchedulerCb[]; | ||
/** | ||
@@ -1279,3 +1297,3 @@ * Block tracking sometimes needs to be disabled, for example during the | ||
declare type WatchOptionItem = string | WatchCallback | { | ||
handler: WatchCallback; | ||
handler: WatchCallback | string; | ||
} & WatchOptions; | ||
@@ -1282,0 +1300,0 @@ |
{ | ||
"name": "@vue/runtime-core", | ||
"version": "3.0.0-rc.5", | ||
"version": "3.0.0-rc.6", | ||
"description": "@vue/runtime-core", | ||
@@ -34,5 +34,5 @@ "main": "index.js", | ||
"dependencies": { | ||
"@vue/shared": "3.0.0-rc.5", | ||
"@vue/reactivity": "3.0.0-rc.5" | ||
"@vue/shared": "3.0.0-rc.6", | ||
"@vue/reactivity": "3.0.0-rc.6" | ||
} | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
755996
18824
168
+ Added@vue/reactivity@3.0.0-rc.6(transitive)
+ Added@vue/shared@3.0.0-rc.6(transitive)
- Removed@vue/reactivity@3.0.0-rc.5(transitive)
- Removed@vue/shared@3.0.0-rc.5(transitive)
Updated@vue/reactivity@3.0.0-rc.6
Updated@vue/shared@3.0.0-rc.6