( ns: typeof commands, key: K, ...args: Parameters<ICommandTypes[K]> )
| 156 | * Typed guard for running a command. |
| 157 | */ |
| 158 | export const runCommand = async <K extends keyof ICommandTypes>( |
| 159 | ns: typeof commands, |
| 160 | key: K, |
| 161 | ...args: Parameters<ICommandTypes[K]> |
| 162 | ): Promise<ReturnType<ICommandTypes[K]>> => |
| 163 | (await ns.executeCommand(key, ...args)) as ReturnType<ICommandTypes[K]>; |
| 164 | |
| 165 | /** |
| 166 | * Typed guard for creating a {@link Command} interface. |
no outgoing calls
no test coverage detected