@ngrx/effects
Advanced tools
Comparing version 4.1.1 to 5.0.0
@@ -11,3 +11,3 @@ var __extends = (this && this.__extends) || (function () { | ||
})(); | ||
import { ScannedActionsSubject, Store, StoreModule, compose } from '@ngrx/store'; | ||
import { ScannedActionsSubject, Store, StoreFeatureModule, StoreRootModule, compose } from '@ngrx/store'; | ||
import { merge as merge$1 } from 'rxjs/observable/merge'; | ||
@@ -17,3 +17,3 @@ import { ignoreElements as ignoreElements$1 } from 'rxjs/operator/ignoreElements'; | ||
import { map as map$1 } from 'rxjs/operator/map'; | ||
import { Inject, Injectable, InjectionToken, NgModule, Optional } from '@angular/core'; | ||
import { ErrorHandler, Inject, Injectable, InjectionToken, NgModule, Optional } from '@angular/core'; | ||
import { Observable as Observable$1 } from 'rxjs/Observable'; | ||
@@ -26,4 +26,11 @@ import { filter as filter$1 } from 'rxjs/operator/filter'; | ||
import { Subject as Subject$1 } from 'rxjs/Subject'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var METADATA_KEY = '__@ngrx/effects__'; | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} sourceProto | ||
@@ -79,2 +86,9 @@ * @return {?} | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
@@ -90,2 +104,6 @@ /** | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @param {?} sourceInstance | ||
@@ -126,2 +144,6 @@ * @return {?} | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var Actions = (function (_super) { | ||
@@ -160,3 +182,3 @@ __extends(Actions, _super); | ||
} | ||
return filter$1.call(this, function (action) { return allowedTypes.some(function (type) { return type === action.type; }); }); | ||
return ofType.apply(void 0, allowedTypes)(/** @type {?} */ (this.source)); | ||
}; | ||
@@ -168,5 +190,3 @@ return Actions; | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
Actions.ctorParameters = function () { return [ | ||
@@ -176,2 +196,23 @@ { type: Observable$1, decorators: [{ type: Inject, args: [ScannedActionsSubject,] },] }, | ||
/** | ||
* @template T | ||
* @param {...?} allowedTypes | ||
* @return {?} | ||
*/ | ||
function ofType() { | ||
var allowedTypes = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
allowedTypes[_i] = arguments[_i]; | ||
} | ||
return function ofTypeOperator(source$) { | ||
return filter$1.call(source$, function (action) { return allowedTypes.some(function (type) { return type === action.type; }); }); | ||
}; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} output | ||
@@ -192,9 +233,3 @@ * @param {?} reporter | ||
if (output.notification.kind === 'E') { | ||
var /** @type {?} */ errorReason = "Effect " + getEffectName(output) + " threw an error"; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Error: output.notification.error, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(output.notification.error); | ||
} | ||
@@ -212,9 +247,3 @@ } | ||
if (isInvalidAction) { | ||
var /** @type {?} */ errorReason = "Effect " + getEffectName(output) + " dispatched an invalid action"; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Dispatched: action, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(new Error("Effect " + getEffectName(output) + " dispatched an invalid action: " + action)); | ||
} | ||
@@ -239,44 +268,14 @@ } | ||
} | ||
var IMMEDIATE_EFFECTS = new InjectionToken('ngrx/effects: Immediate Effects'); | ||
var ROOT_EFFECTS = new InjectionToken('ngrx/effects: Root Effects'); | ||
var FEATURE_EFFECTS = new InjectionToken('ngrx/effects: Feature Effects'); | ||
var CONSOLE = new InjectionToken('Browser Console'); | ||
var ErrorReporter = (function () { | ||
/** | ||
* @param {?} console | ||
*/ | ||
function ErrorReporter(console) { | ||
this.console = console; | ||
} | ||
/** | ||
* @param {?} reason | ||
* @param {?} details | ||
* @return {?} | ||
*/ | ||
ErrorReporter.prototype.report = function (reason, details) { | ||
this.console.group(reason); | ||
for (var /** @type {?} */ key in details) { | ||
this.console.error(key + ":", details[key]); | ||
} | ||
this.console.groupEnd(); | ||
}; | ||
return ErrorReporter; | ||
}()); | ||
ErrorReporter.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** | ||
* @nocollapse | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
ErrorReporter.ctorParameters = function () { return [ | ||
{ type: undefined, decorators: [{ type: Inject, args: [CONSOLE,] },] }, | ||
]; }; | ||
var EffectSources = (function (_super) { | ||
__extends(EffectSources, _super); | ||
/** | ||
* @param {?} errorReporter | ||
* @param {?} errorHandler | ||
*/ | ||
function EffectSources(errorReporter) { | ||
function EffectSources(errorHandler) { | ||
var _this = _super.call(this) || this; | ||
_this.errorReporter = errorReporter; | ||
_this.errorHandler = errorHandler; | ||
return _this; | ||
@@ -292,2 +291,3 @@ } | ||
/** | ||
* \@internal | ||
* @return {?} | ||
@@ -298,3 +298,3 @@ */ | ||
return mergeMap$1.call(groupBy$1.call(this, getSourceForInstance), function (source$) { return dematerialize$1.call(filter$1.call(map$1.call(exhaustMap$1.call(source$, resolveEffectSource), function (output) { | ||
verifyOutput(output, _this.errorReporter); | ||
verifyOutput(output, _this.errorHandler); | ||
return output.notification; | ||
@@ -308,8 +308,17 @@ }), function (notification) { return notification.kind === 'N'; })); }); | ||
]; | ||
/** @nocollapse */ | ||
EffectSources.ctorParameters = function () { return [ | ||
{ type: ErrorHandler, }, | ||
]; }; | ||
/** | ||
* @nocollapse | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
EffectSources.ctorParameters = function () { return [ | ||
{ type: ErrorReporter, }, | ||
]; }; | ||
var IMMEDIATE_EFFECTS = new InjectionToken('ngrx/effects: Immediate Effects'); | ||
var ROOT_EFFECTS = new InjectionToken('ngrx/effects: Root Effects'); | ||
var FEATURE_EFFECTS = new InjectionToken('ngrx/effects: Feature Effects'); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsRunner = (function () { | ||
@@ -349,5 +358,3 @@ /** | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRunner.ctorParameters = function () { return [ | ||
@@ -357,2 +364,6 @@ { type: EffectSources, }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var ROOT_EFFECTS_INIT = '@ngrx/effects/init'; | ||
@@ -365,5 +376,6 @@ var EffectsRootModule = (function () { | ||
* @param {?} rootEffects | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
function EffectsRootModule(sources, runner, store$$1, rootEffects, storeModule) { | ||
function EffectsRootModule(sources, runner, store$$1, rootEffects, storeRootModule, storeFeatureModule) { | ||
this.sources = sources; | ||
@@ -386,5 +398,3 @@ runner.start(); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRootModule.ctorParameters = function () { return [ | ||
@@ -395,4 +405,9 @@ { type: EffectSources, }, | ||
{ type: Array, decorators: [{ type: Inject, args: [ROOT_EFFECTS,] },] }, | ||
{ type: StoreModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreRootModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreFeatureModule, decorators: [{ type: Optional },] }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsFeatureModule = (function () { | ||
@@ -402,5 +417,6 @@ /** | ||
* @param {?} effectSourceGroups | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
function EffectsFeatureModule(root, effectSourceGroups, storeModule) { | ||
function EffectsFeatureModule(root, effectSourceGroups, storeRootModule, storeFeatureModule) { | ||
this.root = root; | ||
@@ -414,10 +430,13 @@ effectSourceGroups.forEach(function (group) { return group.forEach(function (effectSourceInstance) { return root.addEffects(effectSourceInstance); }); }); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsFeatureModule.ctorParameters = function () { return [ | ||
{ type: EffectsRootModule, }, | ||
{ type: Array, decorators: [{ type: Inject, args: [FEATURE_EFFECTS,] },] }, | ||
{ type: StoreModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreRootModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreFeatureModule, decorators: [{ type: Optional },] }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsModule = (function () { | ||
@@ -454,3 +473,2 @@ function EffectsModule() { | ||
EffectSources, | ||
ErrorReporter, | ||
Actions, | ||
@@ -463,6 +481,2 @@ rootEffects, | ||
}, | ||
{ | ||
provide: CONSOLE, | ||
useFactory: getConsole, | ||
}, | ||
], | ||
@@ -476,5 +490,3 @@ }; | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsModule.ctorParameters = function () { return []; }; | ||
@@ -493,19 +505,17 @@ /** | ||
/** | ||
* @return {?} | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
function getConsole() { | ||
return console; | ||
} | ||
/** | ||
* @deprecated Since version 4.1. Will be deleted in version 5.0. | ||
* @param {?} action | ||
* @return {?} | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
function toPayload(action) { | ||
return ((action)).payload; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export { Effect, getEffectsMetadata, mergeEffects, Actions, EffectsModule, EffectSources, toPayload, ROOT_EFFECTS_INIT, EffectsFeatureModule as ɵd, createSourceInstances as ɵa, getConsole as ɵb, EffectsRootModule as ɵc, EffectsRunner as ɵi, ErrorReporter as ɵh, CONSOLE as ɵg, FEATURE_EFFECTS as ɵf, ROOT_EFFECTS as ɵe }; | ||
export { Effect, getEffectsMetadata, mergeEffects, Actions, ofType, EffectsModule, EffectSources, ROOT_EFFECTS_INIT, EffectsFeatureModule as ɵc, createSourceInstances as ɵa, EffectsRootModule as ɵb, EffectsRunner as ɵf, FEATURE_EFFECTS as ɵe, ROOT_EFFECTS as ɵd }; | ||
//# sourceMappingURL=effects.es5.js.map |
@@ -1,2 +0,2 @@ | ||
import { ScannedActionsSubject, Store, StoreModule, compose } from '@ngrx/store'; | ||
import { ScannedActionsSubject, Store, StoreFeatureModule, StoreRootModule, compose } from '@ngrx/store'; | ||
import { merge as merge$1 } from 'rxjs/observable/merge'; | ||
@@ -6,3 +6,3 @@ import { ignoreElements as ignoreElements$1 } from 'rxjs/operator/ignoreElements'; | ||
import { map as map$1 } from 'rxjs/operator/map'; | ||
import { Inject, Injectable, InjectionToken, NgModule, Optional } from '@angular/core'; | ||
import { ErrorHandler, Inject, Injectable, InjectionToken, NgModule, Optional } from '@angular/core'; | ||
import { Observable as Observable$1 } from 'rxjs/Observable'; | ||
@@ -16,4 +16,12 @@ import { filter as filter$1 } from 'rxjs/operator/filter'; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
const METADATA_KEY = '__@ngrx/effects__'; | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} sourceProto | ||
@@ -33,3 +41,3 @@ * @return {?} | ||
const /** @type {?} */ meta = constructor.hasOwnProperty(METADATA_KEY) | ||
? ((constructor))[METADATA_KEY] | ||
? (/** @type {?} */ (constructor))[METADATA_KEY] | ||
: Object.defineProperty(constructor, METADATA_KEY, { value: [] })[METADATA_KEY]; | ||
@@ -69,2 +77,10 @@ Array.prototype.push.apply(meta, entries); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
const onRunEffectsKey = 'ngrxOnRunEffects'; | ||
@@ -81,2 +97,6 @@ /** | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @param {?} sourceInstance | ||
@@ -117,2 +137,6 @@ * @return {?} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class Actions extends Observable$1 { | ||
@@ -145,3 +169,3 @@ /** | ||
ofType(...allowedTypes) { | ||
return filter$1.call(this, (action) => allowedTypes.some(type => type === action.type)); | ||
return ofType(...allowedTypes)(/** @type {?} */ (this.source)); | ||
} | ||
@@ -152,10 +176,26 @@ } | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
Actions.ctorParameters = () => [ | ||
{ type: Observable$1, decorators: [{ type: Inject, args: [ScannedActionsSubject,] },] }, | ||
]; | ||
/** | ||
* @template T | ||
* @param {...?} allowedTypes | ||
* @return {?} | ||
*/ | ||
function ofType(...allowedTypes) { | ||
return function ofTypeOperator(source$) { | ||
return filter$1.call(source$, (action) => allowedTypes.some(type => type === action.type)); | ||
}; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} output | ||
@@ -176,9 +216,3 @@ * @param {?} reporter | ||
if (output.notification.kind === 'E') { | ||
const /** @type {?} */ errorReason = `Effect ${getEffectName(output)} threw an error`; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Error: output.notification.error, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(output.notification.error); | ||
} | ||
@@ -196,9 +230,3 @@ } | ||
if (isInvalidAction) { | ||
const /** @type {?} */ errorReason = `Effect ${getEffectName(output)} dispatched an invalid action`; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Dispatched: action, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(new Error(`Effect ${getEffectName(output)} dispatched an invalid action: ${action}`)); | ||
} | ||
@@ -223,44 +251,13 @@ } | ||
const IMMEDIATE_EFFECTS = new InjectionToken('ngrx/effects: Immediate Effects'); | ||
const ROOT_EFFECTS = new InjectionToken('ngrx/effects: Root Effects'); | ||
const FEATURE_EFFECTS = new InjectionToken('ngrx/effects: Feature Effects'); | ||
const CONSOLE = new InjectionToken('Browser Console'); | ||
class ErrorReporter { | ||
/** | ||
* @param {?} console | ||
*/ | ||
constructor(console) { | ||
this.console = console; | ||
} | ||
/** | ||
* @param {?} reason | ||
* @param {?} details | ||
* @return {?} | ||
*/ | ||
report(reason, details) { | ||
this.console.group(reason); | ||
for (let /** @type {?} */ key in details) { | ||
this.console.error(`${key}:`, details[key]); | ||
} | ||
this.console.groupEnd(); | ||
} | ||
} | ||
ErrorReporter.decorators = [ | ||
{ type: Injectable }, | ||
]; | ||
/** | ||
* @nocollapse | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
ErrorReporter.ctorParameters = () => [ | ||
{ type: undefined, decorators: [{ type: Inject, args: [CONSOLE,] },] }, | ||
]; | ||
class EffectSources extends Subject$1 { | ||
/** | ||
* @param {?} errorReporter | ||
* @param {?} errorHandler | ||
*/ | ||
constructor(errorReporter) { | ||
constructor(errorHandler) { | ||
super(); | ||
this.errorReporter = errorReporter; | ||
this.errorHandler = errorHandler; | ||
} | ||
@@ -275,2 +272,3 @@ /** | ||
/** | ||
* \@internal | ||
* @return {?} | ||
@@ -280,3 +278,3 @@ */ | ||
return mergeMap$1.call(groupBy$1.call(this, getSourceForInstance), (source$) => dematerialize$1.call(filter$1.call(map$1.call(exhaustMap$1.call(source$, resolveEffectSource), (output) => { | ||
verifyOutput(output, this.errorReporter); | ||
verifyOutput(output, this.errorHandler); | ||
return output.notification; | ||
@@ -289,9 +287,19 @@ }), (notification) => notification.kind === 'N'))); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectSources.ctorParameters = () => [ | ||
{ type: ErrorReporter, }, | ||
{ type: ErrorHandler, }, | ||
]; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
const IMMEDIATE_EFFECTS = new InjectionToken('ngrx/effects: Immediate Effects'); | ||
const ROOT_EFFECTS = new InjectionToken('ngrx/effects: Root Effects'); | ||
const FEATURE_EFFECTS = new InjectionToken('ngrx/effects: Feature Effects'); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class EffectsRunner { | ||
@@ -330,5 +338,3 @@ /** | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRunner.ctorParameters = () => [ | ||
@@ -339,2 +345,6 @@ { type: EffectSources, }, | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
const ROOT_EFFECTS_INIT = '@ngrx/effects/init'; | ||
@@ -347,5 +357,6 @@ class EffectsRootModule { | ||
* @param {?} rootEffects | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
constructor(sources, runner, store$$1, rootEffects, storeModule) { | ||
constructor(sources, runner, store$$1, rootEffects, storeRootModule, storeFeatureModule) { | ||
this.sources = sources; | ||
@@ -367,5 +378,3 @@ runner.start(); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRootModule.ctorParameters = () => [ | ||
@@ -376,5 +385,10 @@ { type: EffectSources, }, | ||
{ type: Array, decorators: [{ type: Inject, args: [ROOT_EFFECTS,] },] }, | ||
{ type: StoreModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreRootModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreFeatureModule, decorators: [{ type: Optional },] }, | ||
]; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class EffectsFeatureModule { | ||
@@ -384,5 +398,6 @@ /** | ||
* @param {?} effectSourceGroups | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
constructor(root, effectSourceGroups, storeModule) { | ||
constructor(root, effectSourceGroups, storeRootModule, storeFeatureModule) { | ||
this.root = root; | ||
@@ -395,11 +410,14 @@ effectSourceGroups.forEach(group => group.forEach(effectSourceInstance => root.addEffects(effectSourceInstance))); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsFeatureModule.ctorParameters = () => [ | ||
{ type: EffectsRootModule, }, | ||
{ type: Array, decorators: [{ type: Inject, args: [FEATURE_EFFECTS,] },] }, | ||
{ type: StoreModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreRootModule, decorators: [{ type: Optional },] }, | ||
{ type: StoreFeatureModule, decorators: [{ type: Optional },] }, | ||
]; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
class EffectsModule { | ||
@@ -434,3 +452,2 @@ /** | ||
EffectSources, | ||
ErrorReporter, | ||
Actions, | ||
@@ -443,6 +460,2 @@ rootEffects, | ||
}, | ||
{ | ||
provide: CONSOLE, | ||
useFactory: getConsole, | ||
}, | ||
], | ||
@@ -455,5 +468,3 @@ }; | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsModule.ctorParameters = () => []; | ||
@@ -467,23 +478,22 @@ /** | ||
} | ||
/** | ||
* @return {?} | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
function getConsole() { | ||
return console; | ||
} | ||
/** | ||
* @deprecated Since version 4.1. Will be deleted in version 5.0. | ||
* @param {?} action | ||
* @return {?} | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
function toPayload(action) { | ||
return ((action)).payload; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* Generated bundle index. Do not edit. | ||
*/ | ||
export { Effect, getEffectsMetadata, mergeEffects, Actions, EffectsModule, EffectSources, toPayload, ROOT_EFFECTS_INIT, EffectsFeatureModule as ɵd, createSourceInstances as ɵa, getConsole as ɵb, EffectsRootModule as ɵc, EffectsRunner as ɵi, ErrorReporter as ɵh, CONSOLE as ɵg, FEATURE_EFFECTS as ɵf, ROOT_EFFECTS as ɵe }; | ||
export { Effect, getEffectsMetadata, mergeEffects, Actions, ofType, EffectsModule, EffectSources, ROOT_EFFECTS_INIT, EffectsFeatureModule as ɵc, createSourceInstances as ɵa, EffectsRootModule as ɵb, EffectsRunner as ɵf, FEATURE_EFFECTS as ɵe, ROOT_EFFECTS as ɵd }; | ||
//# sourceMappingURL=effects.js.map |
@@ -1,2 +0,1 @@ | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@ngrx/effects"),require("rxjs/observable/defer")):"function"==typeof define&&define.amd?define(["exports","@ngrx/effects","rxjs/observable/defer"],n):n((e.ngrx=e.ngrx||{},e.ngrx.effects=e.ngrx.effects||{},e.ngrx.effects.testing={}),e.ngrx.effects,e.Rx.Observable.defer)}(this,function(e,n,r){"use strict";function t(e){return{provide:n.Actions,useFactory:function(){return"function"==typeof e?new n.Actions(r.defer(e)):new n.Actions(e)}}}e.provideMockActions=t,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=./dist/effects/bundles/effects-testing.umd.min.js.map | ||
!function(e,n){"object"==typeof exports&&"undefined"!=typeof module?n(exports,require("@ngrx/effects"),require("rxjs/observable/defer")):"function"==typeof define&&define.amd?define(["exports","@ngrx/effects","rxjs/observable/defer"],n):n((e.ngrx=e.ngrx||{},e.ngrx.effects=e.ngrx.effects||{},e.ngrx.effects.testing={}),e.ngrx.effects,e.Rx.Observable.defer)}(this,function(e,n,r){"use strict";e.provideMockActions=function(e){return{provide:n.Actions,useFactory:function(){return"function"==typeof e?new n.Actions(r.defer(e)):new n.Actions(e)}}},Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -17,4 +17,11 @@ (function (global, factory) { | ||
})(); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var METADATA_KEY = '__@ngrx/effects__'; | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} sourceProto | ||
@@ -70,2 +77,9 @@ * @return {?} | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
var onRunEffectsKey = 'ngrxOnRunEffects'; | ||
@@ -81,2 +95,6 @@ /** | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @param {?} sourceInstance | ||
@@ -117,2 +135,6 @@ * @return {?} | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var Actions = (function (_super) { | ||
@@ -151,3 +173,3 @@ __extends(Actions, _super); | ||
} | ||
return filter.filter.call(this, function (action) { return allowedTypes.some(function (type) { return type === action.type; }); }); | ||
return ofType.apply(void 0, allowedTypes)(/** @type {?} */ (this.source)); | ||
}; | ||
@@ -159,5 +181,3 @@ return Actions; | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
Actions.ctorParameters = function () { return [ | ||
@@ -167,2 +187,23 @@ { type: Observable.Observable, decorators: [{ type: core.Inject, args: [store.ScannedActionsSubject,] },] }, | ||
/** | ||
* @template T | ||
* @param {...?} allowedTypes | ||
* @return {?} | ||
*/ | ||
function ofType() { | ||
var allowedTypes = []; | ||
for (var _i = 0; _i < arguments.length; _i++) { | ||
allowedTypes[_i] = arguments[_i]; | ||
} | ||
return function ofTypeOperator(source$) { | ||
return filter.filter.call(source$, function (action) { return allowedTypes.some(function (type) { return type === action.type; }); }); | ||
}; | ||
} | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
/** | ||
* @record | ||
*/ | ||
/** | ||
* @param {?} output | ||
@@ -183,9 +224,3 @@ * @param {?} reporter | ||
if (output.notification.kind === 'E') { | ||
var /** @type {?} */ errorReason = "Effect " + getEffectName(output) + " threw an error"; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Error: output.notification.error, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(output.notification.error); | ||
} | ||
@@ -203,9 +238,3 @@ } | ||
if (isInvalidAction) { | ||
var /** @type {?} */ errorReason = "Effect " + getEffectName(output) + " dispatched an invalid action"; | ||
reporter.report(errorReason, { | ||
Source: output.sourceInstance, | ||
Effect: output.effect, | ||
Dispatched: action, | ||
Notification: output.notification, | ||
}); | ||
reporter.handleError(new Error("Effect " + getEffectName(output) + " dispatched an invalid action: " + action)); | ||
} | ||
@@ -230,44 +259,14 @@ } | ||
} | ||
var IMMEDIATE_EFFECTS = new core.InjectionToken('ngrx/effects: Immediate Effects'); | ||
var ROOT_EFFECTS = new core.InjectionToken('ngrx/effects: Root Effects'); | ||
var FEATURE_EFFECTS = new core.InjectionToken('ngrx/effects: Feature Effects'); | ||
var CONSOLE = new core.InjectionToken('Browser Console'); | ||
var ErrorReporter = (function () { | ||
/** | ||
* @param {?} console | ||
*/ | ||
function ErrorReporter(console) { | ||
this.console = console; | ||
} | ||
/** | ||
* @param {?} reason | ||
* @param {?} details | ||
* @return {?} | ||
*/ | ||
ErrorReporter.prototype.report = function (reason, details) { | ||
this.console.group(reason); | ||
for (var /** @type {?} */ key in details) { | ||
this.console.error(key + ":", details[key]); | ||
} | ||
this.console.groupEnd(); | ||
}; | ||
return ErrorReporter; | ||
}()); | ||
ErrorReporter.decorators = [ | ||
{ type: core.Injectable }, | ||
]; | ||
/** | ||
* @nocollapse | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
ErrorReporter.ctorParameters = function () { return [ | ||
{ type: undefined, decorators: [{ type: core.Inject, args: [CONSOLE,] },] }, | ||
]; }; | ||
var EffectSources = (function (_super) { | ||
__extends(EffectSources, _super); | ||
/** | ||
* @param {?} errorReporter | ||
* @param {?} errorHandler | ||
*/ | ||
function EffectSources(errorReporter) { | ||
function EffectSources(errorHandler) { | ||
var _this = _super.call(this) || this; | ||
_this.errorReporter = errorReporter; | ||
_this.errorHandler = errorHandler; | ||
return _this; | ||
@@ -283,2 +282,3 @@ } | ||
/** | ||
* \@internal | ||
* @return {?} | ||
@@ -289,3 +289,3 @@ */ | ||
return mergeMap.mergeMap.call(groupBy.groupBy.call(this, getSourceForInstance), function (source$) { return dematerialize.dematerialize.call(filter.filter.call(map.map.call(exhaustMap.exhaustMap.call(source$, resolveEffectSource), function (output) { | ||
verifyOutput(output, _this.errorReporter); | ||
verifyOutput(output, _this.errorHandler); | ||
return output.notification; | ||
@@ -299,8 +299,17 @@ }), function (notification) { return notification.kind === 'N'; })); }); | ||
]; | ||
/** @nocollapse */ | ||
EffectSources.ctorParameters = function () { return [ | ||
{ type: core.ErrorHandler, }, | ||
]; }; | ||
/** | ||
* @nocollapse | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
EffectSources.ctorParameters = function () { return [ | ||
{ type: ErrorReporter, }, | ||
]; }; | ||
var IMMEDIATE_EFFECTS = new core.InjectionToken('ngrx/effects: Immediate Effects'); | ||
var ROOT_EFFECTS = new core.InjectionToken('ngrx/effects: Root Effects'); | ||
var FEATURE_EFFECTS = new core.InjectionToken('ngrx/effects: Feature Effects'); | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsRunner = (function () { | ||
@@ -340,5 +349,3 @@ /** | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRunner.ctorParameters = function () { return [ | ||
@@ -348,2 +355,6 @@ { type: EffectSources, }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var ROOT_EFFECTS_INIT = '@ngrx/effects/init'; | ||
@@ -356,5 +367,6 @@ var EffectsRootModule = (function () { | ||
* @param {?} rootEffects | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
function EffectsRootModule(sources, runner, store$$1, rootEffects, storeModule) { | ||
function EffectsRootModule(sources, runner, store$$1, rootEffects, storeRootModule, storeFeatureModule) { | ||
this.sources = sources; | ||
@@ -377,5 +389,3 @@ runner.start(); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsRootModule.ctorParameters = function () { return [ | ||
@@ -386,4 +396,9 @@ { type: EffectSources, }, | ||
{ type: Array, decorators: [{ type: core.Inject, args: [ROOT_EFFECTS,] },] }, | ||
{ type: store.StoreModule, decorators: [{ type: core.Optional },] }, | ||
{ type: store.StoreRootModule, decorators: [{ type: core.Optional },] }, | ||
{ type: store.StoreFeatureModule, decorators: [{ type: core.Optional },] }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsFeatureModule = (function () { | ||
@@ -393,5 +408,6 @@ /** | ||
* @param {?} effectSourceGroups | ||
* @param {?} storeModule | ||
* @param {?} storeRootModule | ||
* @param {?} storeFeatureModule | ||
*/ | ||
function EffectsFeatureModule(root, effectSourceGroups, storeModule) { | ||
function EffectsFeatureModule(root, effectSourceGroups, storeRootModule, storeFeatureModule) { | ||
this.root = root; | ||
@@ -405,10 +421,13 @@ effectSourceGroups.forEach(function (group) { return group.forEach(function (effectSourceInstance) { return root.addEffects(effectSourceInstance); }); }); | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsFeatureModule.ctorParameters = function () { return [ | ||
{ type: EffectsRootModule, }, | ||
{ type: Array, decorators: [{ type: core.Inject, args: [FEATURE_EFFECTS,] },] }, | ||
{ type: store.StoreModule, decorators: [{ type: core.Optional },] }, | ||
{ type: store.StoreRootModule, decorators: [{ type: core.Optional },] }, | ||
{ type: store.StoreFeatureModule, decorators: [{ type: core.Optional },] }, | ||
]; }; | ||
/** | ||
* @fileoverview added by tsickle | ||
* @suppress {checkTypes} checked by tsc | ||
*/ | ||
var EffectsModule = (function () { | ||
@@ -445,3 +464,2 @@ function EffectsModule() { | ||
EffectSources, | ||
ErrorReporter, | ||
Actions, | ||
@@ -454,6 +472,2 @@ rootEffects, | ||
}, | ||
{ | ||
provide: CONSOLE, | ||
useFactory: getConsole, | ||
}, | ||
], | ||
@@ -467,5 +481,3 @@ }; | ||
]; | ||
/** | ||
* @nocollapse | ||
*/ | ||
/** @nocollapse */ | ||
EffectsModule.ctorParameters = function () { return []; }; | ||
@@ -483,16 +495,2 @@ /** | ||
} | ||
/** | ||
* @return {?} | ||
*/ | ||
function getConsole() { | ||
return console; | ||
} | ||
/** | ||
* @deprecated Since version 4.1. Will be deleted in version 5.0. | ||
* @param {?} action | ||
* @return {?} | ||
*/ | ||
function toPayload(action) { | ||
return ((action)).payload; | ||
} | ||
@@ -503,15 +501,12 @@ exports.Effect = Effect; | ||
exports.Actions = Actions; | ||
exports.ofType = ofType; | ||
exports.EffectsModule = EffectsModule; | ||
exports.EffectSources = EffectSources; | ||
exports.toPayload = toPayload; | ||
exports.ROOT_EFFECTS_INIT = ROOT_EFFECTS_INIT; | ||
exports.ɵd = EffectsFeatureModule; | ||
exports.ɵc = EffectsFeatureModule; | ||
exports.ɵa = createSourceInstances; | ||
exports.ɵb = getConsole; | ||
exports.ɵc = EffectsRootModule; | ||
exports.ɵi = EffectsRunner; | ||
exports.ɵh = ErrorReporter; | ||
exports.ɵg = CONSOLE; | ||
exports.ɵf = FEATURE_EFFECTS; | ||
exports.ɵe = ROOT_EFFECTS; | ||
exports.ɵb = EffectsRootModule; | ||
exports.ɵf = EffectsRunner; | ||
exports.ɵe = FEATURE_EFFECTS; | ||
exports.ɵd = ROOT_EFFECTS; | ||
@@ -518,0 +513,0 @@ Object.defineProperty(exports, '__esModule', { value: true }); |
@@ -1,2 +0,1 @@ | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],r):r((e.ngrx=e.ngrx||{},e.ngrx.effects={}),e.ngrx.store,e.Rx.Observable,e.Rx.Observable.prototype,e.materialize,e.map,e.ng.core,e.Rx,e.Rx.Observable.prototype,e.groupBy,e.mergeMap,e.exhaustMap,e.dematerialize,e.Subject)}(this,function(e,r,t,o,n,c,i,a,s,u,f,p,l,y){"use strict";function d(e){return e.constructor[R]||[]}function g(e,r){var t=e.constructor,o=t.hasOwnProperty(R)?t[R]:Object.defineProperty(t,R,{value:[]})[R];Array.prototype.push.apply(o,r)}function h(e){var r=(void 0===e?{dispatch:!0}:e).dispatch;return function(e,t){g(e,[{propertyName:t,dispatch:r}])}}function v(e){return Object.getPrototypeOf(e)}function m(e){var r={};return w(e).forEach(function(e){var t=e.propertyName,o=e.dispatch;r[t]={dispatch:o}}),r}function x(e){var r=v(e);return z in r&&"function"==typeof r[z]}function j(e){var r=v(e).constructor.name,i=w(e).map(function(t){var i=t.propertyName,a=t.dispatch,s="function"==typeof e[i]?e[i]():e[i];if(!1===a)return o.ignoreElements.call(s);var u=n.materialize.call(s);return c.map.call(u,function(t){return{effect:e[i],notification:t,propertyName:i,sourceName:r,sourceInstance:e}})});return t.merge.apply(void 0,i)}function b(e){var r=j(e);return x(e)?e.ngrxOnRunEffects(r):r}function E(e,r){O(e,r),S(e,r)}function O(e,r){if("E"===e.notification.kind){var t="Effect "+M(e)+" threw an error";r.report(t,{Source:e.sourceInstance,Effect:e.effect,Error:e.notification.error,Notification:e.notification})}}function S(e,r){if("N"===e.notification.kind){var t=e.notification.value;if(!I(t)){var o="Effect "+M(e)+" dispatched an invalid action";r.report(o,{Source:e.sourceInstance,Effect:e.effect,Dispatched:t,Notification:e.notification})}}}function I(e){return e&&e.type&&"string"==typeof e.type}function M(e){var r=e.propertyName,t=e.sourceInstance;return'"'+e.sourceName+"."+r+("function"==typeof t[r]?"()":"")+'"'}function _(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e}function N(){return console}function P(e){return e.payload}var q=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),R="__@ngrx/effects__",w=r.compose(d,v),z="ngrxOnRunEffects",A=function(e){function r(r){var t=e.call(this)||this;return r&&(t.source=r),t}return q(r,e),r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.ofType=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return s.filter.call(this,function(r){return e.some(function(e){return e===r.type})})},r}(a.Observable);A.decorators=[{type:i.Injectable}],A.ctorParameters=function(){return[{type:a.Observable,decorators:[{type:i.Inject,args:[r.ScannedActionsSubject]}]}]};var T=(new i.InjectionToken("ngrx/effects: Immediate Effects"),new i.InjectionToken("ngrx/effects: Root Effects")),k=new i.InjectionToken("ngrx/effects: Feature Effects"),F=new i.InjectionToken("Browser Console"),B=function(){function e(e){this.console=e}return e.prototype.report=function(e,r){this.console.group(e);for(var t in r)this.console.error(t+":",r[t]);this.console.groupEnd()},e}();B.decorators=[{type:i.Injectable}],B.ctorParameters=function(){return[{type:void 0,decorators:[{type:i.Inject,args:[F]}]}]};var C=function(e){function r(r){var t=e.call(this)||this;return t.errorReporter=r,t}return q(r,e),r.prototype.addEffects=function(e){this.next(e)},r.prototype.toActions=function(){var e=this;return f.mergeMap.call(u.groupBy.call(this,v),function(r){return l.dematerialize.call(s.filter.call(c.map.call(p.exhaustMap.call(r,b),function(r){return E(r,e.errorReporter),r.notification}),function(e){return"N"===e.kind}))})},r}(y.Subject);C.decorators=[{type:i.Injectable}],C.ctorParameters=function(){return[{type:B}]};var D=function(){function e(e,r){this.effectSources=e,this.store=r,this.effectsSubscription=null}return e.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},e.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},e}();D.decorators=[{type:i.Injectable}],D.ctorParameters=function(){return[{type:C},{type:r.Store}]};var G="@ngrx/effects/init",H=function(){function e(e,r,t,o,n){this.sources=e,r.start(),o.forEach(function(r){return e.addEffects(r)}),t.dispatch({type:G})}return e.prototype.addEffects=function(e){this.sources.addEffects(e)},e}();H.decorators=[{type:i.NgModule,args:[{}]}],H.ctorParameters=function(){return[{type:C},{type:D},{type:r.Store},{type:Array,decorators:[{type:i.Inject,args:[T]}]},{type:r.StoreModule,decorators:[{type:i.Optional}]}]};var J=function(){function e(e,r,t){this.root=e,r.forEach(function(r){return r.forEach(function(r){return e.addEffects(r)})})}return e}();J.decorators=[{type:i.NgModule,args:[{}]}],J.ctorParameters=function(){return[{type:H},{type:Array,decorators:[{type:i.Inject,args:[k]}]},{type:r.StoreModule,decorators:[{type:i.Optional}]}]};var K=function(){function e(){}return e.forFeature=function(e){return{ngModule:J,providers:[e,{provide:k,multi:!0,deps:e,useFactory:_}]}},e.forRoot=function(e){return{ngModule:H,providers:[D,C,B,A,e,{provide:T,deps:e,useFactory:_},{provide:F,useFactory:N}]}},e}();K.decorators=[{type:i.NgModule,args:[{}]}],K.ctorParameters=function(){return[]},e.Effect=h,e.getEffectsMetadata=m,e.mergeEffects=j,e.Actions=A,e.EffectsModule=K,e.EffectSources=C,e.toPayload=P,e.ROOT_EFFECTS_INIT=G,e.ɵd=J,e.ɵa=_,e.ɵb=N,e.ɵc=H,e.ɵi=D,e.ɵh=B,e.ɵg=F,e.ɵf=k,e.ɵe=T,Object.defineProperty(e,"__esModule",{value:!0})}); | ||
//# sourceMappingURL=./dist/effects/bundles/effects.umd.min.js.map | ||
!function(e,r){"object"==typeof exports&&"undefined"!=typeof module?r(exports,require("@ngrx/store"),require("rxjs/observable/merge"),require("rxjs/operator/ignoreElements"),require("rxjs/operator/materialize"),require("rxjs/operator/map"),require("@angular/core"),require("rxjs/Observable"),require("rxjs/operator/filter"),require("rxjs/operator/groupBy"),require("rxjs/operator/mergeMap"),require("rxjs/operator/exhaustMap"),require("rxjs/operator/dematerialize"),require("rxjs/Subject")):"function"==typeof define&&define.amd?define(["exports","@ngrx/store","rxjs/observable/merge","rxjs/operator/ignoreElements","rxjs/operator/materialize","rxjs/operator/map","@angular/core","rxjs/Observable","rxjs/operator/filter","rxjs/operator/groupBy","rxjs/operator/mergeMap","rxjs/operator/exhaustMap","rxjs/operator/dematerialize","rxjs/Subject"],r):r((e.ngrx=e.ngrx||{},e.ngrx.effects={}),e.ngrx.store,e.Rx.Observable,e.Rx.Observable.prototype,e.materialize,e.map,e.ng.core,e.Rx,e.Rx.Observable.prototype,e.groupBy,e.mergeMap,e.exhaustMap,e.dematerialize,e.Subject)}(this,function(e,r,t,o,n,c,a,i,u,s,f,p,l,d){"use strict";function y(e){var r=(void 0===e?{dispatch:!0}:e).dispatch;return function(e,t){!function(e,r){var t=e.constructor,o=t.hasOwnProperty(E)?t[E]:Object.defineProperty(t,E,{value:[]})[E];Array.prototype.push.apply(o,r)}(e,[{propertyName:t,dispatch:r}])}}function g(e){return Object.getPrototypeOf(e)}function h(e){var r=g(e).constructor.name,a=O(e).map(function(t){var a=t.propertyName,i=t.dispatch,u="function"==typeof e[a]?e[a]():e[a];if(!1===i)return o.ignoreElements.call(u);var s=n.materialize.call(u);return c.map.call(s,function(t){return{effect:e[a],notification:t,propertyName:a,sourceName:r,sourceInstance:e}})});return t.merge.apply(void 0,a)}function x(e){var r=h(e);return function(e){var r=g(e);return S in r&&"function"==typeof r[S]}(e)?e.ngrxOnRunEffects(r):r}function m(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return function(r){return u.filter.call(r,function(r){return e.some(function(e){return e===r.type})})}}function v(e,r){!function(e,r){"E"===e.notification.kind&&r.handleError(e.notification.error)}(e,r),function(e,r){if("N"===e.notification.kind){var t=e.notification.value;!function(e){return e&&e.type&&"string"==typeof e.type}(t)&&r.handleError(new Error("Effect "+function(e){var r=e.propertyName,t=e.sourceInstance,o=e.sourceName,n="function"==typeof t[r];return'"'+o+"."+r+(n?"()":"")+'"'}(e)+" dispatched an invalid action: "+t))}}(e,r)}function b(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return e}var j=function(){var e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,r){e.__proto__=r}||function(e,r){for(var t in r)r.hasOwnProperty(t)&&(e[t]=r[t])};return function(r,t){function o(){this.constructor=r}e(r,t),r.prototype=null===t?Object.create(t):(o.prototype=t.prototype,new o)}}(),E="__@ngrx/effects__",O=r.compose(function(e){return e.constructor[E]||[]},g),S="ngrxOnRunEffects",M=function(e){function r(r){var t=e.call(this)||this;return r&&(t.source=r),t}return j(r,e),r.prototype.lift=function(e){var t=new r;return t.source=this,t.operator=e,t},r.prototype.ofType=function(){for(var e=[],r=0;r<arguments.length;r++)e[r]=arguments[r];return m.apply(void 0,e)(this.source)},r}(i.Observable);M.decorators=[{type:a.Injectable}],M.ctorParameters=function(){return[{type:i.Observable,decorators:[{type:a.Inject,args:[r.ScannedActionsSubject]}]}]};var _=function(e){function r(r){var t=e.call(this)||this;return t.errorHandler=r,t}return j(r,e),r.prototype.addEffects=function(e){this.next(e)},r.prototype.toActions=function(){var e=this;return f.mergeMap.call(s.groupBy.call(this,g),function(r){return l.dematerialize.call(u.filter.call(c.map.call(p.exhaustMap.call(r,x),function(r){return v(r,e.errorHandler),r.notification}),function(e){return"N"===e.kind}))})},r}(d.Subject);_.decorators=[{type:a.Injectable}],_.ctorParameters=function(){return[{type:a.ErrorHandler}]};new a.InjectionToken("ngrx/effects: Immediate Effects");var I=new a.InjectionToken("ngrx/effects: Root Effects"),q=new a.InjectionToken("ngrx/effects: Feature Effects"),N=function(){function e(e,r){this.effectSources=e,this.store=r,this.effectsSubscription=null}return e.prototype.start=function(){this.effectsSubscription||(this.effectsSubscription=this.effectSources.toActions().subscribe(this.store))},e.prototype.ngOnDestroy=function(){this.effectsSubscription&&(this.effectsSubscription.unsubscribe(),this.effectsSubscription=null)},e}();N.decorators=[{type:a.Injectable}],N.ctorParameters=function(){return[{type:_},{type:r.Store}]};var P="@ngrx/effects/init",R=function(){function e(e,r,t,o,n,c){this.sources=e,r.start(),o.forEach(function(r){return e.addEffects(r)}),t.dispatch({type:P})}return e.prototype.addEffects=function(e){this.sources.addEffects(e)},e}();R.decorators=[{type:a.NgModule,args:[{}]}],R.ctorParameters=function(){return[{type:_},{type:N},{type:r.Store},{type:Array,decorators:[{type:a.Inject,args:[I]}]},{type:r.StoreRootModule,decorators:[{type:a.Optional}]},{type:r.StoreFeatureModule,decorators:[{type:a.Optional}]}]};var w=function(){return function(e,r,t,o){this.root=e,r.forEach(function(r){return r.forEach(function(r){return e.addEffects(r)})})}}();w.decorators=[{type:a.NgModule,args:[{}]}],w.ctorParameters=function(){return[{type:R},{type:Array,decorators:[{type:a.Inject,args:[q]}]},{type:r.StoreRootModule,decorators:[{type:a.Optional}]},{type:r.StoreFeatureModule,decorators:[{type:a.Optional}]}]};var z=function(){function e(){}return e.forFeature=function(e){return{ngModule:w,providers:[e,{provide:q,multi:!0,deps:e,useFactory:b}]}},e.forRoot=function(e){return{ngModule:R,providers:[N,_,M,e,{provide:I,deps:e,useFactory:b}]}},e}();z.decorators=[{type:a.NgModule,args:[{}]}],z.ctorParameters=function(){return[]},e.Effect=y,e.getEffectsMetadata=function(e){var r={};return O(e).forEach(function(e){var t=e.propertyName,o=e.dispatch;r[t]={dispatch:o}}),r},e.mergeEffects=h,e.Actions=M,e.ofType=m,e.EffectsModule=z,e.EffectSources=_,e.ROOT_EFFECTS_INIT=P,e.ɵc=w,e.ɵa=b,e.ɵb=R,e.ɵf=N,e.ɵe=q,e.ɵd=I,Object.defineProperty(e,"__esModule",{value:!0})}); |
@@ -5,7 +5,6 @@ /** | ||
export * from './public_api'; | ||
export { EffectsFeatureModule as ɵd } from './src/effects_feature_module'; | ||
export { createSourceInstances as ɵa, getConsole as ɵb } from './src/effects_module'; | ||
export { EffectsRootModule as ɵc } from './src/effects_root_module'; | ||
export { EffectsRunner as ɵi } from './src/effects_runner'; | ||
export { ErrorReporter as ɵh } from './src/error_reporter'; | ||
export { CONSOLE as ɵg, FEATURE_EFFECTS as ɵf, ROOT_EFFECTS as ɵe } from './src/tokens'; | ||
export { EffectsFeatureModule as ɵc } from './src/effects_feature_module'; | ||
export { createSourceInstances as ɵa } from './src/effects_module'; | ||
export { EffectsRootModule as ɵb } from './src/effects_root_module'; | ||
export { EffectsRunner as ɵf } from './src/effects_runner'; | ||
export { FEATURE_EFFECTS as ɵe, ROOT_EFFECTS as ɵd } from './src/tokens'; |
@@ -1,1 +0,1 @@ | ||
{"__symbolic":"module","version":3,"metadata":{"ɵa":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"ɵb":{"__symbolic":"function","parameters":[],"value":{"__symbolic":"reference","name":"console"}},"ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵe"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵi"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreModule"}]}],"addEffects":[{"__symbolic":"method"}]}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{"dispatch":true}],"value":{"__symbolic":"error","message":"Function call not supported","line":28,"character":9,"module":"./src/effects_metadata"}},"EffectsMetadata":{"__symbolic":"interface"},"getEffectsMetadata":{"__symbolic":"function"},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject"}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":8,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}],"ofType":[{"__symbolic":"method"}]}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵd"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵf"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵc"},"providers":[{"__symbolic":"reference","name":"ɵi"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵh"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵe"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}},{"provide":{"__symbolic":"reference","name":"ɵg"},"useFactory":{"__symbolic":"reference","name":"ɵb"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs/Subject","name":"Subject"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"ɵh"}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"OnRunEffects":{"__symbolic":"interface"},"toPayload":{"__symbolic":"function","parameters":["action"],"value":{"__symbolic":"select","expression":{"__symbolic":"reference","name":"action"},"member":"payload"}},"EffectNotification":{"__symbolic":"interface"},"ROOT_EFFECTS_INIT":"@ngrx/effects/init","ɵd":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵf"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"ɵc"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreModule"}]}]}},"ɵe":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Root Effects"]},"ɵf":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Feature Effects"]},"ɵg":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["Browser Console"]},"ɵh":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵg"}]}]],"parameters":[{"__symbolic":"reference","name":"any"}]}],"report":[{"__symbolic":"method"}]}},"ɵi":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/effects_module","ɵb":"./src/effects_module","ɵc":"./src/effects_root_module","Effect":"./src/effects_metadata","EffectsMetadata":"./src/effects_metadata","getEffectsMetadata":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","OnRunEffects":"./src/on_run_effects","toPayload":"./src/util","EffectNotification":"./src/effect_notification","ROOT_EFFECTS_INIT":"./src/effects_root_module","ɵd":"./src/effects_feature_module","ɵe":"./src/tokens","ɵf":"./src/tokens","ɵg":"./src/tokens","ɵh":"./src/error_reporter","ɵi":"./src/effects_runner"},"importAs":"@ngrx/effects"} | ||
{"__symbolic":"module","version":4,"metadata":{"ɵa":{"__symbolic":"function","parameters":["instances"],"value":{"__symbolic":"reference","name":"instances"}},"ɵb":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,null,null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵd"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule"},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule"}]}],"addEffects":[{"__symbolic":"method"}]}},"Effect":{"__symbolic":"function","parameters":["dispatch"],"defaults":[{"dispatch":true}],"value":{"__symbolic":"error","message":"Function call not supported","line":28,"character":9,"module":"./src/effects_metadata"}},"EffectsMetadata":{"__symbolic":"interface"},"getEffectsMetadata":{"__symbolic":"function"},"mergeEffects":{"__symbolic":"function"},"Actions":{"__symbolic":"class","arity":1,"extends":{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","module":"@ngrx/store","name":"ScannedActionsSubject"}]}]],"parameters":[{"__symbolic":"reference","name":"Observable","module":"rxjs/Observable","arguments":[{"__symbolic":"error","message":"Could not resolve type","line":9,"character":65,"context":{"typeName":"V"},"module":"./src/actions"}]}]}],"lift":[{"__symbolic":"method"}],"ofType":[{"__symbolic":"method"}]}},"ofType":{"__symbolic":"function","parameters":["allowedTypes"],"value":{"__symbolic":"error","message":"Function call not supported","line":30,"character":9,"module":"./src/actions"}},"EffectsModule":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{},"statics":{"forFeature":{"__symbolic":"function","parameters":["featureEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵc"},"providers":[{"__symbolic":"reference","name":"featureEffects"},{"provide":{"__symbolic":"reference","name":"ɵe"},"multi":true,"deps":{"__symbolic":"reference","name":"featureEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}}]}},"forRoot":{"__symbolic":"function","parameters":["rootEffects"],"value":{"ngModule":{"__symbolic":"reference","name":"ɵb"},"providers":[{"__symbolic":"reference","name":"ɵf"},{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Actions"},{"__symbolic":"reference","name":"rootEffects"},{"provide":{"__symbolic":"reference","name":"ɵd"},"deps":{"__symbolic":"reference","name":"rootEffects"},"useFactory":{"__symbolic":"reference","name":"ɵa"}}]}}}},"EffectSources":{"__symbolic":"class","extends":{"__symbolic":"reference","module":"rxjs/Subject","name":"Subject"},"decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","module":"@angular/core","name":"ErrorHandler"}]}],"addEffects":[{"__symbolic":"method"}],"toActions":[{"__symbolic":"method"}]}},"OnRunEffects":{"__symbolic":"interface"},"EffectNotification":{"__symbolic":"interface"},"ROOT_EFFECTS_INIT":"@ngrx/effects/init","ɵc":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"NgModule"},"arguments":[{}]}],"members":{"__ctor__":[{"__symbolic":"constructor","parameterDecorators":[null,[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Inject"},"arguments":[{"__symbolic":"reference","name":"ɵe"}]}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}],[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Optional"}}]],"parameters":[{"__symbolic":"reference","name":"ɵb"},{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"Array","arguments":[{"__symbolic":"reference","name":"any"}]}]},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreRootModule"},{"__symbolic":"reference","module":"@ngrx/store","name":"StoreFeatureModule"}]}]}},"ɵd":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Root Effects"]},"ɵe":{"__symbolic":"new","expression":{"__symbolic":"reference","module":"@angular/core","name":"InjectionToken"},"arguments":["ngrx/effects: Feature Effects"]},"ɵf":{"__symbolic":"class","decorators":[{"__symbolic":"call","expression":{"__symbolic":"reference","module":"@angular/core","name":"Injectable"}}],"members":{"__ctor__":[{"__symbolic":"constructor","parameters":[{"__symbolic":"reference","name":"EffectSources"},{"__symbolic":"reference","name":"Store","module":"@ngrx/store","arguments":[{"__symbolic":"reference","name":"any"}]}]}],"start":[{"__symbolic":"method"}],"ngOnDestroy":[{"__symbolic":"method"}]}}},"origins":{"ɵa":"./src/effects_module","ɵb":"./src/effects_root_module","Effect":"./src/effects_metadata","EffectsMetadata":"./src/effects_metadata","getEffectsMetadata":"./src/effects_metadata","mergeEffects":"./src/effects_resolver","Actions":"./src/actions","ofType":"./src/actions","EffectsModule":"./src/effects_module","EffectSources":"./src/effect_sources","OnRunEffects":"./src/on_run_effects","EffectNotification":"./src/effect_notification","ROOT_EFFECTS_INIT":"./src/effects_root_module","ɵc":"./src/effects_feature_module","ɵd":"./src/tokens","ɵe":"./src/tokens","ɵf":"./src/effects_runner"},"importAs":"@ngrx/effects"} |
{ | ||
"name": "@ngrx/effects", | ||
"version": "4.1.1", | ||
"version": "5.0.0", | ||
"description": "Side effect model for @ngrx/store", | ||
@@ -18,6 +18,6 @@ "module": "@ngrx/effects.es5.js", | ||
"peerDependencies": { | ||
"@angular/core": "^4.0.0 || ^5.0.0-rc.2 || ^5.0.0", | ||
"@ngrx/store": "^4.0.0", | ||
"rxjs": "^5.0.0" | ||
"@angular/core": "^5.0.0", | ||
"@ngrx/store": "^5.0.0-alpha.0", | ||
"rxjs": "^5.5.0" | ||
} | ||
} |
@@ -9,1 +9,2 @@ import { Action } from '@ngrx/store'; | ||
} | ||
export declare function ofType<T extends Action>(...allowedTypes: string[]): (source$: Actions<T>) => Actions<T>; |
import { Observable } from 'rxjs/Observable'; | ||
import { Notification } from 'rxjs/Notification'; | ||
import { Action } from '@ngrx/store'; | ||
import { ErrorReporter } from './error_reporter'; | ||
import { ErrorHandler } from '@angular/core'; | ||
export interface EffectNotification { | ||
@@ -12,2 +12,2 @@ effect: Observable<any> | (() => Observable<any>); | ||
} | ||
export declare function verifyOutput(output: EffectNotification, reporter: ErrorReporter): void; | ||
export declare function verifyOutput(output: EffectNotification, reporter: ErrorHandler): void; |
@@ -1,13 +0,7 @@ | ||
import { Observable } from 'rxjs/Observable'; | ||
import { Subject } from 'rxjs/Subject'; | ||
import { Action } from '@ngrx/store'; | ||
import { ErrorReporter } from './error_reporter'; | ||
import { ErrorHandler } from '@angular/core'; | ||
export declare class EffectSources extends Subject<any> { | ||
private errorReporter; | ||
constructor(errorReporter: ErrorReporter); | ||
private errorHandler; | ||
constructor(errorHandler: ErrorHandler); | ||
addEffects(effectSourceInstance: any): void; | ||
/** | ||
* @private | ||
*/ | ||
toActions(): Observable<Action>; | ||
} |
@@ -1,6 +0,6 @@ | ||
import { StoreModule } from '@ngrx/store'; | ||
import { StoreRootModule, StoreFeatureModule } from '@ngrx/store'; | ||
import { EffectsRootModule } from './effects_root_module'; | ||
export declare class EffectsFeatureModule { | ||
private root; | ||
constructor(root: EffectsRootModule, effectSourceGroups: any[][], storeModule: StoreModule); | ||
constructor(root: EffectsRootModule, effectSourceGroups: any[][], storeRootModule: StoreRootModule, storeFeatureModule: StoreFeatureModule); | ||
} |
@@ -7,2 +7,1 @@ import { ModuleWithProviders, Type } from '@angular/core'; | ||
export declare function createSourceInstances(...instances: any[]): any[]; | ||
export declare function getConsole(): Console; |
@@ -1,2 +0,2 @@ | ||
import { StoreModule, Store } from '@ngrx/store'; | ||
import { Store, StoreRootModule, StoreFeatureModule } from '@ngrx/store'; | ||
import { EffectsRunner } from './effects_runner'; | ||
@@ -7,4 +7,4 @@ import { EffectSources } from './effect_sources'; | ||
private sources; | ||
constructor(sources: EffectSources, runner: EffectsRunner, store: Store<any>, rootEffects: any[], storeModule: StoreModule); | ||
constructor(sources: EffectSources, runner: EffectsRunner, store: Store<any>, rootEffects: any[], storeRootModule: StoreRootModule, storeFeatureModule: StoreFeatureModule); | ||
addEffects(effectSourceInstance: any): void; | ||
} |
export { Effect, EffectsMetadata, getEffectsMetadata } from './effects_metadata'; | ||
export { mergeEffects } from './effects_resolver'; | ||
export { Actions } from './actions'; | ||
export { Actions, ofType } from './actions'; | ||
export { EffectsModule } from './effects_module'; | ||
export { EffectSources } from './effect_sources'; | ||
export { OnRunEffects } from './on_run_effects'; | ||
export { toPayload } from './util'; | ||
export { EffectNotification } from './effect_notification'; | ||
export { ROOT_EFFECTS_INIT } from './effects_root_module'; |
@@ -5,2 +5,1 @@ import { InjectionToken, Type } from '@angular/core'; | ||
export declare const FEATURE_EFFECTS: InjectionToken<any[][]>; | ||
export declare const CONSOLE: InjectionToken<Console>; |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{"provideMockActions":{"__symbolic":"function","parameters":["factoryOrSource"],"value":{"__symbolic":"error","message":"Function call not supported","line":12,"character":16}}}},{"__symbolic":"module","version":1,"metadata":{"provideMockActions":{"__symbolic":"function","parameters":["factoryOrSource"],"value":{"__symbolic":"error","message":"Function call not supported","line":12,"character":16}}}}] | ||
[{"__symbolic":"module","version":4,"metadata":{"provideMockActions":{"__symbolic":"function","parameters":["factoryOrSource"],"value":{"__symbolic":"error","message":"Function call not supported","line":12,"character":16}}}}] |
@@ -1,1 +0,1 @@ | ||
[{"__symbolic":"module","version":3,"metadata":{},"exports":[{"from":"./src/testing"}]},{"__symbolic":"module","version":1,"metadata":{},"exports":[{"from":"./src/testing"}]}] | ||
[{"__symbolic":"module","version":4,"metadata":{},"exports":[{"from":"./src/testing"}]}] |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
147705
44
1612