Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
run (sink, scheduler) {
return this.source.run(relativeSink(this.origin, sink), schedulerRelativeTo(this.origin, scheduler))
}
}
const mapAndRun = (f: (a: A) => Stream<b>, t: Time, x: A, sink: Sink<b>, scheduler: Scheduler): Disposable =>
f(x).run(sink, schedulerRelativeTo(t, scheduler))
</b></b>
run (sink: Sink<a>, scheduler: Scheduler): Disposable {
return this.source.run(relativeSink(this.origin, sink), schedulerRelativeTo(this.origin, scheduler))
}
}</a>
constructor(source: Stream<a>, min: Time, max: Time, outer: SwitchSink</a><a>, sink: Sink</a><a>, scheduler: Scheduler) {
this.min = min
this.max = max
this.outer = outer
this.sink = sink
this.disposable = source.run(this, schedulerRelativeTo(min, scheduler))
}
</a>
dispose(): void {
return this.disposeCurrent(currentTime(this.scheduler))
}
private endBound = (): void => this.sink.end(currentTime(this.scheduler))
private errorBound = (e: Error): void => this.sink.error(currentTime(this.scheduler), e)
private errorBound = (e: Error): void => this.sink.error(currentTime(this.scheduler), e)
}
private eventBound = (x: A): void => this.sink.event(currentTime(this.scheduler), x)
private endBound = (): void => this.sink.end(currentTime(this.scheduler))
event(_t: Time, x: A): void {
this.tasks.push(scheduleDelay(this.dt, propagateEventTask(x, this.sink), this.scheduler))
}
event(_t: Time, x: A): void {
this.clearTimer()
this.value = x
this.timer = delay(this.dt, new DebounceTask(this, x), this.scheduler)
}