79255069

Date: 2024-12-05 14:26:02
Score: 5.5
Natty: 5.5
Report link

I'm trying to make props with overloaded function, so i wrote something like this

interface SomeProps {
someAction: (value: number) => void | ((value: string) => void)

}

But i got error Type '(value: number) => void' is not assignable to type '(value: string) => void | ((value: number) => void)'. What am i doing wrong?

Reasons:
  • Blacklisted phrase (1): What am i doing wrong?
  • RegEx Blacklisted phrase (2): But i got error
  • Has code block (-0.5):
  • Ends in question mark (2):
  • Low reputation (1):
Posted by: Omnexy