Search Posts

Error in angularjs typescript definition file

Recently updated to Typescript 2.6.1 (from 1.8.2) and installed the relevant definition files via npm install. I was able to address lot of errors due to the migration but I still get one error

@typesangularjsindex.d.ts(1839,15): error TS2430: Build:Interface ‘IAugmentedJQuery’ incorrectly extends interface ‘JQuery’.

I had to downgrade the JQuery typings to 2.0.48, since I read on SO that the angular typings that augment JQuery typings haven’t been updated. VS2015’s intellisense shows the error message

Types of property ‘find’ are incompatible.
Type ‘{ (selector: string): IAugmentedJQuery; (element: any): IAugmentedJQuery; (obj: JQuery): IAugment…’ is not assignable to type ‘{ (selector: string): this; (element: any): this; (obj: JQuery): this; (selector: string):
JQuery…’.

I double checked JQuery interface and the types clearly match. Any ideas why I am getting the error.

Source: AngularJS

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.