@samitouri / QOS-React-2 / commits / e54015e267

Refactor: fill in the flow missing type (#25496)

c0dedance committed Oct 18, 2022 at 23:06 UTC e54015e267698a23ee85ddf192769d716ed04742
3 files changed +3 -3
packages/scheduler/src/SchedulerProfiling.js
+1 -1
@@ -31,7 +31,7 @@ const TaskYieldEvent = 6;
31 const SchedulerSuspendEvent = 7;
32 const SchedulerResumeEvent = 8;
33
34 -function logEvent(entries) {
34 +function logEvent(entries: Array<number | PriorityLevel>) {
35 if (eventLog !== null) {
36 const offset = eventLogIndex;
37 eventLogIndex += entries.length;
packages/scheduler/src/forks/Scheduler.js
+1 -1
@@ -637,7 +637,7 @@ function requestHostCallback(callback) {
637 }
638 }
639
640 -function requestHostTimeout(callback, ms) {
640 +function requestHostTimeout(callback, ms: number) {
641 // $FlowFixMe[not-a-function] nullable value
642 taskTimeoutID = localSetTimeout(() => {
643 callback(getCurrentTime());
packages/scheduler/src/forks/SchedulerMock.js
+1 -1
@@ -191,7 +191,7 @@ function flushWork(hasTimeRemaining: boolean, initialTime: number) {
191 }
192 }
193
194 -function workLoop(hasTimeRemaining, initialTime: number): boolean {
194 +function workLoop(hasTimeRemaining: boolean, initialTime: number): boolean {
195 let currentTime = initialTime;
196 advanceTimers(currentTime);
197 currentTask = peek(taskQueue);