MCPcopy Create free account
hub / github.com/GetStream/stream-js / on

Method on

src/client.ts:410–412  ·  view source on GitHub ↗

* Support for global event callbacks * This is useful for generic error and loading handling * @method on * @memberof StreamClient.prototype * @param {string} event - Name of the event * @param {function} callback - Function that is called when the event fires * @example * clien

(event: string, callback: HandlerCallback)

Source from the content-addressed store, hash-verified

408 * client.on('response', callback);
409 */
410 on(event: string, callback: HandlerCallback) {
411 this.handlers[event] = callback;
412 }
413
414 /**
415 * Remove one or more event handlers

Callers 3

client_test.jsFile · 0.80
test.tsFile · 0.80
client_test.jsFile · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected