Pim-community-dev: TS2322: اكتب "JQuery<element>'غير قابل للتخصيص لكتابة' JQuery<htmlelement>".</htmlelement></element>

تم إنشاؤها على ٢٨ أبريل ٢٠٢٠  ·  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 كومينتر

لدي نفس المشكلة عند تثبيت akeneo 3.2

هذا مجرد إصلاح مؤقت

الإصلاح المؤقت هو فتح هذا الملف:
الويب / الحزم / pimdatagrid / js / datafilter / filter-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 ،

يمكننا إصلاحه ولكن نظرًا لأننا مفتوحون المصدر ، فإن العلاقات العامة ستكون أيضًا موضع ترحيب كبير: غمزة:

تم تغيير توقيع JQuery.find للتو: /

تحرير: العلاقات العامة ذات الصلة على types : https://github.com/DefinitelyTyped/DefinitelyTyped/pull/44051

لطيفة التقاط كوينتين.

Jquery التحريك السيئ: راحة اليد:

تم دمجه في 3.2 ، وسيكون متاحًا في علامة v3.2.52 التالية.

شكرًا لكم جميعًا على الوقت الذي قضيته في الإبلاغ عن المشكلة.

هل كانت هذه الصفحة مفيدة؟
0 / 5 - 0 التقييمات