MCPcopy
hub / github.com/tc39/proposal-observable / subscribe

Method subscribe

src/Observable.js:246–259  ·  view source on GitHub ↗
(observer, ...args)

Source from the content-addressed store, hash-verified

244 }
245
246 subscribe(observer, ...args) {
247 if (typeof observer === "function") {
248 observer = {
249 next: observer,
250 error: args[0],
251 complete: args[1]
252 };
253 }
254 else if (typeof observer !== "object") {
255 observer = {};
256 }
257
258 return new Subscription(observer, this._subscriber);
259 }
260
261 [Symbol.observable]() { return this }
262

Callers 15

"Method lookup"Function · 0.95
"Cleanup functions"Function · 0.95
"Method lookup"Function · 0.95
"Cleanup functions"Function · 0.95
"Method lookup"Function · 0.95
"Cleanup functions"Function · 0.95
"Argument type"Function · 0.95
"Start method"Function · 0.95
"Input value"Function · 0.80
"Return value"Function · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected