[Web API type definition issue] incorrect type definition for getElementById()
#2020
Open
3 tasks done
Labels
Summary
incorrect type definition for
document.getElementById()
andshadowRoot.getElementById()
Expected vs. Actual Behavior
The type definition in lib.dom shows the signature as:
The signature should be
Playground Link
https://www.typescriptlang.org/play/?#code/CYewxgrgtgpgdgFwHQCMTAJ5IJZzjAJwAkAVAWQBkACAXioHIAeAZwDcBzAPkfau2BoAiAGYgQg7gHoujSWy70AUIrAg4zBFV51QkWIlToMAQiTDsBDQFEANjH0IAwgAtsN4KfOWEt+-Ceu7lQAhsxUAMoAagDi0b4OyqrqIHZINiDsABS8uBrBcGAwIMIRMXF2DgCUVJKSVAgEEDBUiWoaWgBMtFS60P5I7DA+Ff4AQhgAksCZ9KIg9NWhpbHx-q3JqelZ7F25CPmFxcvlfojVtVQabjb1jTBAA
Browser Support
Have Tried The Latest Releases
@types/web
.Additional Context
Proof:
The type is also wrong for other types of documents:
The text was updated successfully, but these errors were encountered: