Q:

Can't access action.payload of ActionCreator created using Redux Toolkit

I can't seem to access the payload of an action created using RTK slice in a redux-observable pipe. I wonder if redux-observable is designed to work together with RTK at all, and whether I should switch to typesafe-actions instead.
export const signUrlsEpic = (action$: Observable<Action>): Observable<Action> =>
  action$.pipe(
    ofType(actions.getPresignedUrls),
    exhaustMap((action.payload) => // <- Here: Property 'payload' does not exist on type 'Action<any>'
      from(api.getPresignedUrls(action.arguments)).pipe(
        map((response) => {
          console.log(response)
          return actions.setPresignedUrls(response)
        })
      )
    )
  )

The action is exported from the slice.actions. I tried to cast the action as ActionCreatorWithPayload but it didn't help.

A:

Actually the error was quite obvious! The reason the payload was not available was because I declared the type to be Observable<Action>. It should've been declared Observable<PayloadAction>.

