Skip to content

Provide a way to supress specific compiler message like TS2415, incorrectly extends base on override method with different return type #3639

Closed
@gautamsi

Description

@gautamsi

I am working on a code port from c# to TypeScript. Having some instance of overridden methods with new keyword in derived class. like following. Is there a way that I can suppress this instance of error TS2415.
I can live with error message as it does compile the file. It will have issues when I start putting build system around, they will show as failed all the time.

class parent{
public string testmethod(){return ""}
}
class child: parent{
public new int testmethod(){return 1;}
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    DuplicateAn existing issue was already created

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions