eggjs / eggjs/egg

[Bug Report] egg-mongoose config 缺少类型定义

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

Description

## What happens?
egg-mongoose 插件 config 缺少某些字段的类型定义,例如
```
// config.default.ts

config.mongoose = {
loadModel: false,
}
```
## 复现步骤,错误日志以及相关配置

错误日志:
config/config.default.ts(35,5): error TS2322: Type '{ loadModel: boolean; }' is not assignable to type 'PowerPartial<{ url?: string | undefined; options?: ConnectionOptions | undefined; client?: MongooseConfig | undefined; clients?: { [key: string]: MongooseConfig; } | undefined; }>'.
Object literal may only specify known properties, and 'loadModel' does not exist in type 'PowerPartial<{ url?: string | undefined; options?: ConnectionOptions | undefined; client?: MongooseConfig | undefined; clients?: { [key: string]: MongooseConfig; } | undefined; }>'.

## 相关环境信息
- **操作系统**:macOS Catalina 10.15.4
- **Node 版本**:v10.19.0
- **Egg 版本**:v2.26.0
- **egg-mongoose 版本**: v3.2.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.