Skip to content

TypeScript function overloading causes false positive #105

@bobaaaaa

Description

@bobaaaaa

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions