work.suroh.tk/node_modules/rxjs/util/toSubscriber.js.map

1 line
1.5 KiB
Plaintext
Raw Normal View History

2019-12-02 12:22:45 +00:00
{"version":3,"file":"toSubscriber.js","sourceRoot":"","sources":["../../src/util/toSubscriber.ts"],"names":[],"mappings":";AAAA,2BAA2B,eAAe,CAAC,CAAA;AAC3C,6BAAmD,wBAAwB,CAAC,CAAA;AAC5E,yBAAwD,aAAa,CAAC,CAAA;AAEtE,sBACE,cAA0D,EAC1D,KAA4B,EAC5B,QAAqB;IAErB,EAAE,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;QACnB,EAAE,CAAC,CAAC,cAAc,YAAY,uBAAU,CAAC,CAAC,CAAC;YACzC,MAAM,CAAkB,cAAe,CAAC;QAC1C,CAAC;QAED,EAAE,CAAC,CAAC,cAAc,CAAC,2BAAkB,CAAC,CAAC,CAAC,CAAC;YACvC,MAAM,CAAC,cAAc,CAAC,2BAAkB,CAAC,EAAE,CAAC;QAC9C,CAAC;IACH,CAAC;IAED,EAAE,CAAC,CAAC,CAAC,cAAc,IAAI,CAAC,KAAK,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;QAC3C,MAAM,CAAC,IAAI,uBAAU,CAAC,gBAAa,CAAC,CAAC;IACvC,CAAC;IAED,MAAM,CAAC,IAAI,uBAAU,CAAC,cAAc,EAAE,KAAK,EAAE,QAAQ,CAAC,CAAC;AACzD,CAAC;AApBe,oBAAY,eAoB3B,CAAA","sourcesContent":["import { Subscriber } from '../Subscriber';\nimport { rxSubscriber as rxSubscriberSymbol } from '../symbol/rxSubscriber';\nimport { PartialObserver, empty as emptyObserver } from '../Observer';\n\nexport function toSubscriber<T>(\n nextOrObserver?: PartialObserver<T> | ((value: T) => void),\n error?: (error: any) => void,\n complete?: () => void): Subscriber<T> {\n\n if (nextOrObserver) {\n if (nextOrObserver instanceof Subscriber) {\n return (<Subscriber<T>> nextOrObserver);\n }\n\n if (nextOrObserver[rxSubscriberSymbol]) {\n return nextOrObserver[rxSubscriberSymbol]();\n }\n }\n\n if (!nextOrObserver && !error && !complete) {\n return new Subscriber(emptyObserver);\n }\n\n return new Subscriber(nextOrObserver, error, complete);\n}\n"]}