@@ -46,22 +46,20 @@ export interface IFiber<P extends Attributes = any> {
46
46
parentNode : HTMLElementEx
47
47
node : HTMLElementEx
48
48
kids ?: any
49
- dirty :boolean ,
49
+ dirty : boolean
50
50
parent ?: IFiber < P >
51
51
sibling ?: IFiber < P >
52
52
child ?: IFiber < P >
53
- done ?: ( ) => void
54
- ref : IRef
53
+ ref ?: Ref < HTMLElement | undefined >
55
54
hooks : IHook
56
- oldProps : P
57
55
action : any
58
56
props : P
59
57
lane : number
60
58
isComp : boolean
61
59
}
62
60
63
61
export type HTMLElementEx = HTMLElement & { last : IFiber | null }
64
- export type IEffect = [ Function ?, number ?, Function ? ]
62
+ export type IEffect = [ Function ?, number ?, cleanup ?: Function ]
65
63
66
64
export type FreText = string | number
67
65
export type FreNode =
@@ -72,11 +70,10 @@ export type FreNode =
72
70
| null
73
71
| undefined
74
72
export type SetStateAction < S > = S | ( ( prevState : S ) => S )
75
- export type Dispatch < A > = ( value : A , resume ?: boolean ) => void
73
+ export type Dispatch < A > = ( value : A ) => void
76
74
export type Reducer < S , A > = ( prevState : S , action : A ) => S
77
- export type IVoidCb = ( ) => void
78
- export type EffectCallback = ( ) => void | ( IVoidCb | undefined )
79
- export type DependencyList = Array < any >
75
+ export type EffectCallback = ( ) => void | ( ( ) => void | undefined )
76
+ export type DependencyList = ReadonlyArray < unknown >
80
77
81
78
export interface PropsWithChildren {
82
79
children ?: FreNode
@@ -86,7 +83,6 @@ export type ITaskCallback = (() => ITaskCallback) | null
86
83
87
84
export interface ITask {
88
85
callback ?: ITaskCallback
89
- fiber : IFiber
90
86
}
91
87
92
88
export type DOM = HTMLElement | SVGElement
0 commit comments