UNPKG

325 BTypeScriptView Raw
1/**
2 * Common call signature for a command.
3 *
4 * @stable
5 */
6export interface Command<Arguments, Result> {
7 (args?: Arguments): Result | Promise<Result>;
8}
9/**
10 * Executes a Command and returns its promisified result.
11 *
12 * @stable
13 */
14export declare function execute<A, R>(command: Command<A, R>, args?: A): Promise<R>;