Ohm-Management - Projektarbeit B-ME
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

skipLast.d.ts 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940
  1. import { MonoTypeOperatorFunction } from '../types';
  2. /**
  3. * Skip the last `count` values emitted by the source Observable.
  4. *
  5. * ![](skipLast.png)
  6. *
  7. * `skipLast` returns an Observable that accumulates a queue with a length
  8. * enough to store the first `count` values. As more values are received,
  9. * values are taken from the front of the queue and produced on the result
  10. * sequence. This causes values to be delayed.
  11. *
  12. * ## Example
  13. * Skip the last 2 values of an Observable with many values
  14. * ```ts
  15. * import { range } from 'rxjs';
  16. * import { skipLast } from 'rxjs/operators';
  17. *
  18. * const many = range(1, 5);
  19. * const skipLastTwo = many.pipe(skipLast(2));
  20. * skipLastTwo.subscribe(x => console.log(x));
  21. *
  22. * // Results in:
  23. * // 1 2 3
  24. * ```
  25. *
  26. * @see {@link skip}
  27. * @see {@link skipUntil}
  28. * @see {@link skipWhile}
  29. * @see {@link take}
  30. *
  31. * @throws {ArgumentOutOfRangeError} When using `skipLast(i)`, it throws
  32. * ArgumentOutOrRangeError if `i < 0`.
  33. *
  34. * @param {number} count Number of elements to skip from the end of the source Observable.
  35. * @returns {Observable<T>} An Observable that skips the last count values
  36. * emitted by the source Observable.
  37. * @method skipLast
  38. * @owner Observable
  39. */
  40. export declare function skipLast<T>(count: number): MonoTypeOperatorFunction<T>;