Skip to content

Wrong return type of hGet #2987

Open
Open
@zdila

Description

@zdila

Description

export const redisClient = createClient(options).withTypeMapping({
  [RESP_TYPES.BLOB_STRING]: String,
});

// Type 'string | {}' is not assignable to type 'string'. Type '{}' is not assignable to type 'string'.ts(2322)
const res: string = await redisClient.hGet("foo", "bar");

Typescript Version

5.8.3

Node Redis Version

@redis/client 5.5.5

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions