Giter Club home page Giter Club logo

Comments (3)

geniusmonir avatar geniusmonir commented on July 17, 2024

There are two errors shown in new updated baseRepository file
1

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>;

Error 2
2

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

@example

class ClassName {}
const NameModel = getModelForClass(ClassName);`

How to resolve this type @nartc ?

from tnc-scully.

nartc avatar nartc commented on July 17, 2024

I have updated the Gist. Please check it out. Thanks for the comment

from tnc-scully.

geniusmonir avatar geniusmonir commented on July 17, 2024

Thank you so much Nartc

from tnc-scully.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.