Repository: TypeScript
Issue: Add VS IntelliSense Error on interface containing function with same name as variables on derived Element type
Labels: Suggestion,Awaiting More Feedback

# Suggestion
Add Visual Studio IntelliSense Error on HTMLElement interface containing a function with the same name as an variable on a derived Element type. _Ex: height() and/or width()_

## 🔍 Search Terms
"HTMLElement width", "width visual studio"


## ✅ Viability Checklist
My suggestion meets these guidelines:

* [v] This wouldn't be a breaking change in existing TypeScript/JavaScript code
* [v] This wouldn't change the runtime behavior of existing JavaScript code
* [v] This could be implemented without emitting different JS based on the types of the expressions
* [v] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
* [v] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).


## ⭐ Suggestion
Add Visual Studio IntelliSense Error on HTMLElement interface containing a function with the same name as an variable on a derived Element type. _Ex: height() and/or width()_

As it is now if user creates an HTMLElement interface with functions like `height()` and/or `width()` TypeScript will generate JavaScript without errors. But if you try to compile the project (ASP Net Core as an example) Visual Studio will throw lots of errors referencing `lib.dom.d.ts` without a single mention of the `.ts` file actually causing the error.



## 📃 Motivating Example

Imagine you are sitting coding away on your ASP Net Core project. You have added some function and features, and it is time to tinker with the Front-End JavaScript. You start the project in Debug mode and it is happily running.

As you are tinkering with the TypeScript while the Project is running you happily sees it happily generates new JS  every time you saves the TypeScript and all is working. 

In one of the TypeScript files you add these two small helper function for the HTMLElement 
```
interface HTMLElement {
    width(): number;
    height(): number;
}
```

After a while you have to change some of the backend code so you stop the project. After doing some changes to the C# code you are ready to build and get back to TypeScript, but you are met with this wall of error messages.
```
Severity    Code    Description	                                                                            File                                                                        Line
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Error       TS2430  Build:Interface 'HTMLVideoElement' incorrectly extends interface 'HTMLMediaElement'.    .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	8144
Error       TS2430  Build:Interface 'HTMLTableElement' incorrectly extends interface 'HTMLElement'.         .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	7788
Error       TS2430  Build:Interface 'HTMLTableColElement' incorrectly extends interface 'HTMLElement'.      .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	7749
Error       TS2430  Build:Interface 'HTMLTableCellElement' incorrectly extends interface 'HTMLElement'.     .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	7691
Error       TS2430  Build:Interface 'HTMLPreElement' incorrectly extends interface 'HTMLElement'.           .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	7434
Error       TS2430  Build:Interface 'HTMLObjectElement' incorrectly extends interface 'HTMLElement'.        .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	7176
Error       TS2430  Build:Interface 'HTMLMarqueeElement' incorrectly extends interface 'HTMLElement'.       .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6943
Error       TS2430  Build:Interface 'HTMLInputElement' incorrectly extends interface 'HTMLElement'.         .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6689
Error       TS2430  Build:Interface 'HTMLImageElement' incorrectly extends interface 'HTMLElement'.         .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6616
Error       TS2430  Build:Interface 'HTMLIFrameElement' incorrectly extends interface 'HTMLElement'.        .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6554
Error       TS2430  Build:Interface 'HTMLHRElement' incorrectly extends interface 'HTMLElement'.            .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6407
Error       TS2430  Build:Interface 'HTMLEmbedElement' incorrectly extends interface 'HTMLElement'.         .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	6164
Error       TS2430  Build:Interface 'HTMLCanvasElement' incorrectly extends interface 'HTMLElement'.        .nuget\packages\microsoft.typescript.msbuild\4.5.3\tools\tsc\lib.dom.d.ts	5958
```

There is no reference that the .ts file that you made an hour ago which working JS was generated from that actually is the culprit. You know there is probably something with the TypeScript code but what? It all generated JS that worked and you have not changed anything.


_And yes... you should never create functions that are variables on Elements deriving from the Element class you are extending, even if that variable don't exist on the Element type you are targeting ;)_