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

TS2322: Type 'JQuery<Element>' is not assignable to type 'JQuery<HTMLElement>'. #11995

Closed
TheLifeofO opened this issue Apr 28, 2020 · 11 comments · Fixed by #12015
Closed

TS2322: Type 'JQuery<Element>' is not assignable to type 'JQuery<HTMLElement>'. #11995

TheLifeofO opened this issue Apr 28, 2020 · 11 comments · Fixed by #12015
Labels
Milestone

Comments

@TheLifeofO
Copy link

When running yarn webpack i receive the following error

tsl] ERROR in /srv/pim/web/bundles/pimdatagrid/js/datafilter/filters-column.ts(285,5)
      TS2322: Type 'JQuery<Element>' is not assignable to type 'JQuery<HTMLElement>'.
  Type 'Element' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 109 more.

Looks like this property

public filterList: JQuery<HTMLElement>;

Needs to be typed to JQuery<Element>

@jmleroux jmleroux added the bug label Apr 28, 2020
@Rashguir
Copy link

i have the same issue when installing akeneo 3.2

@robingchan
Copy link

robingchan commented Apr 29, 2020

this is just a temporary fix

temporary fix is open this file:
web/bundles/pimdatagrid/js/datafilter/filters-column.ts

change line ~25 from this:
public filterList: JQuery<HTMLElement>;

to this:
public filterList: JQuery<Element>;

then run:
yarn run webpack

@simoncarre
Copy link

Same issue here with v3.2.46

@Thijzer
Copy link
Contributor

Thijzer commented Apr 29, 2020

same issue here with v3.2.51

ERROR in /srv/pim/web/bundles/pimdatagrid/js/datafilter/filters-column.ts
./web/bundles/pimdatagrid/js/datafilter/filters-column.ts
[tsl] ERROR in /srv/pim/web/bundles/pimdatagrid/js/datafilter/filters-column.ts(289,5)
      TS2322: Type 'JQuery<Element>' is not assignable to type 'JQuery<HTMLElement>'.
  Type 'Element' is missing the following properties from type 'HTMLElement': accessKey, accessKeyLabel, autocapitalize, dir, and 109 more.
error Command failed with exit code 2.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

@jmleroux
Copy link
Contributor

jmleroux commented Apr 29, 2020

Hey @robingchan ,

We can fix it but as we are open source, a PR would be also very welcome 😉

@tseho
Copy link
Contributor

tseho commented Apr 29, 2020

2 days ago: DefinitelyTyped/DefinitelyTyped@a604326

@tseho
Copy link
Contributor

tseho commented Apr 29, 2020

JQuery.find signature just changed :/

edit: the related PR on @types : DefinitelyTyped/DefinitelyTyped#44051

@jmleroux
Copy link
Contributor

Nice catch Quentin.

@jmleroux
Copy link
Contributor

jmleroux commented Apr 29, 2020

Bad move Jquery 🤦

@jmleroux
Copy link
Contributor

Merged in 3.2, it will be available in next v3.2.52 tag.

@tseho
Copy link
Contributor

tseho commented Apr 30, 2020

Thank you all, for taking the time to report the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

7 participants