(data: T)
| 5 | resolve?: (data: T) => void; |
| 6 | |
| 7 | push(data: T) { |
| 8 | if (this.resolve) { |
| 9 | this.resolve(data); |
| 10 | this.resolve = undefined; |
| 11 | } else { |
| 12 | this.list.push(data); |
| 13 | } |
| 14 | } |
| 15 | |
| 16 | pop(): Promise<T | undefined> { |
| 17 | return new Promise((resolve) => { |
no outgoing calls