Skip to content

Extend Interface: misleading error message #9004

@oliver-h

Description

@oliver-h

TypeScript Version:

1.8.10

Code

export interface MyInterface {
  foo(): void;
}

export class MyImplementation extends MyInterface {
  public foo(): void {
    console.log("foo!");
  }
}

Expected behavior:
Error TSXXXX: Cannot 'extend' interface. Use 'implements' instead.
Actual behavior:
Error TS2304: Cannot find name 'MyInterface'.

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: Error MessagesThe issue relates to error messagingFixedA PR has been merged for this issueGood First IssueWell scoped, documented and has the green lightHelp WantedYou can do this

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions