ParseInstallation.js 804 B

12345678910111213141516171819202122232425262728
  1. /**
  2. * Copyright (c) 2015-present, Parse, LLC.
  3. * All rights reserved.
  4. *
  5. * This source code is licensed under the BSD-style license found in the
  6. * LICENSE file in the root directory of this source tree. An additional grant
  7. * of patent rights can be found in the PATENTS file in the same directory.
  8. *
  9. * @flow
  10. */
  11. import ParseObject from './ParseObject';
  12. /*:: import type { AttributeMap } from './ObjectStateMutations';*/
  13. export default class Installation extends ParseObject {
  14. constructor(attributes
  15. /*: ?AttributeMap*/
  16. ) {
  17. super('_Installation');
  18. if (attributes && typeof attributes === 'object') {
  19. if (!this.set(attributes || {})) {
  20. throw new Error('Can\'t create an invalid Session');
  21. }
  22. }
  23. }
  24. }
  25. ParseObject.registerSubclass('_Installation', Installation);