2

I have 2 Visual studio projects in the same solution, I have updated to the latest jquery 2-1-3 and typescript definition 2-2-3, but I get an error, Build: Interface 'JQueryPromise' incorrectly extends interface 'JQueryGenericPromise

funny thing I only get this error in one project. any ideas thanks

2
  • Any chance you are using also the kendo.all.d? Commented May 26, 2015 at 9:27
  • Yes I was using Kendo.all.d Commented May 27, 2015 at 17:13

2 Answers 2

3

Had same problem, what I did was copy the following line to the bottom of the "interface JQueryPromise extends JQueryGenericPromise" block.

/**
 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
 * 
 * @param doneFilter A function that is called when the Deferred is resolved.
 * @param failFilter An optional function that is called when the Deferred is rejected.
 */
then<U>(doneFilter: (value?: T, ...values: any[]) => U|JQueryPromise<U>, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<U>;

/**
 * Add handlers to be called when the Deferred object is resolved, rejected, or still in progress.
 * 
 * @param doneFilter A function that is called when the Deferred is resolved.
 * @param failFilter An optional function that is called when the Deferred is rejected.
 */
then(doneFilter: (value?: T, ...values: any[]) => void, failFilter?: (...reasons: any[]) => any, progressFilter?: (...progression: any[]) => any): JQueryPromise<void>;
Sign up to request clarification or add additional context in comments.

Comments

1

Had the same error, however just in case if I use also the kendo.all.d.ts My kendo version is: 2015.1.408

Commenting out the conflicting declaration in kendo.all.d.ts solves this issue with minimal impact:

// This is line 15266 in my kendo.all.d.ts
//interface JQueryPromise<T> {
//    pipe(doneFilter?: (x: any) => any, failFilter?: (x: any) => any, progressFilter?: (x: any) => any): JQueryPromise<T>;
//    then(doneCallbacks: any, failCallbacks: any, progressCallbacks?: any): JQueryPromise<T>;
//}

This solution is based on issue 3976 at DefinitelyTyped

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.