Comments (3)
There are two errors shown in new updated baseRepository file
On Hover error details:
No overload matches this call. The last overload gave the following error. Argument of type 'UpdateWithAggregationPipeline' is not assignable to parameter of type 'UpdateQuery<DocumentType<TModel, BeAnObject>>'. Type 'UpdateAggregationStage[]' is not assignable to type 'ReadonlyPartial<_UpdateQueryDef<LeanDocument<DocumentType<TModel, BeAnObject>>>>'.ts(2769) index.d.ts(965, 5): The last overload is declared here. (parameter) item: TModel extends BaseModel
index.d.ts(965, 5
findByIdAndUpdate(id: mongodb.ObjectId | any, update: UpdateQuery<T>, callback: (err: CallbackError, doc: EnforceDocument<T, TMethods, TVirtuals> | null, res: any) => void): QueryWithHelpers<EnforceDocument<T, TMethods, TVirtuals> | null, EnforceDocument<T, TMethods, TVirtuals>, TQueryHelpers, T>;
On Hover:
`Generic type 'EnforceDocument' requires 3 type argument(s).ts(2314)
(alias) type DocumentType<T, QueryHelpers = BeAnObject> = (T extends {
_id: unknown;
} ? mongoose.Document<T["_id"], QueryHelpers, any> & T : mongoose.Document<any, QueryHelpers, any> & T) & IObjectWithTypegooseFunction
import DocumentType
Get the Type of an instance of a Document with Class properties
class ClassName {}
const NameModel = getModelForClass(ClassName);`
How to resolve this type @nartc ?
from tnc-scully.
I have updated the Gist. Please check it out. Thanks for the comment
from tnc-scully.
Thank you so much Nartc
from tnc-scully.
Related Issues (11)
- blog/add-utterances-comments-scully HOT 4
- blog/angular-recaptcha-v2 HOT 3
- blog/customizing-angular-ui-library HOT 1
- blog/deploy-scully-netlify HOT 1
- reporting `could not parse static page content` errors in your hosted page https://nartc.me/blog HOT 1
- blog/nestjs-swagger-generics HOT 9
- RSS Feed HOT 3
- blog/typed-mat-cell-def HOT 2
- blog/macos-dev-setup HOT 1
- blog/automapper-nestjs HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from tnc-scully.