UNPKG

node-sagas

Version:

Library for handling distributed transactions in the microservices architecture

28 lines 638 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); class Step { constructor(name = '') { this.name = name; } setInvocation(method) { this.invocation = method; } setCompensation(method) { this.compensation = method; } async invoke(params) { if (this.invocation) { return this.invocation(params); } } async compensate(params) { if (this.compensation) { return this.compensation(params); } } getName() { return this.name; } } exports.Step = Step; //# sourceMappingURL=step.js.map