@samitouri / QOS-React / commits / 5cff212072

add flowtype to function signature (#13285)

ryota-murakami committed Aug 3, 2018 at 13:23 UTC 5cff212072beb58b00e6475d1cd2d57413f73e2c
1 file changed +35 -7
packages/react-reconciler/src/ReactFiberBeginWork.js
+35 -7
@@ -146,7 +146,11 @@ export function reconcileChildren(
146 }
147 }
148
149 -function updateForwardRef(current, workInProgress, renderExpirationTime) {
149 +function updateForwardRef(
150 + current: Fiber | null,
151 + workInProgress: Fiber,
152 + renderExpirationTime: ExpirationTime,
153 +) {
154 const render = workInProgress.type.render;
155 const nextProps = workInProgress.pendingProps;
156 const ref = workInProgress.ref;
@@ -184,7 +188,11 @@ function updateForwardRef(current, workInProgress, renderExpirationTime) {
188 return workInProgress.child;
189 }
190
187 -function updateFragment(current, workInProgress, renderExpirationTime) {
191 +function updateFragment(
192 + current: Fiber | null,
193 + workInProgress: Fiber,
194 + renderExpirationTime: ExpirationTime,
195 +) {
196 const nextChildren = workInProgress.pendingProps;
197 reconcileChildren(
198 current,
@@ -196,7 +204,11 @@ function updateFragment(current, workInProgress, renderExpirationTime) {
204 return workInProgress.child;
205 }
206
199 -function updateMode(current, workInProgress, renderExpirationTime) {
207 +function updateMode(
208 + current: Fiber | null,
209 + workInProgress: Fiber,
210 + renderExpirationTime: ExpirationTime,
211 +) {
212 const nextChildren = workInProgress.pendingProps.children;
213 reconcileChildren(
214 current,
@@ -208,7 +220,11 @@ function updateMode(current, workInProgress, renderExpirationTime) {
220 return workInProgress.child;
221 }
222
211 -function updateProfiler(current, workInProgress, renderExpirationTime) {
223 +function updateProfiler(
224 + current: Fiber | null,
225 + workInProgress: Fiber,
226 + renderExpirationTime: ExpirationTime,
227 +) {
228 if (enableProfilerTimer) {
229 workInProgress.effectTag |= Update;
230 }
@@ -768,7 +784,11 @@ function updatePlaceholderComponent(
784 }
785 }
786
771 -function updatePortalComponent(current, workInProgress, renderExpirationTime) {
787 +function updatePortalComponent(
788 + current: Fiber | null,
789 + workInProgress: Fiber,
790 + renderExpirationTime: ExpirationTime,
791 +) {
792 pushHostContainer(workInProgress, workInProgress.stateNode.containerInfo);
793 const nextChildren = workInProgress.pendingProps;
794 if (current === null) {
@@ -796,7 +816,11 @@ function updatePortalComponent(current, workInProgress, renderExpirationTime) {
816 return workInProgress.child;
817 }
818
799 -function updateContextProvider(current, workInProgress, renderExpirationTime) {
819 +function updateContextProvider(
820 + current: Fiber | null,
821 + workInProgress: Fiber,
822 + renderExpirationTime: ExpirationTime,
823 +) {
824 const providerType: ReactProviderType<any> = workInProgress.type;
825 const context: ReactContext<any> = providerType._context;
826
@@ -859,7 +883,11 @@ function updateContextProvider(current, workInProgress, renderExpirationTime) {
883 return workInProgress.child;
884 }
885
862 -function updateContextConsumer(current, workInProgress, renderExpirationTime) {
886 +function updateContextConsumer(
887 + current: Fiber | null,
888 + workInProgress: Fiber,
889 + renderExpirationTime: ExpirationTime,
890 +) {
891 const context: ReactContext<any> = workInProgress.type;
892 const newProps = workInProgress.pendingProps;
893 const render = newProps.children;