Front end of the Slack clone application.

timestamp.js 810B

1234567891011121314151617181920212223242526
  1. /** PURE_IMPORTS_START .._scheduler_async,._map PURE_IMPORTS_END */
  2. import { async } from '../scheduler/async';
  3. import { map } from './map';
  4. /**
  5. * @param scheduler
  6. * @return {Observable<Timestamp<any>>|WebSocketSubject<T>|Observable<T>}
  7. * @method timestamp
  8. * @owner Observable
  9. */
  10. export function timestamp(scheduler) {
  11. if (scheduler === void 0) {
  12. scheduler = async;
  13. }
  14. return map(function (value) { return new Timestamp(value, scheduler.now()); });
  15. // return (source: Observable<T>) => source.lift(new TimestampOperator(scheduler));
  16. }
  17. export var Timestamp = /*@__PURE__*/ (/*@__PURE__*/ function () {
  18. function Timestamp(value, timestamp) {
  19. this.value = value;
  20. this.timestamp = timestamp;
  21. }
  22. return Timestamp;
  23. }());
  24. ;
  25. //# sourceMappingURL=timestamp.js.map