opusdev/vector-similarity-api
1
1import { BSON_MAJOR_VERSION } from './constants';2import { type InspectFn } from './parser/utils';3import { BSON_VERSION_SYMBOL } from './constants';4 5/** @public */6export abstract class BSONValue {7 /** @public */8 public abstract get _bsontype(): string;9 10 /** @internal */11 get [BSON_VERSION_SYMBOL](): typeof BSON_MAJOR_VERSION {12 return BSON_MAJOR_VERSION;13 }14 15 [Symbol.for('nodejs.util.inspect.custom')](16 depth?: number,17 options?: unknown,18 inspect?: InspectFn19 ): string {20 return this.inspect(depth, options, inspect);21 }22 23 /**24 * @public25 * Prints a human-readable string of BSON value information26 * If invoked manually without node.js.inspect function, this will default to a modified JSON.stringify27 */28 public abstract inspect(depth?: number, options?: unknown, inspect?: InspectFn): string;29 30 /** @internal */31 abstract toExtendedJSON(): unknown;32}33 