Hongbo Miao Hongbo Miao - 1 year ago 213
TypeScript Question

ngrx: Supplied parameters do not match any signature of call target

I am using ngrx/effects.

After updating rxjs from 5.0.0-beta.12 to 5.0.0-rc.1, my IDE WebStorm gives me the error below (red underline). And when I run my app, the same error also shows in the terminal.

Supplied parameters do not match any signature of call target.

enter image description here

@Effect() updateProfile$ = this.actions$
.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 happens whenever I use
    . I tried to change to
    .map<any>(action => action.payload)
    , but still same error.

  • The effects without
    won't give the

Although it gives me the error, the app still runs well.

How to solve this issue?

Answer Source

In rxjs 5.0.0-rc.1 the generic type parameters for all operators were changed to accept the type of the source observable first.

You will need to change the map operator call accordingly:

  .map<Action, string>(toPayload)
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download