Issue using Mongoose 5.12
Hi,
I tried to bump mongoose to 5.12 but I'm a newbie and I can't do it right.
I continue to have compiling errors like this :
Type 'LeanDocument<Blog>' is missing the following properties from type 'Blog': $getAllSubdocs, $ignore, $isDefault, $isDeleted, and 48 more.ts(2740) Type 'Promise<Blog>' is not assignable to type 'Promise<Blog[]>'. Type 'Blog' is missing the following properties from type 'Blog[]': length, pop, push, concat, and 28 more.ts(2322)
Could someone eventually check and propose a fix?
Regards
Hi,
I tried to bump mongoose to 5.12 but I'm a newbie and I can't do it right.
I continue to have compiling errors like this :
Type 'LeanDocument' is missing the following properties from type 'Blog': $getAllSubdocs, $ignore, $isDefault, $isDeleted, and 48 more.ts(2740) Type 'Promise' is not assignable to type 'Promise<Blog[]>'. Type 'Blog' is missing the following properties from type 'Blog[]': length, pop, push, concat, and 28 more.ts(2322)
Could someone eventually check and propose a fix?
Regards
change .lean<Blog>() to .lean<Blog[]>() whereever you are getting that error.