checks.js 614 B

1234567891011121314151617181920212223242526272829303132
  1. import { entityKind } from "../entity.js";
  2. class CheckBuilder {
  3. constructor(name, value) {
  4. this.name = name;
  5. this.value = value;
  6. }
  7. static [entityKind] = "GelCheckBuilder";
  8. brand;
  9. /** @internal */
  10. build(table) {
  11. return new Check(table, this);
  12. }
  13. }
  14. class Check {
  15. constructor(table, builder) {
  16. this.table = table;
  17. this.name = builder.name;
  18. this.value = builder.value;
  19. }
  20. static [entityKind] = "GelCheck";
  21. name;
  22. value;
  23. }
  24. function check(name, value) {
  25. return new CheckBuilder(name, value);
  26. }
  27. export {
  28. Check,
  29. CheckBuilder,
  30. check
  31. };
  32. //# sourceMappingURL=checks.js.map