Skip to content

Commit

Permalink
Node: fix xinfogroups; fix lrem
Browse files Browse the repository at this point in the history
Signed-off-by: Andrew Carbonetto <andrew.carbonetto@improving.com>
  • Loading branch information
acarbonetto committed Sep 18, 2024
1 parent c672c62 commit fda4165
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion node/src/BaseClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5523,7 +5523,7 @@ export class BaseClient {
* ```
*/
public async xinfoGroups(
key: string,
key: GlideString,
options?: DecoderOption,
): Promise<Record<string, GlideString | number | null>[]> {
return this.createWritePromise<
Expand Down
2 changes: 1 addition & 1 deletion node/src/Commands.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2694,7 +2694,7 @@ export function createXInfoStream(
}

/** @internal */
export function createXInfoGroups(key: string): command_request.Command {
export function createXInfoGroups(key: GlideString): command_request.Command {
return createCommand(RequestType.XInfoGroups, [key]);
}

Expand Down
4 changes: 2 additions & 2 deletions node/src/Transaction.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1252,7 +1252,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* Command Response - the number of the removed elements.
* If `key` does not exist, 0 is returned.
*/
public lrem(key: GlideString, count: number, element: string): T {
public lrem(key: GlideString, count: number, element: GlideString): T {
return this.addAndReturn(createLRem(key, count, element));
}

Expand Down Expand Up @@ -2651,7 +2651,7 @@ export class BaseTransaction<T extends BaseTransaction<T>> {
* attributes of a consumer group for the stream at `key`.
* The response comes in format `GlideRecord<GlideString | number | null>[]`, see {@link GlideRecord}.
*/
public xinfoGroups(key: string): T {
public xinfoGroups(key: GlideString): T {
return this.addAndReturn(createXInfoGroups(key));
}

Expand Down
2 changes: 1 addition & 1 deletion node/tests/SharedTests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10757,7 +10757,7 @@ export function runBaseTests(config: {
).toEqual("OK");

// one empty group exists
expect(await client.xinfoGroups(key)).toEqual(
expect(await client.xinfoGroups(Buffer.from(key))).toEqual(
cluster.checkIfServerVersionLessThan("7.0.0")
? [
{
Expand Down

0 comments on commit fda4165

Please sign in to comment.