angular - Webstorm 无法识别我的ngrx/效果
问题描述
此效果正常运行,但 webstorm 似乎无法识别它。
sendUserName$ = createEffect(() =>
this.actions$.pipe(
ofType(sendUserName),
map((action) => {
return this.usernameService.SearchUserName(action.username).pipe(
map((result) => of(sendUserNameSuccess({found: result.found}))),
catchError((error: HttpErrorResponse) => of(sendUserNameFail({error: error.message})))
);
})
));
错误信息是:
Argument type () => Observable<Observable<({error: string} & TypedAction<"[app] Send user name failed">) | Observable<{found: boolean} & TypedAction<"[app] Send user name success">>>> is not assignable to parameter type () => (EffectResult<ObservableType<DispatchType<EffectConfig>, OT>> & ConditionallyDisallowActionCreator<DispatchType<EffectConfig>, EffectResult<ObservableType<DispatchType<EffectConfig>, OT>>>)
有谁知道这意味着什么以及如何解决它?
解决方案
我有同样的问题,删除 node_modules 并重新安装所有节点包为我解决了这个问题。
推荐阅读
- prolog - 如何在序言中打印空格
- sql - ORACLE中这个运行4秒左右的SQL语句如何优化?我想查询少用点时间
- java - 我无法使用 Android Studio Java 将用户添加到 Firebase Authetnication
- c++ - C++ 插入运算符 << 有两个整数
- clojure - 如何修复这个宏?
- sockets - 在 Flutter 中使用 listen() 从 TCP Socket 获取数据
- python - 如何从 Cython 中的数组列表中检索数组条目
- c - 程序以错误的方式打印字符串。字符串
- javascript - 当用户在 React 中关闭选项卡时如何删除 Firestore 文档?
- docker - 如何使用 docker 在 alpine 图像上以 root 用户身份运行 bash?su:必须 suid 才能正常工作