query-promise.js 579 B

123456789101112131415161718192021222324252627
  1. import { entityKind } from "./entity.js";
  2. class QueryPromise {
  3. static [entityKind] = "QueryPromise";
  4. [Symbol.toStringTag] = "QueryPromise";
  5. catch(onRejected) {
  6. return this.then(void 0, onRejected);
  7. }
  8. finally(onFinally) {
  9. return this.then(
  10. (value) => {
  11. onFinally?.();
  12. return value;
  13. },
  14. (reason) => {
  15. onFinally?.();
  16. throw reason;
  17. }
  18. );
  19. }
  20. then(onFulfilled, onRejected) {
  21. return this.execute().then(onFulfilled, onRejected);
  22. }
  23. }
  24. export {
  25. QueryPromise
  26. };
  27. //# sourceMappingURL=query-promise.js.map