Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private dispose(t: Time, index: number): void {
tryDispose(t, this.disposables[index], this.sink)
if (--this.activeCount === 0) {
this.sink.end(t)
}
}
}
endInner(t: Time, inner: Disposable): void {
const i = this.current.indexOf(inner)
if (i >= 0) {
this.current.splice(i, 1)
}
tryDispose(t, inner, this)
const pending = this.pending
if (isNonEmpty(pending)) {
this.startInner(t, pending.shift())
} else {
this.checkEnd(t)
}
}
error(t: Time, e: E): void {
const nextSink = this.sink.disable()
tryDispose(t, this.disposable, this.sink)
this._startNext(t, e, nextSink)
}
private dispose(t: Time, index: number): void {
tryDispose(t, this.disposables[index], this.sink)
if (--this.activeCount === 0) {
this.sink.end(t)
}
}
}
end(t: Time): void {
this.active = false
tryDispose(t, this.disposable, this.sink)
this.checkEnd(t)
}
end(t: Time): void {
if (!this.active) {
return
}
tryDispose(t, this.disposable, this.sink)
this.startNext(t, this.sink)
}
dispose(t: Time): void {
tryDispose(t, this.disposable, this.sink)
}
}