Skip to content

Instantly share code, notes, and snippets.

@jasonleehodges
Created February 9, 2022 05:27
Show Gist options
  • Save jasonleehodges/502c6aa555dc665670d675ec168de63d to your computer and use it in GitHub Desktop.
Save jasonleehodges/502c6aa555dc665670d675ec168de63d to your computer and use it in GitHub Desktop.
TypeScript - No Overload Matches this call
No overload matches this call.
Overload 1 of 2, '(actionCreator: ActionCreatorWithPayload<Partial<Character>, string>, reducer: CaseReducer<State, { payload: Partial<Character>; type: string; }>): ActionReducerMapBuilder<...>', gave the following error.
Type '(WritableDraft<Partial<Character>> | "123")[]' is not assignable to type 'WritableDraft<Partial<Character>>[]'.
Type 'WritableDraft<Partial<Character>> | "123"' is not assignable to type 'WritableDraft<Partial<Character>>'.
Type '"123"' has no properties in common with type 'WritableDraft<Partial<Character>>'.
Overload 2 of 2, '(type: string, reducer: CaseReducer<State, { payload: Partial<Character>; type: string; }>): ActionReducerMapBuilder<State>', gave the following error.
Argument of type 'ActionCreatorWithPayload<Partial<Character>, string>' is not assignable to parameter of type 'string'.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment