sorter is comparer function

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]
This commit is contained in:
aavezel
2014-12-08 16:29:48 +05:00
parent 72f8dbc007
commit a6dd0b011a
+1 -1
View File
@@ -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.
*/