Pim-community-dev: TS2322: Escriba 'JQuery<element>'no se puede asignar al tipo' JQuery<htmlelement>'.</htmlelement></element>

Creado en 28 abr. 2020  ·  11Comentarios  ·  Fuente: akeneo/pim-community-dev

Al ejecutar yarn webpack recibo el siguiente 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.

Parece esta propiedad

public filterList: JQuery<HTMLElement>;

Debe escribirse en JQuery<Element>

bug

Comentario más útil

Gracias a todos por tomarse el tiempo para informar el problema.

Todos 11 comentarios

tengo el mismo problema al instalar akeneo 3.2

esto es solo una solución temporal

La solución temporal es abrir este archivo:
web / bundles / pimdatagrid / js / datafilter / filtros-column.ts

cambie la línea ~ 25 de esto:
public filterList: JQuery<HTMLElement>;

a esto:
public filterList: JQuery<Element>;

entonces corre:
yarn run webpack

El mismo problema aquí con v3.2.46

mismo problema aquí con 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.

Hola @robingchan ,

Podemos solucionarlo, pero como somos de código abierto, un PR también sería muy bienvenido: guiño:

La firma de JQuery.find acaba de cambiar: /

editar: el PR relacionado en @types : https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44051

Buen partido Quentin.

Mal movimiento Jquery: facepalm:

Combinado en 3.2, estará disponible en la próxima etiqueta v3.2.52.

Gracias a todos por tomarse el tiempo para informar el problema.

¿Fue útil esta página
0 / 5 - 0 calificaciones

Temas relacionados

Piotr-Borek picture Piotr-Borek  ·  5Comentarios

henryktews picture henryktews  ·  4Comentarios

wakqasahmed picture wakqasahmed  ·  4Comentarios

ewallteam picture ewallteam  ·  6Comentarios

ronthedrummer picture ronthedrummer  ·  3Comentarios