eggjs / eggjs/egg

egg-redis使用clients后ts申明错误

Open
#4,989 6 comments 0 reactions 0 assignees View on GitHub
Inactive
Dominant language
TypeScript
Stars
19k
Forks
1.8k
PR merge metrics
No merged PRs in 30d

Description

## What happens?
egg-redis使用clients后,使用get('instanceName").set("test", "111"),ts报错:Property 'set' does not exist on type 'Promise '.

## Mini Showcase Repository(REQUIRED)

[dom地址](https://github.com/Shen120/egg-redis-clients-bug)

## How To Reproduce

**Steps to reproduce the behavior:**
1. 打开代码
2. 进入 app -> controller -> home.ts

**Expected behavior**
1.设置clients后能够正常使用redis基本命令

## Context
- **Node Version**: v14.19.2
- **Egg Version**:2.6.1
- **Plugin Name**:egg-redis
- **Plugin Version**:2.4.0
- **Platform**:docker
- **TS Version:4.0.0

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.