hunk.code_window:     var expected = [1, 2, 3, 4];
       var i = 0;
       var source = Observable.of(1, 2, 3, 4).publishReplay();
       source.subscribe(
         function (x) {
           expect(x).toBe(expected[i++]);
         },
  
hunk.labels: keep keep keep replace keep keep keep keep keep
hunk.after_edit:     var source = Observable.of(1, 2, 3, 4).publishReplay(1);
       var results = [];
  
hunk.file_path: spec/operators/publishReplay-spec.js
hunk.type: replace
file: import ReplaySubject from '../subjects/ReplaySubject';
  import Scheduler from '../Scheduler';
  import multicast from './multicast';
  
  export default function publishReplay(bufferSize: number = Number.POSITIVE_INFINITY,
                                        windowTime: number = Number.POSITIVE_INFINITY,
                                        scheduler?: Scheduler) {
    return multicast.call(this,
      () => new ReplaySubject(bufferSize, windowTime, scheduler)
    );
  }