max_key.js 931 B

123456789101112131415161718192021222324252627282930313233
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", { value: true });
  3. exports.MaxKey = void 0;
  4. /**
  5. * A class representation of the BSON MaxKey type.
  6. * @public
  7. * @category BSONType
  8. */
  9. var MaxKey = /** @class */ (function () {
  10. function MaxKey() {
  11. if (!(this instanceof MaxKey))
  12. return new MaxKey();
  13. }
  14. /** @internal */
  15. MaxKey.prototype.toExtendedJSON = function () {
  16. return { $maxKey: 1 };
  17. };
  18. /** @internal */
  19. MaxKey.fromExtendedJSON = function () {
  20. return new MaxKey();
  21. };
  22. /** @internal */
  23. MaxKey.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () {
  24. return this.inspect();
  25. };
  26. MaxKey.prototype.inspect = function () {
  27. return 'new MaxKey()';
  28. };
  29. return MaxKey;
  30. }());
  31. exports.MaxKey = MaxKey;
  32. Object.defineProperty(MaxKey.prototype, '_bsontype', { value: 'MaxKey' });
  33. //# sourceMappingURL=max_key.js.map