Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

218
Visualizações
Can't understand what is causing this TypeScript error. The code was working fine until I upgraded a couple of packages

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.

about 4 years ago · Juan Pablo Isaza
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda