store_value.ts 502 B

1234567891011121314151617181920212223242526
  1. import { IStoreValue } from "./istore_value";
  2. import { IType } from "../../../typeSystem/itype";
  3. export class StoreValue implements IStoreValue {
  4. public type: IType;
  5. public id?: String;
  6. public isConst: boolean;
  7. public value: any;
  8. constructor(type: IType, value: any, id?:String, isConst = false) {
  9. this.type = type;
  10. this.id = id;
  11. this.isConst = isConst
  12. this.value = value;
  13. }
  14. get (): any {
  15. return this.value;
  16. }
  17. inStore () {
  18. return this.id != null;
  19. }
  20. }