fix overriding comparator for Backbone

having the "sort" version of the comparator return a number, while technically correct according to the Backbone documentation, does not actually work when the "sortBy" version of the comparator is used.
This commit is contained in:
ashwinr
2013-08-14 14:11:42 -04:00
parent 730db3556b
commit 5b6f9e9f78
+1 -1
View File
@@ -152,7 +152,7 @@ declare module Backbone {
fetch(options?: CollectionFetchOptions): JQueryXHR;
comparator(element: Model): any;
comparator(compare: Model, to?: Model): number;
comparator(compare: Model, to?: Model): any;
add(model: Model, options?: AddOptions);
add(models: Model[], options?: AddOptions);