芝麻web文件管理V1.00
编辑当前文件:/home/freeclou/app.optimyar.com/backend/node_modules/rxjs/src/internal/util/toSubscriber.ts
import { Subscriber } from '../Subscriber'; import { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber'; import { empty as emptyObserver } from '../Observer'; import { PartialObserver } from '../types'; export function toSubscriber
( nextOrObserver?: PartialObserver
| ((value: T) => void), error?: (error: any) => void, complete?: () => void): Subscriber
{ if (nextOrObserver) { if (nextOrObserver instanceof Subscriber) { return (
> nextOrObserver); } if (nextOrObserver[rxSubscriberSymbol]) { return nextOrObserver[rxSubscriberSymbol](); } } if (!nextOrObserver && !error && !complete) { return new Subscriber(emptyObserver); } return new Subscriber(nextOrObserver, error, complete); }