I recently encountered an error in my code when I didn't type the dispatch function as "any". To resolve this, I typed it as any. However, I'm curious to know the correct way to type it using TypeScript.
export function doThing() {
console.log("works")
return (dispatch:any) => {
fetch('https://whatever.com/some-api').then((response) => {
return response.json()
}).then((data) => {
dispatch(pingApiAction(data))
})
};
}