/** * Interface pour le module MongoID */ export interface MongoIDModule { _looksLikeObjectID: (str: string) => boolean; ObjectID: typeof ObjectID; } /** * Représentation minimaliste d'un ObjectID Mongo (stocke l'hex en interne). */ declare class ObjectID { private _str?; /** * @param hexString - Chaîne hexadécimale (24 chars). Si omise, l'instance est vide. * @throws {Error} Si `hexString` est fournie mais invalide. */ constructor(hexString?: string); /** * Compare à un autre ObjectID. */ equals(other: unknown): boolean; /** * Représentation lisible (style Mongo shell). */ toString(): string; /** * Clone l'ObjectID. */ clone(): ObjectID; /** * Nom de type EJSON. */ typeName(): "oid"; /** * Timestamp (secondes) extrait des 4 premiers octets. * @returns Nombre de secondes depuis l'époque Unix. */ getTimestamp(): number; /** * Valeur primitive (hex). */ valueOf(): string | undefined; /** * Valeur JSON (hex). */ toJSONValue(): string | undefined; /** * Chaîne hexadécimale (24 chars). */ toHexString(): string | undefined; } declare const MongoID: MongoIDModule; export default MongoID;