When attempting to attach a click event handler on a TypeScript file, I encountered the following error message:
Argument of type 'string' is not assignable to parameter of type '{ [key:string]:any;}
https://i.sstatic.net/ATkz0.png
The ASP.NET Web Application I am working on has jQuery 2.1.4 and jquery.TypeScript.DefinitelyTyped 3.0.4 configured.
Edit:
My TypeScript file successfully picks up the definition file:
https://i.sstatic.net/qkyRF.png
Within my JQuery.d.ts, I have the following overloads:
on(events: string, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
on(events: string, data : any, handler: (eventObject: JQueryEventObject, ...args: any[]) => any): JQuery;
on(events: string, selector: string, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
on(events: string, selector: string, data: any, handler: (eventObject: JQueryEventObject, ...eventData: any[]) => any): JQuery;
on(events: { [key: string]: any; }, selector?: string, data?: any): JQuery;
on(events: { [key: string]: any; }, data?: any): JQuery;
Seeking guidance on resolving this issue. Any help or suggestions would be greatly appreciated.