From 8bfc2b3c23e7774ba31deef43205ec537403b605 Mon Sep 17 00:00:00 2001 From: Remco Haszing Date: Mon, 9 Oct 2023 10:34:01 +0200 Subject: [PATCH] Override SVGSVGElement method getElementById This method may return null, but not according to the current type definitions. --- baselines/dom.generated.d.ts | 2 +- inputfiles/overridingTypes.jsonc | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/baselines/dom.generated.d.ts b/baselines/dom.generated.d.ts index c7f0d01b2..c1b4c45ed 100644 --- a/baselines/dom.generated.d.ts +++ b/baselines/dom.generated.d.ts @@ -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; getIntersectionList(rect: DOMRectReadOnly, referenceElement: SVGElement | null): NodeListOf; pauseAnimations(): void; diff --git a/inputfiles/overridingTypes.jsonc b/inputfiles/overridingTypes.jsonc index 38b4d59f9..153a0c4f8 100644 --- a/inputfiles/overridingTypes.jsonc +++ b/inputfiles/overridingTypes.jsonc @@ -1238,6 +1238,12 @@ "SVGSVGElement": { "methods": { "method": { + "getElementById": { + "name": "getElementById", + "overrideSignatures": [ + "getElementById(elementId: string): Element | null" + ] + }, "getEnclosureList": { "signature": { "0": {