hunk.code_window: it('should enforce type on selector', () => {
     const a = of(1, 2, 3).pipe(publish((x: Observable<string>) => x)); // $ExpectError
   });
  
hunk.labels: keep keep add
hunk.after_edit: it('should support union types in selector', () => {
     const a = of(1, 2, 3).pipe(publish(() => Math.random() > 0.5 ? of(123) : of('test'))); // $ExpectType Observable<string | number>
   });
hunk.file_path: spec-dtslint/operators/publish-spec.ts
hunk.type: add
file: var RxOld = require('rx');
  var RxNew = require('../../../../index');
  
  module.exports = function (suite) {
    var oldPublishWithImmediateScheduler = RxOld.Observable.range(0, 25, RxOld.Scheduler.immediate).publish();
    var newPublishWithImmediateScheduler = RxNew.Observable.range(0, 25).publish();
  
    function _next(x) { }
    function _error(e) { }
    function _complete() { }
  
    oldPublishWithImmediateScheduler.connect();
    newPublishWithImmediateScheduler.connect();
  
    return suite
      .add('old publish with immediate scheduler', function () {
        oldPublishWithImmediateScheduler.subscribe(_next, _error, _complete);
      })
      .add('new publish with immediate scheduler', function () {
        newPublishWithImmediateScheduler.subscribe(_next, _error, _complete);
      });
  };
  