Pim-community-dev: TS2322:タイプ 'JQuery<element>'はタイプ' JQueryに割り当てることができません<htmlelement>'。</htmlelement></element>

作成日 2020年04月28日  ·  11コメント  ·  ソース: akeneo/pim-community-dev

yarn webpackを実行すると、次のエラーが発生します

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.

このプロパティのように見えます

public filterList: JQuery<HTMLElement>;

JQuery<Element>入力する必要があります

bug

最も参考になるコメント

問題の報告に時間を割いていただき、ありがとうございます。

全てのコメント11件

akeneo3.2をインストールするときに同じ問題が発生します

これは一時的な修正です

一時的な修正はこのファイルを開きます:
web / bundles / pimdatagrid / js / datafilter / filters-column.ts

これから行〜25を変更します:
public filterList: JQuery<HTMLElement>;

これに:
public filterList: JQuery<Element>;

次に実行します:
yarn run webpack

ここでv3.2.46と同じ問題

ここで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.

ねえ@robingchan

私たちはそれを修正することができますが、私たちはオープンソースなので、PRも大歓迎です:wink:

2日前: https

JQuery.find署名が変更されました:/

編集: @typesの関連PR: https

ナイスキャッチクエンティン。

悪い動きJquery:facepalm:

3.2でマージされ、次のv3.2.52タグで使用できるようになります。

問題の報告に時間を割いていただき、ありがとうございます。

このページは役に立ちましたか?
0 / 5 - 0 評価