Skip to content

Commit c63a21b

Browse files
authored
fix(NODE-3621): fixed type of documentKey property on ChangeStreamDocument (#3118)
1 parent deb8544 commit c63a21b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/change_stream.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export interface ChangeStreamDocument<TSchema extends Document = Document> {
144144
* this will contain all the components of the shard key in order,
145145
* followed by the _id if the _id isn’t part of the shard key.
146146
*/
147-
documentKey?: InferIdType<TSchema>;
147+
documentKey?: { _id: InferIdType<TSchema> };
148148

149149
/**
150150
* Only present for ops of type ‘update’.

0 commit comments

Comments
 (0)