欢迎各位兄弟 发布技术文章

这里的技术是共享的

You are here

import toPayload Module @ngrx/effects/effects has no exported member 'toPayload'.ts(2305) 有大用 有大大用

突破性变化

  • 效果:toPayload已删除@ ngrx / effects v4.0中不推荐使用的实用程序功能

    之前:

    ' @ ngrx / effects '导入 { toPayload } ; 
    
    actions $ofType' SOME_ACTION ')。maptoPayload);

    后:

    actions $ 
      。ofType' SOME_ACTION '
      。地图((动作 SomeActionWithPayload=>  动作有效载荷);
  • ErrorHandler: ErrorReporter已从angular / core中替换为ErrorHandler。

之前:

错误已报告给ngrx / effects ErrorReporter。默认情况下,ErrorReporter会登录到控制台。

后:

现在将错误报告给@ angular / core ErrorHandler。

  • 商店:更新RxJS依赖关系的最低版本。

来自 https://github.com/ngrx/platform/blob/master/CHANGELOG.md


BREAKING CHANGES

  • Effects: The utility function toPayload, deprecated in @ngrx/effects v4.0, has been removed.

    Before:

    import { toPayload } from '@ngrx/effects';
    
    actions$.ofType('SOME_ACTION').map(toPayload);

    After:

    actions$
      .ofType('SOME_ACTION')
      .map((action: SomeActionWithPayload) => action.payload);
  • ErrorHandler: The ErrorReporter has been replaced with ErrorHandler from angular/core.

BEFORE:

Errors were reported to the ngrx/effects ErrorReporter. The ErrorReporter would log to the console by default.

AFTER:

Errors are now reported to the @angular/core ErrorHandler.

  • Store: Updates minimum version of RxJS dependency.

BEFORE:

Minimum peer dependency of RxJS ^5.0.0

AFTER:

Minimum peer dependency of RxJS ^5.5.0

  • Effects: Updates minimum version of RxJS dependency.

BEFORE:

Minimum peer dependency of RxJS ^5.0.0

AFTER:

Minimum peer dependency of RxJS ^5.5.0

来自   https://github.com/ngrx/platform/blob/master/CHANGELOG.md



普通分类: