max_key.js 909 B

1234567891011121314151617181920212223242526272829303132
  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. */
  8. var MaxKey = /** @class */ (function () {
  9. function MaxKey() {
  10. if (!(this instanceof MaxKey))
  11. return new MaxKey();
  12. }
  13. /** @internal */
  14. MaxKey.prototype.toExtendedJSON = function () {
  15. return { $maxKey: 1 };
  16. };
  17. /** @internal */
  18. MaxKey.fromExtendedJSON = function () {
  19. return new MaxKey();
  20. };
  21. /** @internal */
  22. MaxKey.prototype[Symbol.for('nodejs.util.inspect.custom')] = function () {
  23. return this.inspect();
  24. };
  25. MaxKey.prototype.inspect = function () {
  26. return 'new MaxKey()';
  27. };
  28. return MaxKey;
  29. }());
  30. exports.MaxKey = MaxKey;
  31. Object.defineProperty(MaxKey.prototype, '_bsontype', { value: 'MaxKey' });
  32. //# sourceMappingURL=max_key.js.map