(eventName: string)
| 83 | } |
| 84 | |
| 85 | reset(eventName: string) { |
| 86 | if (eventName == null) { |
| 87 | Object.keys(this._events).forEach(eventName => { |
| 88 | this._events[eventName] = []; |
| 89 | }); |
| 90 | |
| 91 | return; |
| 92 | } |
| 93 | |
| 94 | if (this._events[eventName] == null) { |
| 95 | throw new TypeError(`invalid event name "${eventName}" specified for reset`); |
| 96 | } |
| 97 | |
| 98 | this._events[eventName] = []; |
| 99 | } |
| 100 | |
| 101 | waitForEventImpl( |
| 102 | collector: this, |