import { createHostRootFiber } from './ReactFiber' ; import { createLaneMap , NoLane , NoLanes , NoTimestamp } from './ReactFiberLane' ; import { FiberRoot } from './ReactInternalTypes' ; import { RootTag } from './ReactRootTags' ; import { initializeUpdateQueue } from './ReactUpdateQueue' ; class FiberRootNode { callbackNode = null ; pendingLanes = NoLanes ; expiredLanes = NoLanes ; finishedWork = null ; current = null as any ; eventTimes = createLaneMap ( NoLanes ) ; expirationTimes = createLaneMap ( NoTimestamp ) ; callbackPriority = NoLane ; constructor ( public containerInfo , public tag ) { } } param containerInfo param tag returns export const createFiberRoot = ( containerInfo , tag ) : FiberRoot => { const root = new FiberRootNode ( containerInfo , tag ) ; const uninitializedFiber = createHostRootFiber ( tag ) ; root . current = uninitializedFiber ; uninitializedFiber . stateNode = root ; initializeUpdateQueue ( uninitializedFiber ) ; return root ; } ;