ParseInstallation.js 1015 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. "use strict";
  2. Object.defineProperty(exports, "__esModule", {
  3. value: true
  4. });
  5. exports.default = void 0;
  6. var _ParseObject = _interopRequireDefault(require("./ParseObject"));
  7. function _interopRequireDefault(obj) {
  8. return obj && obj.__esModule ? obj : {
  9. default: obj
  10. };
  11. }
  12. /**
  13. * Copyright (c) 2015-present, Parse, LLC.
  14. * All rights reserved.
  15. *
  16. * This source code is licensed under the BSD-style license found in the
  17. * LICENSE file in the root directory of this source tree. An additional grant
  18. * of patent rights can be found in the PATENTS file in the same directory.
  19. *
  20. * @flow
  21. */
  22. class Installation extends _ParseObject.default {
  23. constructor(attributes
  24. /*: ?AttributeMap*/
  25. ) {
  26. super('_Installation');
  27. if (attributes && typeof attributes === 'object') {
  28. if (!this.set(attributes || {})) {
  29. throw new Error('Can\'t create an invalid Session');
  30. }
  31. }
  32. }
  33. }
  34. exports.default = Installation;
  35. _ParseObject.default.registerSubclass('_Installation', Installation);