A method is defined with ts. According to the conditions, the order of parameters in the callback method is a, b, or b, a.
if (props.xxx) {
props.onChange(a, b)
} else {
props.onChange(b, a)
}
How should this onChange method be described in the interface?
Instead of using function overloading, use union types: