Info
Since 0.5.0 the linting rule detected ts function overloads as an error.
Reproducible code
import type { PropsWithChildren, ReactNode } from 'react';
export function Button(props: PropsWithChildren<{ onClick: () => void }>): ReactNode;
export function Button(props: PropsWithChildren): ReactNode {
return <button {...props}>{props.children}</button>;
}
See
https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads
Info
Since
0.5.0the linting rule detected ts function overloads as an error.Reproducible code
See
https://www.typescriptlang.org/docs/handbook/2/functions.html#function-overloads