TypeScript Error TS2172

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.
http://stackoverflow.com/questions/17201854/jquery-definition-screwed-up-with-typescript-0-9

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:
https://github.com/borisyankov/DefinitelyTyped/blob/master/jquery/jquery.d.ts

Leave a Reply