Skip to content

Switch away from using method-defined interfaces for base-class definition #2114

@ShadowJonathan

Description

@ShadowJonathan
interface ClassInterface {
    callable(f: string | number): void;
}

class Thing implements ClassInterface {
    public callable(f: string): void {

    }
}

class OtherThing implements ClassInterface {
    public callable(f: number): void {
        
    }
}

Related to #2113, using interfaces can cause above situations, where any person going from an interface definition will possibly draw the wrong conclusions.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions