Skip to content

Commit

Permalink
Override SVGSVGElement method getElementById
Browse files Browse the repository at this point in the history
This method may return null, but not according to the current type
definitions.
  • Loading branch information
remcohaszing committed Oct 9, 2023
1 parent 974688d commit 8bfc2b3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion baselines/dom.generated.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20555,7 +20555,7 @@ interface SVGSVGElement extends SVGGraphicsElement, SVGFitToViewBox, WindowEvent
/** @deprecated */
forceRedraw(): void;
getCurrentTime(): number;
getElementById(elementId: string): Element;
getElementById(elementId: string): Element | null;
getEnclosureList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf<SVGCircleElement | SVGEllipseElement | SVGImageElement | SVGLineElement | SVGPathElement | SVGPolygonElement | SVGPolylineElement | SVGRectElement | SVGTextElement | SVGUseElement>;
pauseAnimations(): void;
Expand Down
6 changes: 6 additions & 0 deletions inputfiles/overridingTypes.jsonc
Original file line number Diff line number Diff line change
Expand Up @@ -1238,6 +1238,12 @@
"SVGSVGElement": {
"methods": {
"method": {
"getElementById": {
"name": "getElementById",
"overrideSignatures": [
"getElementById(elementId: string): Element | null"
]
},
"getEnclosureList": {
"signature": {
"0": {
Expand Down

0 comments on commit 8bfc2b3

Please sign in to comment.