UNPKG

@deliverr/serverless-offline-step-functions

Version:

Serverless Offline Plugin to Support Step Functions for Local Development

27 lines (26 loc) 766 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.Catcher = void 0; class Catcher { constructor(_ErrorEquals, _Next, _ResultPath) { this._ErrorEquals = _ErrorEquals; this._Next = _Next; this._ResultPath = _ResultPath; } static create(taskCatchRule) { return new Catcher(taskCatchRule.ErrorEquals, taskCatchRule.Next, taskCatchRule.ResultPath); } get Next() { return this._Next; } get ErrorEquals() { return this._ErrorEquals; } get ResultPath() { return this._ResultPath; } includesSomeOf(statesErrors) { return statesErrors.some((statesError) => this.ErrorEquals.includes(statesError)); } } exports.Catcher = Catcher;