/** PURE_IMPORTS_START _observable_empty,_observable_of,_observable_throwError PURE_IMPORTS_END */ import { empty } from './observable/empty'; import { of } from './observable/of'; import { throwError } from './observable/throwError'; export var NotificationKind; /*@__PURE__*/ (function (NotificationKind) { NotificationKind["NEXT"] = "N"; NotificationKind["ERROR"] = "E"; NotificationKind["COMPLETE"] = "C"; })(NotificationKind || (NotificationKind = {})); var Notification = /*@__PURE__*/ (function () { function Notification(kind, value, error) { this.kind = kind; this.value = value; this.error = error; this.hasValue = kind === 'N'; } Notification.prototype.observe = function (observer) { switch (this.kind) { case 'N': return observer.next && observer.next(this.value); case 'E': return observer.error && observer.error(this.error); case 'C': return observer.complete && observer.complete(); } }; Notification.prototype.do = function (next, error, complete) { var kind = this.kind; switch (kind) { case 'N': return next && next(this.value); case 'E': return error && error(this.error); case 'C': return complete && complete(); } }; Notification.prototype.accept = function (nextOrObserver, error, complete) { if (nextOrObserver && typeof nextOrObserver.next === 'function') { return this.observe(nextOrObserver); } else { return this.do(nextOrObserver, error, complete); } }; Notification.prototype.toObservable = function () { var kind = this.kind; switch (kind) { case 'N': return of(this.value); case 'E': return throwError(this.error); case 'C': return empty(); } throw new Error('unexpected notification kind value'); }; Notification.createNext = function (value) { if (typeof value !== 'undefined') { return new Notification('N', value); } return Notification.undefinedValueNotification; }; Notification.createError = function (err) { return new Notification('E', undefined, err); }; Notification.createComplete = function () { return Notification.completeNotification; }; Notification.completeNotification = new Notification('C'); Notification.undefinedValueNotification = new Notification('N', undefined); return Notification; }()); export { Notification }; //# sourceMappingURL=Notification.js.map
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
observable | Folder | 0755 |
|
|
operators | Folder | 0755 |
|
|
scheduled | Folder | 0755 |
|
|
scheduler | Folder | 0755 |
|
|
symbol | Folder | 0755 |
|
|
testing | Folder | 0755 |
|
|
util | Folder | 0755 |
|
|
AsyncSubject.js | File | 1.59 KB | 0644 |
|
AsyncSubject.js.map | File | 1.14 KB | 0644 |
|
BehaviorSubject.js | File | 1.46 KB | 0644 |
|
BehaviorSubject.js.map | File | 930 B | 0644 |
|
InnerSubscriber.js | File | 1.04 KB | 0644 |
|
InnerSubscriber.js.map | File | 805 B | 0644 |
|
Notification.js | File | 2.7 KB | 0644 |
|
Notification.js.map | File | 2.17 KB | 0644 |
|
Observable.js | File | 3.95 KB | 0644 |
|
Observable.js.map | File | 3.13 KB | 0644 |
|
Observer.js | File | 494 B | 0644 |
|
Observer.js.map | File | 448 B | 0644 |
|
Operator.js | File | 37 B | 0644 |
|
Operator.js.map | File | 105 B | 0644 |
|
OuterSubscriber.js | File | 866 B | 0644 |
|
OuterSubscriber.js.map | File | 548 B | 0644 |
|
ReplaySubject.js | File | 4.36 KB | 0644 |
|
ReplaySubject.js.map | File | 3.55 KB | 0644 |
|
Rx.js | File | 7.66 KB | 0644 |
|
Rx.js.map | File | 4.49 KB | 0644 |
|
Scheduler.js | File | 602 B | 0644 |
|
Scheduler.js.map | File | 537 B | 0644 |
|
Subject.js | File | 5.25 KB | 0644 |
|
Subject.js.map | File | 3.97 KB | 0644 |
|
SubjectSubscription.js | File | 1.14 KB | 0644 |
|
SubjectSubscription.js.map | File | 868 B | 0644 |
|
Subscriber.js | File | 8.44 KB | 0644 |
|
Subscriber.js.map | File | 6.01 KB | 0644 |
|
Subscription.js | File | 5.09 KB | 0644 |
|
Subscription.js.map | File | 3.87 KB | 0644 |
|
config.js | File | 859 B | 0644 |
|
config.js.map | File | 513 B | 0644 |
|
innerSubscribe.js | File | 3.5 KB | 0644 |
|
innerSubscribe.js.map | File | 2.16 KB | 0644 |
|
types.js | File | 34 B | 0644 |
|
types.js.map | File | 99 B | 0644 |
|