mongoose-softdelete icon indicating copy to clipboard operation
mongoose-softdelete copied to clipboard

Unknown types

Open fdorantesm opened this issue 3 years ago • 1 comments

node_modules/mongoose-softdelete/index.d.ts:1:42 - error TS2305: Module '"mongoose"' has no exported member 'DocumentQuery'.

1 import { Document, Model, Query, Schema, DocumentQuery } from "mongoose";
                                           ~~~~~~~~~~~~~

node_modules/mongoose-softdelete/index.d.ts:15:38 - error TS2314: Generic type 'Query<ResultType, DocType>' requires 2 type argument(s).

15   isDeleted: (condition: Boolean) => Query<ISoftDeletedDocument>;
                                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~

node_modules/mongoose-softdelete/index.d.ts:18:33 - error TS2314: Generic type 'Query<ResultType, DocType>' requires 2 type argument(s).

18 export type ISoftDeletedQuery = Query<ISoftDeletedDocument> & IQueryMethods;
                                   ~~~~~~~~~~~~~~~~~~~~~~~~~~~

[3:54:37 PM] Found 3 errors. Watching for file changes.

fdorantesm avatar Jan 23 '21 22:01 fdorantesm

@fdorantesm Change line 15 like this:

isDeleted: (condition: boolean) => Query<boolean, ISoftDeletedDocument>;

msrumon avatar Jan 27 '21 16:01 msrumon