mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-19 22:01:08 +08: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 062c6c3af5/src/js/select2/data/ajax.js (L68)
This commit is contained in:
3
select2/index.d.ts
vendored
3
select2/index.d.ts
vendored
@@ -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