|
Download tasks/format-code-task-000025/instruction.md from FineEnvs/MiMo-V2.6-RL-harbor-code: direct link, hf CLI and curl.
- Browser
- Download file 1.24 kB
-
https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000025/instruction.md
- Command line
-
hf download hf://datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/tasks/format-code-task-000025/instruction.md
-
curl -L -o instruction.md https://huggingface.co/datasets/FineEnvs/MiMo-V2.6-RL-harbor-code/resolve/main/tasks/format-code-task-000025/instruction.md
1.24 kB
Fix the following issue:
ts def of updateOne&findOneAndUpdate returns FlattenMap instead of UpdateWriteOpResult, when lean() is used
Prerequisites
- I have written a descriptive issue title
- I have searched existing issues to ensure the bug has not already been reported
Mongoose version
7.1.0
Node.js version
16.20
MongoDB server version
5.x
Typescript version (if applicable)
4.9.5
Description
I tried upgrading to mongoose 7.x, but now I'm stuck with some typescript issues.

somehow updateOne returns a FlattenMap and not the ResultType defined in updateOne:

I would expect a UpdateWriteOpResult here.
Steps to Reproduce
my UserModel is defined as
const userSchema = new Schema({...});
export interface IDBUser { .. };
const DBUserModel: Model<IDBUser> = model<IDBUser>('User', userSchema);
just run updateOne on it and check the return type.
Expected Behavior
typescript should correctly return the UpdateWriteOpResult