ComposableTask.js 1.1 KB

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