nl_tokens: Exported FiberRoot type includes all properties To avoid requiring potentially error - prone : any casts throughout the project . Profiling properties are only safe to access in profiling builds ( when enableSchedulerTracing is true ) . The types are defined separately within this file to ensure they stay in sync . ( We don t have to use an inline : any cast when enableSchedulerTracing is disabled . ) / * eslint - enable no - use - before - define
pl_tokens: function createFiberRoot ( containerInfo , isAsync , hydrate ) { // Cyclic construction. This cheats the type system right now because // stateNode is any. var uninitializedFiber = createHostRootFiber ( isAsync ) ; var root = void 0 ; if ( enableSchedulerTracing ) { root = { <mask> : uninitializedFiber , containerInfo : containerInfo , pendingChildren : null , earliestPendingTime : NoWork , latestPendingTime : NoWork , earliestSuspendedTime : NoWork , latestSuspendedTime : NoWork , latestPingedTime : NoWork , didError : false , pendingCommitExpirationTime : NoWork , finishedWork : null , timeoutHandle : noTimeout , context : null , pendingContext : null , hydrate : hydrate , nextExpirationTimeToWorkOn : NoWork , expirationTime : NoWork , firstBatch : null , nextScheduledRoot : null , interactionThreadID : tracing . unstable_getThreadID ( ) , memoizedInteractions : new Set ( ) , pendingInteractionMap : new Map ( ) } ; } else { root = { current : uninitializedFiber , containerInfo : containerInfo , pendingChildren : null , earliestPendingTime : NoWork , latestPendingTime : NoWork , earliestSuspendedTime : NoWork , latestSuspendedTime : NoWork , latestPingedTime : NoWork , didError : false , pendingCommitExpirationTime : NoWork , finishedWork : null , timeoutHandle : noTimeout , context : null , pendingContext : null , hydrate : hydrate , nextExpirationTimeToWorkOn : NoWork , expirationTime : NoWork , firstBatch : null , nextScheduledRoot : null } ; } uninitializedFiber . stateNode = root ; // The reason for the way the Flow types are structured in this file, // Is to avoid needing :any casts everywhere interaction tracing fields are used. // Unfortunately that requires an :any cast for non-interaction tracing capable builds. // $FlowFixMe Remove this :any cast and replace it with something better. return root ; }