Skip to content

Typescript error: RedisClientType type is missing on property  #2873

Open
@golopot

Description

@golopot

Description

The RedisClientType type appears to be missing the on method. This causes a type-checking error when using .on to handle events. Below is an example that triggers the error:

import { createClient } from "redis";
const redis = createClient().on("error", (err) => {});
//                           ~~ Property 'on' does not exist on type 'RedisClientType...

Node.js Version

v22.9.0

Redis Server Version

not relevant

Node Redis Version

[email protected]

Platform

not relevant

Logs

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions