-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add command typings for Redis 7.0.2. Also fix a typing issue fo…
…r hgetallBuffer. (#1611)
- Loading branch information
Showing
8 changed files
with
366 additions
and
411 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
module.exports = { | ||
set: (args) => { | ||
const sorted = args.sort((a, b) => { | ||
const order = ["key", "value", "expiration", "condition", "get"]; | ||
const indexA = order.indexOf(a.name); | ||
const indexB = order.indexOf(b.name); | ||
if (indexA === -1) { | ||
throw new Error('Invalid argument name: "' + a.name + '"'); | ||
} | ||
if (indexB === -1) { | ||
throw new Error('Invalid argument name: "' + b.name + '"'); | ||
} | ||
return indexA - indexB; | ||
}); | ||
return sorted; | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.