papi-dts
    Preparing search index...

    Variable createSendCommandFunctionConst

    createSendCommandFunction: <CommandName extends keyof CommandHandlers>(
        commandName: CommandName,
    ) => (
        ...args: Parameters<CommandHandlers[CommandName]>,
    ) => Promise<Awaited<ReturnType<CommandHandlers[CommandName]>>>

    Creates a function that is a command function with a baked commandName. This is also nice because you get TypeScript type support using this function.

    Type declaration