diff --git a/packages/react-reconciler/src/ReactFiberBeginWork.js b/packages/react-reconciler/src/ReactFiberBeginWork.js index fb71d18581..9e8077b7a2 100644 --- a/packages/react-reconciler/src/ReactFiberBeginWork.js +++ b/packages/react-reconciler/src/ReactFiberBeginWork.js @@ -146,7 +146,11 @@ export function reconcileChildren( } } -function updateForwardRef(current, workInProgress, renderExpirationTime) { +function updateForwardRef( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { const render = workInProgress.type.render; const nextProps = workInProgress.pendingProps; const ref = workInProgress.ref; @@ -184,7 +188,11 @@ function updateForwardRef(current, workInProgress, renderExpirationTime) { return workInProgress.child; } -function updateFragment(current, workInProgress, renderExpirationTime) { +function updateFragment( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { const nextChildren = workInProgress.pendingProps; reconcileChildren( current, @@ -196,7 +204,11 @@ function updateFragment(current, workInProgress, renderExpirationTime) { return workInProgress.child; } -function updateMode(current, workInProgress, renderExpirationTime) { +function updateMode( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { const nextChildren = workInProgress.pendingProps.children; reconcileChildren( current, @@ -208,7 +220,11 @@ function updateMode(current, workInProgress, renderExpirationTime) { return workInProgress.child; } -function updateProfiler(current, workInProgress, renderExpirationTime) { +function updateProfiler( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { if (enableProfilerTimer) { workInProgress.effectTag |= Update; } @@ -768,7 +784,11 @@ function updatePlaceholderComponent( } } -function updatePortalComponent(current, workInProgress, renderExpirationTime) { +function updatePortalComponent( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo); const nextChildren = workInProgress.pendingProps; if (current === null) { @@ -796,7 +816,11 @@ function updatePortalComponent(current, workInProgress, renderExpirationTime) { return workInProgress.child; } -function updateContextProvider(current, workInProgress, renderExpirationTime) { +function updateContextProvider( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { const providerType: ReactProviderType = workInProgress.type; const context: ReactContext = providerType._context; @@ -859,7 +883,11 @@ function updateContextProvider(current, workInProgress, renderExpirationTime) { return workInProgress.child; } -function updateContextConsumer(current, workInProgress, renderExpirationTime) { +function updateContextConsumer( + current: Fiber | null, + workInProgress: Fiber, + renderExpirationTime: ExpirationTime, +) { const context: ReactContext = workInProgress.type; const newProps = workInProgress.pendingProps; const render = newProps.children;