Rx.js 9.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233
  1. "use strict";
  2. /* tslint:disable:no-unused-variable */
  3. // Subject imported before Observable to bypass circular dependency issue since
  4. // Subject extends Observable and Observable references Subject in it's
  5. // definition
  6. var Subject_1 = require('./Subject');
  7. exports.Subject = Subject_1.Subject;
  8. exports.AnonymousSubject = Subject_1.AnonymousSubject;
  9. /* tslint:enable:no-unused-variable */
  10. var Observable_1 = require('./Observable');
  11. exports.Observable = Observable_1.Observable;
  12. // statics
  13. /* tslint:disable:no-use-before-declare */
  14. require('./add/observable/bindCallback');
  15. require('./add/observable/bindNodeCallback');
  16. require('./add/observable/combineLatest');
  17. require('./add/observable/concat');
  18. require('./add/observable/defer');
  19. require('./add/observable/empty');
  20. require('./add/observable/forkJoin');
  21. require('./add/observable/from');
  22. require('./add/observable/fromEvent');
  23. require('./add/observable/fromEventPattern');
  24. require('./add/observable/fromPromise');
  25. require('./add/observable/generate');
  26. require('./add/observable/if');
  27. require('./add/observable/interval');
  28. require('./add/observable/merge');
  29. require('./add/observable/race');
  30. require('./add/observable/never');
  31. require('./add/observable/of');
  32. require('./add/observable/onErrorResumeNext');
  33. require('./add/observable/pairs');
  34. require('./add/observable/range');
  35. require('./add/observable/using');
  36. require('./add/observable/throw');
  37. require('./add/observable/timer');
  38. require('./add/observable/zip');
  39. //dom
  40. require('./add/observable/dom/ajax');
  41. require('./add/observable/dom/webSocket');
  42. //operators
  43. require('./add/operator/buffer');
  44. require('./add/operator/bufferCount');
  45. require('./add/operator/bufferTime');
  46. require('./add/operator/bufferToggle');
  47. require('./add/operator/bufferWhen');
  48. require('./add/operator/catch');
  49. require('./add/operator/combineAll');
  50. require('./add/operator/combineLatest');
  51. require('./add/operator/concat');
  52. require('./add/operator/concatAll');
  53. require('./add/operator/concatMap');
  54. require('./add/operator/concatMapTo');
  55. require('./add/operator/count');
  56. require('./add/operator/dematerialize');
  57. require('./add/operator/debounce');
  58. require('./add/operator/debounceTime');
  59. require('./add/operator/defaultIfEmpty');
  60. require('./add/operator/delay');
  61. require('./add/operator/delayWhen');
  62. require('./add/operator/distinct');
  63. require('./add/operator/distinctUntilChanged');
  64. require('./add/operator/distinctUntilKeyChanged');
  65. require('./add/operator/do');
  66. require('./add/operator/exhaust');
  67. require('./add/operator/exhaustMap');
  68. require('./add/operator/expand');
  69. require('./add/operator/elementAt');
  70. require('./add/operator/filter');
  71. require('./add/operator/finally');
  72. require('./add/operator/find');
  73. require('./add/operator/findIndex');
  74. require('./add/operator/first');
  75. require('./add/operator/groupBy');
  76. require('./add/operator/ignoreElements');
  77. require('./add/operator/isEmpty');
  78. require('./add/operator/audit');
  79. require('./add/operator/auditTime');
  80. require('./add/operator/last');
  81. require('./add/operator/let');
  82. require('./add/operator/every');
  83. require('./add/operator/map');
  84. require('./add/operator/mapTo');
  85. require('./add/operator/materialize');
  86. require('./add/operator/max');
  87. require('./add/operator/merge');
  88. require('./add/operator/mergeAll');
  89. require('./add/operator/mergeMap');
  90. require('./add/operator/mergeMapTo');
  91. require('./add/operator/mergeScan');
  92. require('./add/operator/min');
  93. require('./add/operator/multicast');
  94. require('./add/operator/observeOn');
  95. require('./add/operator/onErrorResumeNext');
  96. require('./add/operator/pairwise');
  97. require('./add/operator/partition');
  98. require('./add/operator/pluck');
  99. require('./add/operator/publish');
  100. require('./add/operator/publishBehavior');
  101. require('./add/operator/publishReplay');
  102. require('./add/operator/publishLast');
  103. require('./add/operator/race');
  104. require('./add/operator/reduce');
  105. require('./add/operator/repeat');
  106. require('./add/operator/repeatWhen');
  107. require('./add/operator/retry');
  108. require('./add/operator/retryWhen');
  109. require('./add/operator/sample');
  110. require('./add/operator/sampleTime');
  111. require('./add/operator/scan');
  112. require('./add/operator/sequenceEqual');
  113. require('./add/operator/share');
  114. require('./add/operator/shareReplay');
  115. require('./add/operator/single');
  116. require('./add/operator/skip');
  117. require('./add/operator/skipLast');
  118. require('./add/operator/skipUntil');
  119. require('./add/operator/skipWhile');
  120. require('./add/operator/startWith');
  121. require('./add/operator/subscribeOn');
  122. require('./add/operator/switch');
  123. require('./add/operator/switchMap');
  124. require('./add/operator/switchMapTo');
  125. require('./add/operator/take');
  126. require('./add/operator/takeLast');
  127. require('./add/operator/takeUntil');
  128. require('./add/operator/takeWhile');
  129. require('./add/operator/throttle');
  130. require('./add/operator/throttleTime');
  131. require('./add/operator/timeInterval');
  132. require('./add/operator/timeout');
  133. require('./add/operator/timeoutWith');
  134. require('./add/operator/timestamp');
  135. require('./add/operator/toArray');
  136. require('./add/operator/toPromise');
  137. require('./add/operator/window');
  138. require('./add/operator/windowCount');
  139. require('./add/operator/windowTime');
  140. require('./add/operator/windowToggle');
  141. require('./add/operator/windowWhen');
  142. require('./add/operator/withLatestFrom');
  143. require('./add/operator/zip');
  144. require('./add/operator/zipAll');
  145. /* tslint:disable:no-unused-variable */
  146. var Subscription_1 = require('./Subscription');
  147. exports.Subscription = Subscription_1.Subscription;
  148. var Subscriber_1 = require('./Subscriber');
  149. exports.Subscriber = Subscriber_1.Subscriber;
  150. var AsyncSubject_1 = require('./AsyncSubject');
  151. exports.AsyncSubject = AsyncSubject_1.AsyncSubject;
  152. var ReplaySubject_1 = require('./ReplaySubject');
  153. exports.ReplaySubject = ReplaySubject_1.ReplaySubject;
  154. var BehaviorSubject_1 = require('./BehaviorSubject');
  155. exports.BehaviorSubject = BehaviorSubject_1.BehaviorSubject;
  156. var ConnectableObservable_1 = require('./observable/ConnectableObservable');
  157. exports.ConnectableObservable = ConnectableObservable_1.ConnectableObservable;
  158. var Notification_1 = require('./Notification');
  159. exports.Notification = Notification_1.Notification;
  160. var EmptyError_1 = require('./util/EmptyError');
  161. exports.EmptyError = EmptyError_1.EmptyError;
  162. var ArgumentOutOfRangeError_1 = require('./util/ArgumentOutOfRangeError');
  163. exports.ArgumentOutOfRangeError = ArgumentOutOfRangeError_1.ArgumentOutOfRangeError;
  164. var ObjectUnsubscribedError_1 = require('./util/ObjectUnsubscribedError');
  165. exports.ObjectUnsubscribedError = ObjectUnsubscribedError_1.ObjectUnsubscribedError;
  166. var TimeoutError_1 = require('./util/TimeoutError');
  167. exports.TimeoutError = TimeoutError_1.TimeoutError;
  168. var UnsubscriptionError_1 = require('./util/UnsubscriptionError');
  169. exports.UnsubscriptionError = UnsubscriptionError_1.UnsubscriptionError;
  170. var timeInterval_1 = require('./operator/timeInterval');
  171. exports.TimeInterval = timeInterval_1.TimeInterval;
  172. var timestamp_1 = require('./operators/timestamp');
  173. exports.Timestamp = timestamp_1.Timestamp;
  174. var TestScheduler_1 = require('./testing/TestScheduler');
  175. exports.TestScheduler = TestScheduler_1.TestScheduler;
  176. var VirtualTimeScheduler_1 = require('./scheduler/VirtualTimeScheduler');
  177. exports.VirtualTimeScheduler = VirtualTimeScheduler_1.VirtualTimeScheduler;
  178. var AjaxObservable_1 = require('./observable/dom/AjaxObservable');
  179. exports.AjaxResponse = AjaxObservable_1.AjaxResponse;
  180. exports.AjaxError = AjaxObservable_1.AjaxError;
  181. exports.AjaxTimeoutError = AjaxObservable_1.AjaxTimeoutError;
  182. var pipe_1 = require('./util/pipe');
  183. exports.pipe = pipe_1.pipe;
  184. var asap_1 = require('./scheduler/asap');
  185. var async_1 = require('./scheduler/async');
  186. var queue_1 = require('./scheduler/queue');
  187. var animationFrame_1 = require('./scheduler/animationFrame');
  188. var rxSubscriber_1 = require('./symbol/rxSubscriber');
  189. var iterator_1 = require('./symbol/iterator');
  190. var observable_1 = require('./symbol/observable');
  191. var _operators = require('./operators');
  192. exports.operators = _operators;
  193. /* tslint:enable:no-unused-variable */
  194. /**
  195. * @typedef {Object} Rx.Scheduler
  196. * @property {Scheduler} queue Schedules on a queue in the current event frame
  197. * (trampoline scheduler). Use this for iteration operations.
  198. * @property {Scheduler} asap Schedules on the micro task queue, which uses the
  199. * fastest transport mechanism available, either Node.js' `process.nextTick()`
  200. * or Web Worker MessageChannel or setTimeout or others. Use this for
  201. * asynchronous conversions.
  202. * @property {Scheduler} async Schedules work with `setInterval`. Use this for
  203. * time-based operations.
  204. * @property {Scheduler} animationFrame Schedules work with `requestAnimationFrame`.
  205. * Use this for synchronizing with the platform's painting
  206. */
  207. var Scheduler = {
  208. asap: asap_1.asap,
  209. queue: queue_1.queue,
  210. animationFrame: animationFrame_1.animationFrame,
  211. async: async_1.async
  212. };
  213. exports.Scheduler = Scheduler;
  214. /**
  215. * @typedef {Object} Rx.Symbol
  216. * @property {Symbol|string} rxSubscriber A symbol to use as a property name to
  217. * retrieve an "Rx safe" Observer from an object. "Rx safety" can be defined as
  218. * an object that has all of the traits of an Rx Subscriber, including the
  219. * ability to add and remove subscriptions to the subscription chain and
  220. * guarantees involving event triggering (can't "next" after unsubscription,
  221. * etc).
  222. * @property {Symbol|string} observable A symbol to use as a property name to
  223. * retrieve an Observable as defined by the [ECMAScript "Observable" spec](https://github.com/zenparsing/es-observable).
  224. * @property {Symbol|string} iterator The ES6 symbol to use as a property name
  225. * to retrieve an iterator from an object.
  226. */
  227. var Symbol = {
  228. rxSubscriber: rxSubscriber_1.rxSubscriber,
  229. observable: observable_1.observable,
  230. iterator: iterator_1.iterator
  231. };
  232. exports.Symbol = Symbol;
  233. //# sourceMappingURL=Rx.js.map