Argument of type 'stateProps' is not assignable to parameter of type 'AnyAction'

Viewed 24

I am building a Netflix clone project with nextjs and typescript to learn more about typescript and redux toolkit. I am trying to call a createasyncthunk function with dispatch and getting an error

error

(alias) getHeroMovie(state: stateProps | undefined, action: AnyAction): stateProps import getHeroMovie The argument of type 'stateProps' is not assignable to the parameter of type 'AnyAction'. Property 'type' is missing in type 'stateProps' but required in type 'AnyAction'.ts(2345) index.d.ts(19, 3): 'type' is declared here. Expected 2 arguments, but got 0.ts(2554) index.d.ts(103, 3): An argument for 'state' was not provided.

error

homeSlice.tsx

if you need more information, here is the GitHub repo - https://github.com/shokes/Netflix-ts thank you.

0 Answers
Related