Skip to content

Commit e70644d

Browse files
authored
Merge pull request #375 from cyfaboop/master
fix types
2 parents 6c3475a + e2c3bc5 commit e70644d

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/schedule.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,11 +33,11 @@ const flush = (): void => {
3333
deadline = getTime() + threshold
3434
let job = peek(queue)
3535
while (job && !shouldYield()) {
36-
const { callback } = job as any
36+
const { callback } = job
3737
job.callback = null
3838
const next = callback()
3939
if (next) {
40-
job.callback = next as any
40+
job.callback = next
4141
} else {
4242
queue.shift()
4343
}

src/type.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ export interface PropsWithChildren {
8282
children?: FreNode
8383
}
8484

85-
export type ITaskCallback = ((time: boolean) => boolean) | null
85+
export type ITaskCallback = (() => ITaskCallback) | null
8686

8787
export interface ITask {
8888
callback?: ITaskCallback

0 commit comments

Comments
 (0)