packages/rpc-core/src/util/refCountDelay.ts
Function refCountDelay
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function refCountDelay <T> (delay = 1750): MonoTypeOperatorFunction<T> {
return (source: Observable<T>): Observable<T> => {
// state: 0 = disconnected, 1 = disconnecting, 2 = connecting, 3 = connected
let [state, refCount, connection, scheduler] = [0, 0, Subscription.EMPTY, Subscription.EMPTY];