Skip to content

Commit

Permalink
address comments
Browse files Browse the repository at this point in the history
Signed-off-by: TJ Zhang <[email protected]>
  • Loading branch information
TJ Zhang committed Aug 26, 2024
1 parent 7b55f1e commit 2877fd7
Showing 1 changed file with 9 additions and 13 deletions.
22 changes: 9 additions & 13 deletions node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -967,11 +967,10 @@ export class BaseClient {
*
* @param key - The key to retrieve from the database.
* @param options - (Optional) Additional Parameters:
* - Set expiriation to the given key:
* "persist" will retain the time to live associated with the key. Equivalent to `PERSIST` in the VALKEY API.
* - (Optional) `expiry`: expiriation to the given key:
* `"persist"` will retain the time to live associated with the key. Equivalent to `PERSIST` in the VALKEY API.
* Otherwise, a {@link TimeUnit} and duration of the expire time should be specified.
* - (Optional) {@link Decoder} type which defines how to handle the response.
* If not set, the {@link BaseClientConfiguration.defaultDecoder|default decoder} will be used.
* - (Optional) `decoder`: see {@link DecoderOption}.
* @returns If `key` exists, returns the value of `key` as a `string`. Otherwise, return `null`.
*
* @example
Expand Down Expand Up @@ -1062,10 +1061,7 @@ export class BaseClient {
*
* @param key - The key to store.
* @param value - The value to store with the given key.
* @param options - (Optional) Additional parameters:
* - The set options, see {@link SetOptions}.
* - {@link Decoder} type which defines how to handle the response.
* If not set, the {@link BaseClientConfiguration.defaultDecoder|default decoder} will be used.
* @param options - (Optional) See {@link SetOptions} and {@link DecoderOption}.
* @returns - If the value is successfully set, return OK.
* If value isn't set because of `onlyIfExists` or `onlyIfDoesNotExist` conditions, return null.
* If `returnOldValue` is set, return the old value as a string.
Expand Down Expand Up @@ -6272,11 +6268,10 @@ export class BaseClient {
*
* @param key1 - The key that stores the first string.
* @param key2 - The key that stores the second string.
* @param options - Additional parameters:
* - withMatchLen - (Optional) If `true`, include the length of the substring matched for the each match.
* - minMatchLen - (Optional) The minimum length of matches to include in the result.
* - decoder - (Optional) {@link Decoder} type which defines how to handle the response.
* If not set, the {@link BaseClientConfiguration.defaultDecoder|default decoder} will be used.
* @param options - (Optional) Additional parameters:
* - (Optional) `withMatchLen`: if `true`, include the length of the substring matched for the each match.
* - (Optional) `minMatchLen`: the minimum length of matches to include in the result.
* - (Optional) `decoder`: see {@link DecoderOption}.
* @returns A `Record` containing the indices of the longest common subsequences between the
* 2 strings and the lengths of the longest common subsequences. The resulting map contains two
* keys, "matches" and "len":
Expand Down Expand Up @@ -6319,6 +6314,7 @@ export class BaseClient {
minMatchLen?: number;
} & DecoderOption,
): Promise<Record<string, (number | [number, number])[][] | number>> {
// TODO: convert Record return type to Object array
return this.createWritePromise(
createLCS(key1, key2, { idx: options ?? {} }),
{ decoder: options?.decoder },
Expand Down

0 comments on commit 2877fd7

Please sign in to comment.