startWith.js 1020 B

123456789101112131415161718192021222324252627
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. var operators_1 = require("rxjs/operators");
  4. /* tslint:enable:max-line-length */
  5. /**
  6. * Returns an Observable that emits the items you specify as arguments before it begins to emit
  7. * items emitted by the source Observable.
  8. *
  9. * <img src="./img/startWith.png" width="100%">
  10. *
  11. * @param {...T} values - Items you want the modified Observable to emit first.
  12. * @param {Scheduler} [scheduler] - A {@link IScheduler} to use for scheduling
  13. * the emissions of the `next` notifications.
  14. * @return {Observable} An Observable that emits the items in the specified Iterable and then emits the items
  15. * emitted by the source Observable.
  16. * @method startWith
  17. * @owner Observable
  18. */
  19. function startWith() {
  20. var array = [];
  21. for (var _i = 0; _i < arguments.length; _i++) {
  22. array[_i] = arguments[_i];
  23. }
  24. return operators_1.startWith.apply(void 0, array)(this);
  25. }
  26. exports.startWith = startWith;
  27. //# sourceMappingURL=startWith.js.map