Skip to content

etc/prefer-interface conflicts with @typescript-eslint/prefer-function-type #45

Open
@Samuel-Therrien-Beslogic

Description

// Interface only has a call signature, you should use a function type instead. eslint(@typescript-eslint/prefer-function-type)
interface resultFunction<TOut, TIn> { (_: TIn): TOut; }
interface ContentGetter<TRow> { (row: TRow): Content<TRow>; }
// Type can be declared using an interface. eslint (etc/prefer-interface)
type resultFunction<TOut, TIn> = (_: TIn) => TOut;
type ContentGetter<TRow> = (row: TRow) => Content<TRow>;

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