Repository: TypeScript
Issue: Add override / noImplicitOverride support for interfaces
Labels: Suggestion,Awaiting More Feedback

# Suggestion

<!--
  Please fill in each section completely. Thank you!
-->

## 🔍 Search Terms

<!--
  💡 Did you know? TypeScript has over 2,000 open suggestions!
  🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
  The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests

  Replace the text below:
-->
noImplicitOverride interface override

## ✅ Viability Checklist

<!--
   Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
   We always recommend reviewing the TypeScript design goals before investing time writing
   a proposal for ideas outside the scope of the project.
-->
My suggestion meets these guidelines:

* [x] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [x] This wouldn't change the runtime behavior of existing JavaScript code
* [x] This could be implemented without emitting different JS based on the types of the expressions
* [x] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [x] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion

<!-- A summary of what you'd like to see added or changed -->

## 📃 Motivating Example

The [new override keyword in TS4.3](https://www.typescriptlang.org/docs/handbook/release-notes/typescript-4-3.html#override-and-the---noimplicitoverride-flag) works for classes but not for interfaces.
Would be great to have it also available for interfaces. As interfaces are technically not overridden, alternatively a new keyword like `implement` could be introduced (Java, for example, uses override for classes _and_ interfaces though)

## 💻 Use Cases
What is the advantage of `override` / `noImplicitOverride` for interfaces? Consider this case:

```
interface ISomething {
  doSomething?: () => void;
}

class Something implements ISomething {
  doSomething: () => {console.log("Something")}
}
```

If you rename `doSomething()` in the interface to `doSomethingElse()`, this would not throw an TS error, since it is optional and therefore doesn't have to be implemented. The implementing class would still have a `doSomething()` method which never gets executed.

If I would be forced to do something like this, TS could throw an error if I rename `doSomething` in the interface:
```
class Something implements ISomething {
  override doSomething: () => {console.log("Something")}
}
```

Currently I am using a [custom TSLint rule](https://github.com/hmil/tslint-override) via eslint but TSLint is already deprecated and also the rule stopped working with TS 4.3. 
An [according ESLint is not planned](https://github.com/typescript-eslint/typescript-eslint/issues/3608) for this.
Anyhow, I think this check could be done directly in TS.