We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
RedisKey#join
1 parent 0de00be commit 2260be2Copy full SHA for 2260be2
src/key.ts
@@ -37,9 +37,12 @@ export class RedisKey<
37
* Derive a new key by prefixing the current key with the given keys. When multiple keys are
38
* passed in, they will be joined with a colon.
39
*/
40
- join(...keys: (string | number)[]) {
+ join(...keys: (string | number)[]): this {
41
if (keys.length === 0) return this;
42
- return new RedisKey(`${this.name}:${keys.join(":")}`, this.schema);
+ return new (this.constructor as new (name: string, schema: T) => this)(
43
+ `${this.name}:${keys.join(":")}`,
44
+ this.schema,
45
+ );
46
}
47
48
/**
0 commit comments