use*_*257 5 ngrx-effects angular
该效果正常运行,但 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})))
);
})
));
Run Code Online (Sandbox Code Playgroud)
错误信息是:
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>>>)
Run Code Online (Sandbox Code Playgroud)
有谁知道这意味着什么以及如何解决它?
| 归档时间: |
|
| 查看次数: |
915 次 |
| 最近记录: |