fix(mongo): propagate aggregate method's generic type to its returned cursor (#10754)

Co-authored-by: Mike Guida <mike@mguida.com>
This commit is contained in:
Dan Goje 2025-04-15 19:31:29 +01:00 committed by GitHub
parent 184f463ed7
commit 56f1898c4e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -206,7 +206,7 @@ export class MongoRepository<
aggregate<R = any>(
pipeline: ObjectLiteral[],
options?: AggregateOptions,
): AggregationCursor<Entity> {
): AggregationCursor<R> {
return this.manager.aggregate<R>(
this.metadata.target,
pipeline,