mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-04 04:01:52 +00:00
Update AjaxFunction interface
The interface was incorrectly defined making it impossible in typescript to use the transport function defined inside the ajax option. Select2 calls the transport function with 3 parameters: 1. The JQueryAjaxSettings object 2. A success callback to notify select2 of a successful response 3. A failure callback to notify select2 of a failed response See https://github.com/select2/select2/blob/062c6c3af5f0f39794c34c0a343a3857e587cc97/src/js/select2/data/ajax.js#L68
This commit is contained in:
Vendored
+1
-2
@@ -14,8 +14,7 @@ interface Select2QueryOptions {
|
||||
}
|
||||
|
||||
interface AjaxFunction {
|
||||
(settings: JQueryAjaxSettings): JQueryXHR;
|
||||
(url: string, settings?: JQueryAjaxSettings): JQueryXHR;
|
||||
(settings: JQueryAjaxSettings, success?: (data: any) => null, failure?: () => null): JQueryXHR;
|
||||
}
|
||||
|
||||
interface Select2AjaxOptions {
|
||||
|
||||
Reference in New Issue
Block a user