Skip to content

Commit

Permalink
Fixes to type for _id in MongoDB documents return with $db.f (#223)
Browse files Browse the repository at this point in the history
* The literal `false` gives an error when used as `_id`

* Allow querying `_id` with full `#db.ObjectId` structure

* Typo fix
  • Loading branch information
danswann authored Dec 29, 2024
1 parent 8ea4b63 commit 412ee2f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions env.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -720,8 +720,8 @@ type MongoTypeStringsToTypes = {

type MongoTypeString = keyof MongoTypeStringsToTypes
type MongoTypeNumber = -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 16 | 17 | 18 | 19 | 127
type MongoId = Exclude<MongoPrimitive, null> | MongoObjectId | MongoObject
type MongoQueryId = Exclude<MongoPrimitive, null> | MongoQueryObject
type MongoId = Exclude<MongoPrimitive, null | false> | MongoObjectId | MongoObject
type MongoQueryId = Exclude<MongoPrimitive, null | false> | MongoObjectId | MongoQueryObject
type MongoDocument = MongoObject & { _id?: MongoId }

type MongoQueryType<TQuery extends MongoQueryObject> = {
Expand Down

0 comments on commit 412ee2f

Please sign in to comment.