From 87539a0231576a6a0c97b703df3c4d53d9724219 Mon Sep 17 00:00:00 2001 From: ashwinr Date: Sun, 27 Aug 2017 11:38:39 -0400 Subject: [PATCH] Make comparator optional in sort method Comparator should be optional, just like the official docs and JSDoc indicate. --- types/underscore/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/underscore/index.d.ts b/types/underscore/index.d.ts index 031da982ab..2803c89b96 100644 --- a/types/underscore/index.d.ts +++ b/types/underscore/index.d.ts @@ -6042,7 +6042,7 @@ declare module _ { * @param compareFn Optional. Specifies a function that defines the sort order. If omitted, the array is sorted according to each character's Unicode code point value, according to the string conversion of each element. * @return The sorted array. **/ - sort(compareFn: (a: T, b: T) => boolean): _Chain; + sort(compareFn?: (a: T, b: T) => boolean): _Chain; /** * Changes the content of an array by removing existing elements and/or adding new elements.