From 0bc8dbd7d90b2b7ad2de5bf43bf607cb6e0a9fbe Mon Sep 17 00:00:00 2001 From: Jean-Philippe Lachance Date: Tue, 6 Sep 2016 18:41:35 -0400 Subject: [PATCH] * Rename the parameter to fit with the doc (https://github.com/jakerella/jquery-mockjax/#callback) --- jquery-mockjax/jquery-mockjax-tests.ts | 4 ++-- jquery-mockjax/jquery-mockjax.d.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/jquery-mockjax/jquery-mockjax-tests.ts b/jquery-mockjax/jquery-mockjax-tests.ts index 55e77cd2bb..36ebd7e64c 100644 --- a/jquery-mockjax/jquery-mockjax-tests.ts +++ b/jquery-mockjax/jquery-mockjax-tests.ts @@ -171,10 +171,10 @@ class Tests { let settings: MockJaxSettings = { url: '/async-response-callback', - response: (settings, callback) => { + response: (settings, completed) => { setTimeout(() => { settings.responseText = settings.data.response + ' 3'; - callback(); + completed(); }, 10); } }; diff --git a/jquery-mockjax/jquery-mockjax.d.ts b/jquery-mockjax/jquery-mockjax.d.ts index 8a7c64d815..c054f33317 100644 --- a/jquery-mockjax/jquery-mockjax.d.ts +++ b/jquery-mockjax/jquery-mockjax.d.ts @@ -22,7 +22,7 @@ interface MockJaxSettings { isTimeout?: boolean; dataType?: string; contentType?: string; - response?: (settings: any, callback?: Function) => void; + response?: (settings: any, done?: Function) => void; responseText?: string | Object; responseXml?: string; proxy?: string;