code: function promiseSequence(promiseFactories) {
      return __awaiter(this, void 0, void 0, function* () {
          const ret = [];
          for (const f of promiseFactories) {
              ret.push(yield f());
          }
          return ret;
      });
  }
docs: Executes the given promise-returning functions in sequence
  @param promiseFactories An array of promise-returning functions
  @returns An array containing all return values of the executed promises