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

This commit is contained in:
c0dedance 2022-10-18 23:06:35 +08:00 committed by GitHub
parent 3b1fd5767a
commit e54015e267
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

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;

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());

View File

@ -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);