Collect all events from a batch callback into an array
( events: Array<DeltaEvent<T, any>>, )
| 68 | |
| 69 | /** Collect all events from a batch callback into an array */ |
| 70 | function collectBatchEvents<T extends object = Record<string, unknown>>( |
| 71 | events: Array<DeltaEvent<T, any>>, |
| 72 | ) { |
| 73 | return (batch: Array<DeltaEvent<T, any>>) => { |
| 74 | events.push(...batch) |
| 75 | } |
| 76 | } |
| 77 | |
| 78 | // --------------------------------------------------------------------------- |
| 79 | // Tests |
no outgoing calls
no test coverage detected
searching dependent graphs…