hunk.code_window: /* tslint:disable:max-line-length */
   export function publishReplay<T>(bufferSize?: number, windowTime?: number, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
   export function publishReplay<T, R>(bufferSize?: number, windowTime?: number, selector?: OperatorFunction<T, R>, scheduler?: SchedulerLike): OperatorFunction<T, R>;
   export function publishReplay<T>(bufferSize?: number, windowTime?: number, selector?: MonoTypeOperatorFunction<T>, scheduler?: SchedulerLike): MonoTypeOperatorFunction<T>;
   /* tslint:enable:max-line-length */
   export function publishReplay<T, R>(bufferSize?: number,
                                       windowTime?: number,
                                       selectorOrScheduler?: SchedulerLike | OperatorFunction<T, R>,
  
hunk.labels: keep keep keep replace replace keep keep keep keep keep
hunk.after_edit: export function publishReplay<T, O extends ObservableInput<any>>(bufferSize?: number, windowTime?: number, selector?: (shared: Observable<T>) => O, scheduler?: SchedulerLike): OperatorFunction<T, ObservedValueOf<O>>;
  
hunk.file_path: src/internal/operators/publishReplay.ts
hunk.type: replace
file: declare const global: any;
  
  import * as Rx from 'rxjs/Rx';
  import { ObservableInput } from 'rxjs';
  import { iterator } from 'rxjs/symbol/iterator';
  import { root } from 'rxjs/util/root';
  import $$symbolObservable from 'symbol-observable';
  
  export function lowerCaseO<T>(...args: Array<any>): Rx.Observable<T> {
    const o = {
      subscribe(observer: any) {
        args.forEach(v => observer.next(v));
        observer.complete();
        return {
          unsubscribe() { /* do nothing */ }
        };
      }
    };
  
    o[$$symbolObservable] = function (this: any) {
      return this;
    };
  
    return <any>o;
  }
  
  export const createObservableInputs = <T>(value: T) => Rx.Observable.of<ObservableInput<T>>(
    Rx.Observable.of<T>(value),
    Rx.Observable.of<T>(value, Rx.Scheduler.async),
    [value],
    Promise.resolve(value),
    <any>({
    [iterator]: () => {
      const iteratorResults = [
        { value, done: false },
        { done: true }
      ];
      return {
        next: () => {
          return iteratorResults.shift();
        }
      };
    }
    }),
    <any>({ [$$symbolObservable]: () => Rx.Observable.of(value) })
  );
  
  global.__root__ = root;
  