mirror of
https://github.com/zebrajr/react.git
synced 2025-12-06 00:20:04 +01:00
Refactor: fill in the flow missing type (#25496)
This commit is contained in:
parent
3b1fd5767a
commit
e54015e267
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user