mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-08-12 13:00:19 +00:00
fix type incompatibility with array.sort()
This commit is contained in:
@@ -446,7 +446,7 @@ mongooseArray.pull(5, 4, 'hi').$shift();
|
||||
mongooseArray.push([]).toFixed();
|
||||
mongooseArray.set(1, 'hi').$shift();
|
||||
mongooseArray.shift().toLowerCase();
|
||||
mongooseArray.sort(function (a: any, b: any) {
|
||||
mongooseArray.sort(function (a, b) {
|
||||
return a.length - b.length;
|
||||
}).unshift();
|
||||
mongooseArray.splice(4, 1).unshift();
|
||||
|
||||
Vendored
+1
-1
@@ -1141,7 +1141,7 @@ declare module "mongoose" {
|
||||
* potentially overwritting any changes that happen between when you retrieved the object
|
||||
* and when you save it.
|
||||
*/
|
||||
sort(compare?: Function): T[];
|
||||
sort(compareFn?: (a: T, b: T) => number): T[];
|
||||
|
||||
/**
|
||||
* Wraps Array#splice with proper change tracking and casting.
|
||||
|
||||
Reference in New Issue
Block a user