Collect events from an effect into an array
( events: Array<DeltaEvent<T, any>>, )
| 59 | |
| 60 | /** Collect events from an effect into an array */ |
| 61 | function collectEvents<T extends object = Record<string, unknown>>( |
| 62 | events: Array<DeltaEvent<T, any>>, |
| 63 | ) { |
| 64 | return (event: DeltaEvent<T, any>) => { |
| 65 | events.push(event) |
| 66 | } |
| 67 | } |
| 68 | |
| 69 | /** Collect all events from a batch callback into an array */ |
| 70 | function collectBatchEvents<T extends object = Record<string, unknown>>( |
no outgoing calls
no test coverage detected
searching dependent graphs…