-
Notifications
You must be signed in to change notification settings - Fork 0
/
reducer.js
25 lines (25 loc) · 976 Bytes
/
reducer.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
"use strict";
var __extends = (this && this.__extends) || function (d, b) {
for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p];
function __() { this.constructor = d; }
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
};
var BehaviorSubject_1 = require('rxjs/BehaviorSubject');
var Reducer = (function (_super) {
__extends(Reducer, _super);
function Reducer(_dispatcher, initialReducer) {
_super.call(this, initialReducer);
this._dispatcher = _dispatcher;
}
Reducer.prototype.replaceReducer = function (reducer) {
this.next(reducer);
};
Reducer.prototype.next = function (reducer) {
_super.prototype.next.call(this, reducer);
this._dispatcher.dispatch({ type: Reducer.REPLACE });
};
Reducer.REPLACE = '@ngrx/store/replace-reducer';
return Reducer;
}(BehaviorSubject_1.BehaviorSubject));
exports.Reducer = Reducer;
//# sourceMappingURL=reducer.js.map