Open jonahShaf opened 2 months ago
In lib.dom.d.ts Node.parentElement is defined as being HTMLelement | null. However, it should Element | null. The spec confirms this. This issue was originally fixed by #885 but was reverted in https://github.com/microsoft/TypeScript-DOM-lib-generator/commit/c81fa761df9c4483cd7f5d9767415660d4f1ee90. I didn't see any reasoning attached to that revert commit and the typing is still incorrect after the revert.
This whole topic is not about implementing the spec but about usability. https://github.com/microsoft/TypeScript-DOM-lib-generator/issues/1151#issuecomment-922664615
In lib.dom.d.ts Node.parentElement is defined as being HTMLelement | null. However, it should Element | null. The spec confirms this. This issue was originally fixed by #885 but was reverted in https://github.com/microsoft/TypeScript-DOM-lib-generator/commit/c81fa761df9c4483cd7f5d9767415660d4f1ee90. I didn't see any reasoning attached to that revert commit and the typing is still incorrect after the revert.