* Removes the specified listener from the listener array for the event. * off() will remove, at most, one instance of a listener from the listener array. If any single * listener has been added multiple times to the listener array for the specified event, then * off() must be called multipl
(event, listener)
| 81608 | } |
| 81609 | /** |
| 81610 | * Removes the specified listener from the listener array for the event. |
| 81611 | * off() will remove, at most, one instance of a listener from the listener array. If any single |
| 81612 | * listener has been added multiple times to the listener array for the specified event, then |
| 81613 | * off() must be called multiple times to remove each instance. |
| 81614 | * @returns this ChatCompletionStream, so that calls can be chained |
| 81615 | */ |
| 81616 | off(event, listener) { |
| 81617 | const listeners = __classPrivateFieldGet9(this, _EventStream_listeners, "f")[event]; |
| 81618 | if (!listeners) |
| 81619 | return this; |
| 81620 | const index = listeners.findIndex((l3) => l3.listener === listener); |
| 81621 | if (index >= 0) |
no test coverage detected