Currently, I am in the process of developing a new SharePoint Web Part using SPFx generated by Yeoman. The scaffolding template is working well and I have encountered no issues adding NPMs for JQuery and JQueryUI. As I run GULP SERVE, everything seems to be running smoothly without any errors.
However, trouble arises when I include the following line in my JQWebPart.ts file:
import * as jQuery from 'jquery';
Upon adding the above line, GULP SERVE spews out a long list of errors. Here are the last few lines of the error log:
[16:54:06] Error - typescript - node_modules\@types\jquery\index.d.ts(7502,33): error TS2314: Generic type 'Callbacks<T, Function>' requires 2 type argument(s).
[16:54:06] Error - typescript - node_modules\@types\jquery\index.d.ts(7517,32): error TS2314: Generic type 'PlainObject<T, any>' requires 2 type argument(s).
[16:54:06] Finished subtask 'tslint' after 3.95 s
[16:54:06] Error - 'typescript' sub task errored after 3.95 s
"TypeScript error(s) occurred."
I am quite perplexed about the issues that arise in my Web Part when incorporating JQuery. If anyone has any insights or suggestions, please feel free to share!