TypeScript Error TS2172
Posted by robert | Filed under TypeScript
I just updated to TypeScript version 0.9.0 and stuff was breaking. I know they said stuff is going to break and I can handle that but I couldn’t get anything to work with jQuery. I even tried the office TypeScript sample example and it breaks. Here was my issue:
error TS2172: All named properties must be subtypes of string indexer type ‘HTMLElement’:
Type ‘(handler: any) => JQuery’ is missing property ‘ondragend’ from type ‘HTMLElement’
Thanks to the post below I was able to fix the issue.
I am not sure why the office TypeScript jQuery sample doesn’t have to right jquery.d.ts definitions but you can get it here: