We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6c3475a + e2c3bc5 commit e70644dCopy full SHA for e70644d
src/schedule.ts
@@ -33,11 +33,11 @@ const flush = (): void => {
33
deadline = getTime() + threshold
34
let job = peek(queue)
35
while (job && !shouldYield()) {
36
- const { callback } = job as any
+ const { callback } = job
37
job.callback = null
38
const next = callback()
39
if (next) {
40
- job.callback = next as any
+ job.callback = next
41
} else {
42
queue.shift()
43
}
src/type.ts
@@ -82,7 +82,7 @@ export interface PropsWithChildren {
82
children?: FreNode
83
84
85
-export type ITaskCallback = ((time: boolean) => boolean) | null
+export type ITaskCallback = (() => ITaskCallback) | null
86
87
export interface ITask {
88
callback?: ITaskCallback
0 commit comments