@deepkit/bson
Version:
Deepkit BSON parser
26 lines (25 loc) • 743 B
TypeScript
export declare const hexTable: string[];
export declare const ObjectIdSymbol: unique symbol;
export declare const UUIDSymbol: unique symbol;
export declare function isUUID(v: any): v is UUID;
export declare function isObjectId(v: any): v is ObjectId;
/**
* Thin wrapper around the native type to allow to serialize it correctly
* in types like t.any.
*/
export declare class ObjectId {
id: string;
static index: number;
[ObjectIdSymbol]: boolean;
constructor(id: string);
static generate(time?: number): string;
}
/**
* Thin wrapper around the native type to allow to serialize it correctly
* in types like t.any.
*/
export declare class UUID {
id: string;
[UUIDSymbol]: boolean;
constructor(id: string);
}