Skip to content

Commit

Permalink
Merge pull request #14545 from sderrow/fix-select-override-return-type
Browse files Browse the repository at this point in the history
Add `null` to `select` override return type for `findOne`
  • Loading branch information
vkarpov15 authored Apr 29, 2024
2 parents 72da808 + f0dc26f commit 16e6985
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions types/query.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,9 +701,10 @@ declare module 'mongoose' {
ResultType extends HydratedDocument<any>[] ?
HydratedDocument<RawDocTypeOverride>[] :
RawDocTypeOverride[] :
ResultType extends HydratedDocument<any> ?
HydratedDocument<RawDocTypeOverride> :
RawDocTypeOverride
| (ResultType extends HydratedDocument<any>

Check warning on line 704 in types/query.d.ts

View workflow job for this annotation

GitHub Actions / Lint TS-Files

Expected indentation of 10 spaces but found 14
? HydratedDocument<RawDocTypeOverride>

Check warning on line 705 in types/query.d.ts

View workflow job for this annotation

GitHub Actions / Lint TS-Files

Expected indentation of 12 spaces but found 16
: RawDocTypeOverride)

Check warning on line 706 in types/query.d.ts

View workflow job for this annotation

GitHub Actions / Lint TS-Files

Expected indentation of 12 spaces but found 16
| (null extends ResultType ? null : never)

Check warning on line 707 in types/query.d.ts

View workflow job for this annotation

GitHub Actions / Lint TS-Files

Expected indentation of 10 spaces but found 14
>,
DocType,
THelpers,
Expand Down

0 comments on commit 16e6985

Please sign in to comment.