storeObject.js 286 B

1234567891011121314
  1. export class StoreObject {
  2. constructor(type, value, readOnly = false) {
  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. return false;
  11. }
  12. }