项目原始demo,不改动
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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.
 
 
 
 

25 lines
779 B

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