mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
Merge pull request #6401 from Spinarooni/backbone-comparator-issue#6394
Update Backbone collection.comparator definition to accpet string and…
This commit is contained in:
Vendored
+4
-2
@@ -192,8 +192,10 @@ declare namespace Backbone {
|
||||
|
||||
fetch(options?: CollectionFetchOptions): JQueryXHR;
|
||||
|
||||
comparator(element: TModel): number;
|
||||
comparator(compare: TModel, to?: TModel): number;
|
||||
/**
|
||||
* Specify a model attribute name (string) or function that will be used to sort the collection.
|
||||
*/
|
||||
comparator: string | ((element: TModel) => number | string) | ((compare: TModel, to?: TModel) => number);
|
||||
|
||||
add(model: {}|TModel, options?: AddOptions): TModel;
|
||||
add(models: ({}|TModel)[], options?: AddOptions): TModel[];
|
||||
|
||||
Reference in New Issue
Block a user