Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tabs.ts: Loosen type of SvgGraph.svg #193

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SamB
Copy link

@SamB SamB commented Mar 16, 2022

@types/jquery version 3.3.35 and 3.3.36 made some changes to the type
of JQuery.find(), see the PRs:

As a result, the following line in SvgGraph.setSVG would fail to
typecheck:

      this.svg = this.container.find('svg')

But if we change the svg property's type from JQuery<HTMLElement> to
JQuery<Element>, we don't have to care about the changes: it typechecks
either way.

`@types/jquery` version 3.3.35 and 3.3.36 made some changes to the type
of JQuery.find(), see the PRs:

  * DefinitelyTyped/DefinitelyTyped#43857

  * DefinitelyTyped/DefinitelyTyped#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<HTMLElement>` to
`JQuery<Element>`, we don't have to care about the changes: it typechecks
either way.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant