mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-04 23:07:06 +00:00
Update Backbone.sync to use a union
Updating file to use union to better follow the typescript Do's and Don'ts under the 'Use Union Types' section found in the link below. https://www.typescriptlang.org/docs/handbook/declaration-files/do-s-and-don-ts.html This will help prevent issues where a line of code such as 'let proxiedSync = Backbone.sync;' will use the wrong sync function.
This commit is contained in:
Vendored
+1
-2
@@ -460,8 +460,7 @@ declare namespace Backbone {
|
||||
}
|
||||
|
||||
// SYNC
|
||||
function sync(method: string, model: Model, options?: JQueryAjaxSettings): any;
|
||||
function sync(method: string, collection: Collection<Model>, options?: JQueryAjaxSettings): any;
|
||||
function sync(method: string, model: Model | Collection<Model>, options?: JQueryAjaxSettings): any;
|
||||
function ajax(options?: JQueryAjaxSettings): JQueryXHR;
|
||||
var emulateHTTP: boolean;
|
||||
var emulateJSON: boolean;
|
||||
|
||||
Reference in New Issue
Block a user