1 | ;
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.execute = void 0;
|
4 | /**
|
5 | * Executes a Command and returns its promisified result.
|
6 | *
|
7 | * @stable
|
8 | */
|
9 | function 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 | }
|
18 | exports.execute = execute;
|
19 | //# sourceMappingURL=command.js.map |
\ | No newline at end of file |