From b390ef5c575160135f9a8c0e9fcadf88ca11e97e Mon Sep 17 00:00:00 2001 From: Brandon Date: Sun, 21 Jan 2018 20:17:25 -0800 Subject: [PATCH] fix(Effects): Remove toPayload utility function (#738) BREAKING CHANGE: The utility function `toPayload`, deprecated in @ngrx/effects v4.0, has been removed. Before: ```ts import { toPayload } from '@ngrx/effects'; actions$.ofType('SOME_ACTION').map(toPayload); ``` After: ```ts actions$.ofType('SOME_ACTION').map((action: SomeActionWithPayload) => action.payload) ``` --- modules/effects/src/index.ts | 1 - modules/effects/src/util.ts | 8 -------- 2 files changed, 9 deletions(-) delete mode 100644 modules/effects/src/util.ts diff --git a/modules/effects/src/index.ts b/modules/effects/src/index.ts index 7f833ae971..606fb6657e 100644 --- a/modules/effects/src/index.ts +++ b/modules/effects/src/index.ts @@ -8,6 +8,5 @@ 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'; diff --git a/modules/effects/src/util.ts b/modules/effects/src/util.ts deleted file mode 100644 index 7d16afe501..0000000000 --- a/modules/effects/src/util.ts +++ /dev/null @@ -1,8 +0,0 @@ -import { Action } from '@ngrx/store'; - -/** - * @deprecated Since version 4.1. Will be deleted in version 5.0. - */ -export function toPayload(action: Action): any { - return (action as any).payload; -}