| 2 | import type { CallbackFn } from '@shared/app' |
| 3 | |
| 4 | interface TaskItem { |
| 5 | item: (...args: any) => Promise<any> |
| 6 | param: any |
| 7 | state: 'wait' | 'running' |
| 8 | } |
| 9 | class TaskQueue { |
| 10 | private callback: WeakMap<TaskItem, { resolve: CallbackFn; reject: CallbackFn }> = new WeakMap() |
| 11 | #queue: Array<TaskItem> = [] |
nothing calls this directly
no outgoing calls
no test coverage detected