You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
37 lines
635 B
TypeScript
37 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()';
|
|
}
|
|
}
|