mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 11:02:11 +08:00
* Rename the parameter to fit with the doc (https://github.com/jakerella/jquery-mockjax/#callback)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
};
|
||||
|
||||
2
jquery-mockjax/jquery-mockjax.d.ts
vendored
2
jquery-mockjax/jquery-mockjax.d.ts
vendored
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user