(event: T)
| 25 | } |
| 26 | |
| 27 | public enqueue(event: T): void { |
| 28 | const enqueued = { |
| 29 | value: event, |
| 30 | next: null |
| 31 | }; |
| 32 | |
| 33 | if (this._current) { |
| 34 | this._last!.next = enqueued; |
| 35 | this._last = enqueued; |
| 36 | return; |
| 37 | } |
| 38 | |
| 39 | this._current = enqueued; |
| 40 | this._last = enqueued; |
| 41 | |
| 42 | if (this._active) { |
| 43 | this.flush(); |
| 44 | } |
| 45 | } |
| 46 | |
| 47 | private flush() { |
| 48 | while (this._current) { |
no test coverage detected