{"version":3,"file":"publish.js","sourceRoot":"","sources":["../../src/operators/publish.ts"],"names":[],"mappings":";AACA,wBAAwB,YAAY,CAAC,CAAA;AACrC,0BAA0B,aAAa,CAAC,CAAA;AAQxC,mCAAmC;AAEnC;;;;;;;;;;;;GAYG;AACH,iBAA8B,QAAiC;IAC7D,MAAM,CAAC,QAAQ;QACb,qBAAS,CAAC,cAAM,OAAA,IAAI,iBAAO,EAAK,EAAhB,CAAgB,EAAE,QAAQ,CAAC;QAC3C,qBAAS,CAAC,IAAI,iBAAO,EAAK,CAAC,CAAC;AAChC,CAAC;AAJe,eAAO,UAItB,CAAA","sourcesContent":["import { Observable } from '../Observable';\nimport { Subject } from '../Subject';\nimport { multicast } from './multicast';\nimport { ConnectableObservable } from '../observable/ConnectableObservable';\nimport { MonoTypeOperatorFunction, OperatorFunction, UnaryFunction } from '../interfaces';\n\n/* tslint:disable:max-line-length */\nexport function publish(): UnaryFunction, ConnectableObservable>;\nexport function publish(selector: MonoTypeOperatorFunction): MonoTypeOperatorFunction;\nexport function publish(selector: OperatorFunction): OperatorFunction;\n/* tslint:enable:max-line-length */\n\n/**\n * Returns a ConnectableObservable, which is a variety of Observable that waits until its connect method is called\n * before it begins emitting items to those Observers that have subscribed to it.\n *\n * \n *\n * @param {Function} [selector] - Optional selector function which can use the multicasted source sequence as many times\n * as needed, without causing multiple subscriptions to the source sequence.\n * Subscribers to the given source will receive all notifications of the source from the time of the subscription on.\n * @return A ConnectableObservable that upon connection causes the source Observable to emit items to its Observers.\n * @method publish\n * @owner Observable\n */\nexport function publish(selector?: OperatorFunction): MonoTypeOperatorFunction | OperatorFunction {\n return selector ?\n multicast(() => new Subject(), selector) :\n multicast(new Subject());\n}\n"]}