From a6dd0b011a6087ba88cb378f8063296f5936c635 Mon Sep 17 00:00:00 2001 From: aavezel Date: Mon, 8 Dec 2014 16:29:48 +0500 Subject: [PATCH] sorter is comparer function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit from bloodhound documentation (https://github.com/twitter/typeahead.js/blob/master/doc/bloodhound.md#api): sorter – A compare function used to sort matched datums for a given query. link on "compare function" (https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/sort) shows that it result value in set of [-1, 0, 1] --- typeahead/typeahead.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/typeahead/typeahead.d.ts b/typeahead/typeahead.d.ts index 3bd8c93f9..d377bf75b 100644 --- a/typeahead/typeahead.d.ts +++ b/typeahead/typeahead.d.ts @@ -218,7 +218,7 @@ declare module Bloodhound /** * A compare function used to sort matched datums for a given query. */ - sorter?: (a: T, b: T) => T[]; + sorter?: (a: T, b: T) => number; /** *An array of datums or a function that returns an array of datums. */