I am using ngrx / effects.
After upgrading rxjs from 5.0.0-beta.12 to 5.0.0-rc.1, my WebStorm IDE gives me the error below (red underline). And when I run the application, the same error is also displayed in the terminal.
The supplied parameters do not match any target call signature.

@Effect() updateProfile$ = this.actions$ .ofType(ProfileActions.PROFILE_UPDATE_PROFILE) .map<string>(toPayload) .switchMap(name => this.profileService.updateProfile(name) .map(name => ({ type: ProfileActions.PROFILE_UPDATE_PROFILE_SUCCESS, payload: name })) .catch(error => Observable.of({ type: ProfileActions.PROFILE_UPDATE_PROFILE_FAIL, payload: error })) );
.
updateProfile(name: string): Observable<string> { return Observable.of(name); }
This error occurs when I use map<string>(toPayload) . I tried switching to .map<any>(action => action.payload) , but still the same error.
Effects without map<string>(toPayload) do not give an error.
Although this gives me an error, the application still works well.
How to solve this problem?
angular typescript rxjs5 ngrx
Hongbo miao
source share