[英]Webstorm does not recognize my 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 並重新安裝所有節點包為我解決了這個問題。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.