如何解决Webstorm 无法识别我的 ngrx/effect
此效果正常运行,但 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 并重新安装所有节点包为我解决了问题。
版权声明:本文内容由互联网用户自发贡献,该文观点与技术仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 dio@foxmail.com 举报,一经查实,本站将立刻删除。