ComposableTask.js 1006 B

12345678910111213141516171819202122232425262728
  1. import { __awaiter, __generator } from "tslib";
  2. var ComposableTask = /** @class */ (function () {
  3. function ComposableTask() {
  4. }
  5. ComposableTask.prototype.then = function (onfulfilled) {
  6. return __awaiter(this, void 0, void 0, function () {
  7. var _a;
  8. return __generator(this, function (_b) {
  9. switch (_b.label) {
  10. case 0:
  11. _a = onfulfilled;
  12. return [4 /*yield*/, this.run()];
  13. case 1: return [2 /*return*/, _a.apply(void 0, [_b.sent()])];
  14. }
  15. });
  16. });
  17. };
  18. ComposableTask.prototype.run = function () {
  19. return __awaiter(this, void 0, void 0, function () {
  20. return __generator(this, function (_a) {
  21. throw new Error('ComposableTask - run is not implemented');
  22. });
  23. });
  24. };
  25. return ComposableTask;
  26. }());
  27. export { ComposableTask };
  28. //# sourceMappingURL=ComposableTask.js.map