From ccba4b6354c38476ab1918719f8f9f186e534117 Mon Sep 17 00:00:00 2001 From: Jakob Heuser Date: Fri, 20 Oct 2023 22:57:11 -0700 Subject: [PATCH] fix: Fixes type on return of insertOne --- src/client.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/client.ts b/src/client.ts index 3be049a..27da270 100644 --- a/src/client.ts +++ b/src/client.ts @@ -1,5 +1,5 @@ import { type OutgoingHttpHeaders } from "node:http"; -import { EJSON } from "bson"; +import { EJSON, type ObjectId } from "bson"; import type { Sort, Filter, @@ -275,7 +275,7 @@ export class Collection { */ async insertOne( document: OptionalUnlessRequiredId - ): Promise> { + ): Promise> { return this.callApi("insertOne", { document, });