From 16d7b2a6cf88993b059245d0f3c10e2a5faf005c Mon Sep 17 00:00:00 2001 From: Samuel Bronson Date: Wed, 16 Mar 2022 18:22:39 -0400 Subject: [PATCH] tabs.ts: Loosen type of SvgGraph.svg `@types/jquery` version 3.3.35 and 3.3.36 made some changes to the type of JQuery.find(), see the PRs: * https://github.com/DefinitelyTyped/DefinitelyTyped/pull/43857 * https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44051 As a result, the following line in SvgGraph.setSVG would fail to typecheck: ```typescript this.svg = this.container.find('svg') ``` But if we change the svg property's type from `JQuery` to `JQuery`, we don't have to care about the changes: it typechecks either way. --- public/src/tabs.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/src/tabs.ts b/public/src/tabs.ts index b04e17d21..a1faefb0b 100644 --- a/public/src/tabs.ts +++ b/public/src/tabs.ts @@ -80,7 +80,7 @@ export class Experimental extends Tab { class SvgGraph extends Tab { panzoomOptions: any container: JQuery - svg: JQuery + svg: JQuery constructor(name: string, ee: EventEmitter) { super (name, ee) @@ -1324,4 +1324,4 @@ export function instanceOf(tab: Tab, title: string) { } -export default Tabs \ No newline at end of file +export default Tabs