The error is in the get method, here's the whole traceback:
src/infrastructure/data-services/mongo/mongo-generic.repository.ts:18:5 - error TS2322: Type 'Promise<UnpackedIntersectionWithNull<HydratedDocument<T, {}, {}>, {}>>' is not assignable to type 'Promise<T>'.
Type 'UnpackedIntersectionWithNull<HydratedDocument<T, {}, {}>, {}>' is not assignable to type 'T'.
'T' could be instantiated with an arbitrary type which could be unrelated to 'UnpackedIntersectionWithNull<HydratedDocument<T, {}, {}>, {}>'.
return this._repository.findById(id).populate(this._populateOnFind).exec();
For some reason I don't get it in your code but it arises in mine but the code is identical. Any ideas?
Hi again,
for some reason I got the following error that comes from the
MongoGenericRepository
.Here's the mongo generic repo:
The error is in the get method, here's the whole traceback:
For some reason I don't get it in your code but it arises in mine but the code is identical. Any ideas?