|
@@ -79,7 +79,7 @@ export interface FunctionalComponent<P = {}> {
|
|
|
|
|
|
|
|
type LifecycleHook = Function[] | null
|
|
type LifecycleHook = Function[] | null
|
|
|
|
|
|
|
|
-interface LifecycleHooks {
|
|
|
|
|
|
|
+export interface LifecycleHooks {
|
|
|
bm: LifecycleHook // beforeMount
|
|
bm: LifecycleHook // beforeMount
|
|
|
m: LifecycleHook // mounted
|
|
m: LifecycleHook // mounted
|
|
|
bu: LifecycleHook // beforeUpdate
|
|
bu: LifecycleHook // beforeUpdate
|
|
@@ -110,8 +110,9 @@ export type ComponentInstance<P = Data, S = Data> = {
|
|
|
next: VNode | null
|
|
next: VNode | null
|
|
|
subTree: VNode
|
|
subTree: VNode
|
|
|
update: ReactiveEffect
|
|
update: ReactiveEffect
|
|
|
- effects: ReactiveEffect[] | null
|
|
|
|
|
render: RenderFunction<P, S> | null
|
|
render: RenderFunction<P, S> | null
|
|
|
|
|
+ effects: ReactiveEffect[] | null
|
|
|
|
|
+ provides: Data | null
|
|
|
|
|
|
|
|
// the rest are only for stateful components
|
|
// the rest are only for stateful components
|
|
|
data: S
|
|
data: S
|
|
@@ -193,6 +194,7 @@ export function createComponentInstance(
|
|
|
rtc: null,
|
|
rtc: null,
|
|
|
ec: null,
|
|
ec: null,
|
|
|
effects: null,
|
|
effects: null,
|
|
|
|
|
+ provides: null,
|
|
|
|
|
|
|
|
// public properties
|
|
// public properties
|
|
|
data: EMPTY_OBJ,
|
|
data: EMPTY_OBJ,
|