簡體   English   中英

Webstorm 無法識別我的 ngrx/effect

[英]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 並重新安裝所有節點包為我解決了這個問題。

我們的解決方案是在 Intellij 屬性中啟用“TypeScript 語言服務”。

在此處輸入圖像描述

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM