MCPcopy Create free account
hub / github.com/deanrad/rxfx / next

Function next

operators/src/queueOnlyLatest.ts:51–62  ·  view source on GitHub ↗
(trigger)

Source from the content-addressed store, hash-verified

49
50 return source.subscribe({
51 next(trigger) {
52 if (!handlerSub || handlerSub.closed) {
53 // clear our queue
54 nextWork = null;
55 // start this work
56 work = makeWork(trigger);
57 handlerSub = work.subscribe(workObserver);
58 } else {
59 // let the existing handlerSub call nextWork, which we'll populate
60 nextWork = makeWork(trigger);
61 }
62 },
63 error(e) {
64 notify.error(e);
65 },

Callers

nothing calls this directly

Calls 2

makeWorkFunction · 0.85
subscribeMethod · 0.80

Tested by

no test coverage detected