Sha256: d08d3f3dac0ca1b513c33d72e2a13084f2a04f2e3830003801709f1f304a1940
Contents?: true
Size: 752 Bytes
Versions: 49
Compression:
Stored size: 752 Bytes
Contents
import { Subscriber } from '../Subscriber'; import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber'; import { PartialObserver, empty as emptyObserver } from '../Observer'; export function toSubscriber<T>( nextOrObserver?: PartialObserver<T> | ((value: T) => void), error?: (error: any) => void, complete?: () => void): Subscriber<T> { if (nextOrObserver) { if (nextOrObserver instanceof Subscriber) { return (<Subscriber<T>> nextOrObserver); } if (nextOrObserver[rxSubscriberSymbol]) { return nextOrObserver[rxSubscriberSymbol](); } } if (!nextOrObserver && !error && !complete) { return new Subscriber(emptyObserver); } return new Subscriber(nextOrObserver, error, complete); }
Version data entries
49 entries across 49 versions & 4 rubygems