document.createElement('dialog') should not return HTMLElement as type #26081
Labels
Bug
A bug in TypeScript
Domain: lib.d.ts
The issue relates to the different libraries shipped with TypeScript
Fixed
A PR has been merged for this issue
Help Wanted
You can do this
Milestone
TypeScript Version: 2.9.2, 3.0.1
Search Terms:
createElement dialog
Code
Expected behavior:
No error...
Actual behavior:
Type 'HTMLElement' is not assignable to type 'HTMLDialogElement'.
Playground Link:
http://www.typescriptlang.org/play/#src=const%20dialog%3A%20HTMLDialogElement%20%3D%20document.createElement('dialog')%3B
Related Issues:
Few about adding dialog element definition.
The text was updated successfully, but these errors were encountered: