(queue: any, iterator: any)
| 77 | ): void |
| 78 | export function flush<T>(queue: Set<T>, iterator: (value: T) => void): void |
| 79 | export function flush(queue: any, iterator: any) { |
| 80 | if (queue.size) { |
| 81 | const items = Array.from(queue) |
| 82 | queue.clear() |
| 83 | each(items, iterator) |
| 84 | } |
| 85 | } |
| 86 | |
| 87 | /** Call every function in the queue with the same arguments. */ |
| 88 | export const flushCalls = <T extends AnyFn>( |
no test coverage detected
searching dependent graphs…