Skip to content

Implement interface helper does not consider what is already implemented on base classes #19847

Closed
@Tyriar

Description

@Tyriar

TypeScript Version: 2.6.1 (VS Code Insiders)

Code

interface MyInterface {
  foo(): void;
}

interface IBase extends MyInterface {
  bar(): void;
}

abstract class Base implements MyInterface {
  foo(): void {}
}

class MyClass extends Base implements IBase {

}

When I implement interface IBase, it's not figuring out which methods are already implemented on the base classes.

image

Expected behavior:

class MyClass extends Base implements IBase {
  bar(): void {
    throw new Error("Method not implemented.");
  }
}

Actual behavior:

class MyClass extends Base implements IBase {
  bar(): void {
    throw new Error("Method not implemented.");
  }
  foo(): void {
    throw new Error("Method not implemented.");
  }

}

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Quick FixesEditor-provided fixes, often called code actions.Good First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions