method IMongoCollection.deleteOne
IMongoCollection.deleteOne(
filter: Record<string, unknown>,
): Promise<{ deletedCount: number; }>

Deletes matching documents.

Parameters

filter: Record<string, unknown>

The match filter

optional
options: MongoWriteOptions

The operation options (e.g. a session)

Return Type

Promise<{ deletedCount: number; }>

{ deletedCount }

Usage

import { type IMongoCollection } from "database-plugin/src/index.ts";