mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-16 02:57:24 +08:00
Merge pull request #2426 from borisyankov/def/jquery
expand the `abort` jsdoc
This commit is contained in:
@@ -193,6 +193,12 @@ function test_ajax() {
|
||||
}, (jqXHR, textStatus, errorThrown) => {
|
||||
console.log(jqXHR, textStatus, errorThrown);
|
||||
});
|
||||
|
||||
// jqXHR object
|
||||
var jqXHR = $.ajax({
|
||||
url: "test.js"
|
||||
});
|
||||
jqXHR.abort('aborting because I can');
|
||||
}
|
||||
|
||||
function test_ajaxComplete() {
|
||||
|
||||
4
jquery/jquery.d.ts
vendored
4
jquery/jquery.d.ts
vendored
@@ -168,7 +168,9 @@ interface JQueryXHR extends XMLHttpRequest, JQueryPromise<any> {
|
||||
*/
|
||||
overrideMimeType(mimeType: string): any;
|
||||
/**
|
||||
* Cancel the request. Pass the statusText as textStatus parameter for done callback, "canceled" will be passed if not provided.
|
||||
* Cancel the request.
|
||||
*
|
||||
* @param statusText A string passed as the textStatus parameter for the done callback. Default value: "canceled"
|
||||
*/
|
||||
abort(statusText?: string): void;
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user