interface IMongoObjectIdCtor
Since 0.1.0

The driver ObjectId constructor shape.

Constructors

(value?: string): IMongoObjectId

Constructs a new ObjectId.

Parameters
optional
value: string

A 24-hex string (or no argument, for a fresh random id)

Methods

isValid(value: unknown): boolean

Tests whether a value is a valid ObjectId — exactly a 24-hex string, so a 12-char value is rejected.

Usage

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