From 9d7f8f967d5b1a2860b6254333c21cf699517646 Mon Sep 17 00:00:00 2001 From: Ciel Date: Thu, 10 Jul 2014 10:52:50 -0500 Subject: [PATCH] Updated "then" within interface JQueryXHR Updated "then" within the JQueryXHR interface - details are visible here: https://github.com/borisyankov/DefinitelyTyped/issues/2492 Sorry if this isn't the right way. This is my very first pull request. --- jquery/jquery.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/jquery/jquery.d.ts b/jquery/jquery.d.ts index ad60f9670..59159a188 100644 --- a/jquery/jquery.d.ts +++ b/jquery/jquery.d.ts @@ -176,7 +176,7 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise { /** * Incorporates the functionality of the .done() and .fail() methods, allowing (as of jQuery 1.8) the underlying Promise to be manipulated. Refer to deferred.then() for implementation details. */ - then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise; + then(doneCallback: (data: any, textStatus: string, jqXHR: JQueryXHR) => void, failCallback?: (jqXHR: JQueryXHR, textStatus: string, errorThrown: any) => void): JQueryPromise; /** * Property containing the parsed response if the response Content-Type is json */