Skip to content

Commit

Permalink
Refactor: fill in the flow missing type
Browse files Browse the repository at this point in the history
  • Loading branch information
c0dedance committed Oct 17, 2022
1 parent 9fb581c commit 46cf7cf
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion packages/scheduler/src/SchedulerProfiling.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const TaskYieldEvent = 6;
const SchedulerSuspendEvent = 7;
const SchedulerResumeEvent = 8;

function logEvent(entries) {
function logEvent(entries: Array<number | PriorityLevel>) {
if (eventLog !== null) {
const offset = eventLogIndex;
eventLogIndex += entries.length;
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/forks/Scheduler.js
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ function requestHostCallback(callback) {
}
}

function requestHostTimeout(callback, ms) {
function requestHostTimeout(callback, ms: number) {
// $FlowFixMe[not-a-function] nullable value
taskTimeoutID = localSetTimeout(() => {
callback(getCurrentTime());
Expand Down
2 changes: 1 addition & 1 deletion packages/scheduler/src/forks/SchedulerMock.js
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ function flushWork(hasTimeRemaining: boolean, initialTime: number) {
}
}

function workLoop(hasTimeRemaining, initialTime: number): boolean {
function workLoop(hasTimeRemaining: boolean, initialTime: number): boolean {
let currentTime = initialTime;
advanceTimers(currentTime);
currentTask = peek(taskQueue);
Expand Down

0 comments on commit 46cf7cf

Please sign in to comment.