mirror of
https://github.com/JonasunderscoreJones/jonas_jones-api.git
synced 2025-10-23 17:19:18 +02:00
36 lines
635 B
TypeScript
36 lines
635 B
TypeScript
import { BSONValue } from './bson_value';
|
|
|
|
/** @public */
|
|
export interface MaxKeyExtended {
|
|
$maxKey: 1;
|
|
}
|
|
|
|
/**
|
|
* A class representation of the BSON MaxKey type.
|
|
* @public
|
|
* @category BSONType
|
|
*/
|
|
export class MaxKey extends BSONValue {
|
|
get _bsontype(): 'MaxKey' {
|
|
return 'MaxKey';
|
|
}
|
|
|
|
/** @internal */
|
|
toExtendedJSON(): MaxKeyExtended {
|
|
return { $maxKey: 1 };
|
|
}
|
|
|
|
/** @internal */
|
|
static fromExtendedJSON(): MaxKey {
|
|
return new MaxKey();
|
|
}
|
|
|
|
/** @internal */
|
|
[Symbol.for('nodejs.util.inspect.custom')](): string {
|
|
return this.inspect();
|
|
}
|
|
|
|
inspect(): string {
|
|
return 'new MaxKey()';
|
|
}
|
|
}
|