method IMongoCollection.findOneAndUpdate IMongoCollection.findOneAndUpdate(filter: Record<string, unknown>,update: Record<string, unknown>,options: IMongoCollectionFindOneAndUpdateOptions): Promise<Record<string, unknown> | null> Finds one document and applies an update, returning the updated document. Parameters filter: Record<string, unknown> The match filter update: Record<string, unknown> The update document ($set form) options: IMongoCollectionFindOneAndUpdateOptions The findOneAndUpdate options Return Type Promise<Record<string, unknown> | null> The updated document, or null when none matched