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

This commit is contained in:
c0dedance
2022-10-18 23:06:35 +08:00
committed by Rick Hanlon
parent 4e165aa8bd
commit 491ca7c01d
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -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;
+1 -1
View File
@@ -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());
@@ -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);