()
| 56 | } |
| 57 | |
| 58 | async flush(): Promise<void> { |
| 59 | const allPending = Array.from(this.pending.values()).map((pending) => pending.promise); |
| 60 | |
| 61 | for (const [req, {resolve}] of this.pending) { |
| 62 | resolve(this.prepareResponse(req)); |
| 63 | } |
| 64 | this.pending.clear(); |
| 65 | |
| 66 | await Promise.all(allPending); |
| 67 | await flushMicrotasks(); |
| 68 | } |
| 69 | |
| 70 | protected abstract prepareResponse(request: T): R; |
| 71 | } |
nothing calls this directly
no test coverage detected
searching dependent graphs…