storeObject.js 288 B

123456789101112131415
  1. export class StoreObject {
  2. constructor (type, value, readOnly) {
  3. this.type = type;
  4. this.value = value;
  5. this.readOnly = readOnly;
  6. }
  7. isCompatible (another) {
  8. if( another instanceof StoreObject) {
  9. return this.type === another.type;
  10. }
  11. return false;
  12. }
  13. }