hunk.code_window:     expectObservable(result).toBe(expected);
       expectSubscriptions(e1.subscriptions).toBe(e1subs);
       expectSubscriptions(e2.subscriptions).toBe(e2subs);
     });
     it('should simply mirror the source if values are not emitted often enough', () =>  {
       const e1 =   hot('-a--------b-----c----|');
       const e1subs =   '^                    !';
       const e2 =  cold( '----x                ');
  
hunk.labels: keep keep keep keep add keep keep keep keep
hunk.after_edit:   it('should handle sync source with sync notifier and trailing appropriately', () => {
       let results: any[] = [];
       const source = of(1).pipe(
         throttle(() => of(1), { leading: false, trailing: true })
       );
       source.subscribe({
         next: value => results.push(value),
         complete: () => results.push('done')
       });
       expect(results).to.deep.equal([1, 'done'])
     });
  
hunk.file_path: spec/operators/throttle-spec.ts
hunk.type: add
file: import { SchedulerLike } from '../types';
  import { Observable } from '../Observable';
  import { EMPTY } from './empty';
  
  export function range(start: number, count?: number): Observable<number>;
  
  /**
   * @deprecated To be removed in v8. Passing a scheduler is deprecated, use `range(start, count).pipe(observeOn(scheduler))` instead.
   */
  export function range(start: number, count: number | undefined, scheduler: SchedulerLike): Observable<number>;
  
  /**
   * Creates an Observable that emits a sequence of numbers within a specified
   * range.
   *
   * <span class="informal">Emits a sequence of numbers in a range.</span>
   *
   * ![](range.png)
   *
   * `range` operator emits a range of sequential integers, in order, where you
   * select the `start` of the range and its `length`. By default, uses no
   * {@link SchedulerLike} and just delivers the notifications synchronously, but may use
   * an optional {@link SchedulerLike} to regulate those deliveries.
   *
   * ## Example
   *
   * ### Produce a range of numbers
   *
   * ```ts
   * import { range } from 'rxjs';
   *
   * const numbers = range(1, 3);
   *
   * numbers.subscribe({
   *  next: value => { console.log(value) },
   *  complete: () => { console.log('Complete!') }
   * });
   *
   * // Logs:
   * // 1
   * // 2
   * // 3
   * // "Complete!"
   * ```
   *
   * @see {@link timer}
   * @see {@link index/interval}
   *
   * @param {number} [start=0] The value of the first integer in the sequence.
   * @param {number} count The number of sequential integers to generate.
   * @param {SchedulerLike} [scheduler] A {@link SchedulerLike} to use for scheduling
   * the emissions of the notifications.
   * @return {Observable} An Observable of numbers that emits a finite range of
   * sequential integers.
   */
  export function range(start: number, count?: number, scheduler?: SchedulerLike): Observable<number> {
    if (count == null) {
      // If one argument was passed, it's the count, not the start.
      count = start;
      start = 0;
    }
  
    if (count <= 0) {
      // No count? We're going nowhere. Return EMPTY.
      return EMPTY;
    }
  
    // Where the range should stop.
    const end = count + start;
  
    return new Observable(
      scheduler
        ? // The deprecated scheduled path.
          (subscriber) => {
            let n = start;
            return scheduler.schedule(function () {
              if (n < end) {
                subscriber.next(n++);
                this.schedule();
              } else {
                subscriber.complete();
              }
            });
          }
        : // Standard synchronous range.
          (subscriber) => {
            let n = start;
            while (n < end && !subscriber.closed) {
              subscriber.next(n++);
            }
            subscriber.complete();
          }
    );
  }
  