From 5b6f9e9f789f4b6654fbad96dcc2c08efe99bd80 Mon Sep 17 00:00:00 2001 From: ashwinr Date: Wed, 14 Aug 2013 14:11:42 -0400 Subject: [PATCH] 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. --- backbone/backbone.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backbone/backbone.d.ts b/backbone/backbone.d.ts index 184b7f59c..99aec4e4b 100644 --- a/backbone/backbone.d.ts +++ b/backbone/backbone.d.ts @@ -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);