Skip to content

Commit

Permalink
fix(NODE-4957): Missing callback typings for insertOne method (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
xxxLukskyxxx authored Jan 17, 2023
1 parent dc31f90 commit 613e4b7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion mongodb-legacy.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,10 @@ declare class LegacyCollection<TSchema extends Document = Document> extends Coll
* @param options - Optional settings for the command
* @param callback - An optional callback, a Promise will be returned if none is provided
*/
insertOne(doc: OptionalUnlessRequiredId<TSchema>, options?: InsertOneOptions): Promise<InsertOneResult<TSchema>>;
insertOne(doc: OptionalUnlessRequiredId<TSchema>): Promise<InsertOneResult<TSchema>>;
insertOne(doc: OptionalUnlessRequiredId<TSchema>, callback: Callback<InsertOneResult<TSchema>>): void;
insertOne(doc: OptionalUnlessRequiredId<TSchema>, options: InsertOneOptions): Promise<InsertOneResult<TSchema>>;
insertOne(doc: OptionalUnlessRequiredId<TSchema>, options: InsertOneOptions, callback: Callback<InsertOneResult<TSchema>>): void;
/**
* Inserts an array of documents into MongoDB. If documents passed in do not contain the **_id** field,
* one will be added to each of the documents missing it by the driver, mutating the document. This behavior
Expand Down

0 comments on commit 613e4b7

Please sign in to comment.