UNPKG

457 BJavaScriptView Raw
1"use strict";
2Object.defineProperty(exports, "__esModule", { value: true });
3exports.execute = void 0;
4/**
5 * Executes a Command and returns its promisified result.
6 *
7 * @stable
8 */
9function execute(command, args) {
10 const result = args ? command(args) : command();
11 if (result instanceof Promise) {
12 return result;
13 }
14 else {
15 return Promise.resolve(result);
16 }
17}
18exports.execute = execute;
19//# sourceMappingURL=command.js.map
\No newline at end of file