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;