I upgraded a couple of packages and suddenly received like 100 errors all similar to this:
TS2769: No overload matches this call.
Overload 1 of 3, '(thunkAction: ThunkAction<void, CombinedState<{ auth: AuthState; toastMessages: ToastMessageState; collections: CollectionsState; config: InitialState; ... 6 more ...; toolKitTypes: InitialState; }>, void, AnyAction>): void', gave the following error.
Argument of type '(dispatch: ThunkDispatch<AppState, null, ToastMessagesActionTypes>) => void' is not assignable to parameter of type 'ThunkAction<void, CombinedState<{ auth: AuthState; toastMessages: ToastMessageState; collections: CollectionsState; config: InitialState; ... 6 more ...; toolKitTypes: InitialState; }>, void, AnyAction>'.
Overload 2 of 3, '(action: AnyAction): AnyAction', gave the following error.
Argument of type '(dispatch: ThunkDispatch<AppState, null, ToastMessagesActionTypes>) => void' is not assignable to parameter of type 'AnyAction'.
Overload 3 of 3, '(action: AnyAction | ThunkAction<void, CombinedState<{ auth: AuthState; toastMessages: ToastMessageState; collections: CollectionsState; config: InitialState; ... 6 more ...; toolKitTypes: InitialState; }>, void, AnyAction>): void | AnyAction', gave the following error.
Argument of type '(dispatch: ThunkDispatch<AppState, null, ToastMessagesActionTypes>) => void' is not assignable to parameter of type 'AnyAction | ThunkAction<void, CombinedState<{ auth: AuthState; toastMessages: ToastMessageState; collections: CollectionsState; config: InitialState; ... 6 more ...; toolKitTypes: InitialState; }>, void, AnyAction>'.
210 | } catch (error) {
211 | onChange('imageFile', urlInfo.imageFile);
> 212 | dispatch(showErrorMessage('Failed to upload image file', error.message));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
213 | }
214 |
215 | setIsLoading(false);
I'm reverting the upgrades and upgrading 1 by 1 to figure out what started causing all these errors but so far I've had no success. I just can't understand which package upgrade can cause all these errors.