Skip to content

Commit 838ed2e

Browse files
author
falsandtru
committed
Fix the Node interface
1 parent 09dfad2 commit 838ed2e

File tree

2 files changed

+48
-6
lines changed

2 files changed

+48
-6
lines changed

baselines/dom.generated.d.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8732,18 +8732,18 @@ interface Node extends EventTarget {
87328732
readonly attributes: NamedNodeMap;
87338733
readonly baseURI: string | null;
87348734
readonly childNodes: NodeList;
8735-
readonly firstChild: Node;
8736-
readonly lastChild: Node;
8735+
readonly firstChild: Node | null;
8736+
readonly lastChild: Node | null;
87378737
readonly localName: string | null;
87388738
readonly namespaceURI: string | null;
8739-
readonly nextSibling: Node;
8739+
readonly nextSibling: Node | null;
87408740
readonly nodeName: string;
87418741
readonly nodeType: number;
87428742
nodeValue: string | null;
87438743
readonly ownerDocument: Document;
8744-
readonly parentElement: HTMLElement;
8745-
readonly parentNode: Node;
8746-
readonly previousSibling: Node;
8744+
readonly parentElement: HTMLElement | null;
8745+
readonly parentNode: Node | null;
8746+
readonly previousSibling: Node | null;
87478747
textContent: string | null;
87488748
appendChild(newChild: Node): Node;
87498749
cloneNode(deep?: boolean): Node;

inputfiles/overridingTypes.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -845,5 +845,47 @@
845845
"interface": "History",
846846
"name": "replaceState",
847847
"signatures": ["replaceState(data: any, title: string, url?: string | null): void"]
848+
},
849+
{
850+
"kind": "property",
851+
"interface": "Node",
852+
"readonly": true,
853+
"name": "firstChild",
854+
"type": "Node | null"
855+
},
856+
{
857+
"kind": "property",
858+
"interface": "Node",
859+
"readonly": true,
860+
"name": "lastChild",
861+
"type": "Node | null"
862+
},
863+
{
864+
"kind": "property",
865+
"interface": "Node",
866+
"readonly": true,
867+
"name": "nextSibling",
868+
"type": "Node | null"
869+
},
870+
{
871+
"kind": "property",
872+
"interface": "Node",
873+
"readonly": true,
874+
"name": "previousSibling",
875+
"type": "Node | null"
876+
},
877+
{
878+
"kind": "property",
879+
"interface": "Node",
880+
"readonly": true,
881+
"name": "parentNode",
882+
"type": "Node | null"
883+
},
884+
{
885+
"kind": "property",
886+
"interface": "Node",
887+
"readonly": true,
888+
"name": "parentElement",
889+
"type": "HTMLElement | null"
848890
}
849891
]

0 commit comments

Comments
 (0)