UNPKG

intentful

Version:

Create Custom Skills with less headache

24 lines (23 loc) 855 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.SelectCommand = void 0; const command_1 = require("./command"); const helpers_1 = require("../interfaces/helpers"); class SelectCommand extends command_1.Command { constructor(props) { super('Select', props); } commandSpecificModel() { return { commands: this.props.commands, data: this.props.data, otherwise: this.props.otherwise }; } commandSpecificRequestHandlers() { const commandHandlers = (0, helpers_1.convertCommandListToRequestHandlers)(this.props.commands); const otherwiseHandlers = (0, helpers_1.convertCommandListToRequestHandlers)(this.props.otherwise); return [...commandHandlers, ...otherwiseHandlers]; } } exports.SelectCommand = SelectCommand;