Home Reference Source

src/core/Serializable.js

  1. /**
  2. * The Serializable contract.
  3. *
  4. * Implemented by objects that can provide a flat representation of the data
  5. * they contain.
  6. *
  7. * @interface
  8. */
  9.  
  10. export class Serializable {
  11.  
  12. /**
  13. * Serialises this data.
  14. *
  15. * @param {Boolean} [deflate=false] - Whether the data should be compressed if possible.
  16. * @return {Object} The serialised data.
  17. */
  18.  
  19. serialize(deflate = false) {}
  20.  
  21. }