# ActionRunner
Source: https://docs.maelstrom-ai.co/0.2/reference/react/type-aliases/actionrunner/
Documentation revision: 89a8f5e9d10cedcf0b30376d7846113f06f26120
SDK manifests in this build: @maelstrom-co/react@0.2.1, @maelstrom-co/client@0.2.1, @maelstrom-co/connectors@0.2.1, @maelstrom-co/protocol@0.2.1, @maelstrom-co/engine@0.2.1
These docs follow this source revision. Manifest versions do not prove release compatibility; verify the installed package exports before using an API.

> **ActionRunner**<`V`\> = `Partial`<`{ [Name in ActionNames<V>]: ActionHandler<GetActionParams<GetAllActions<V>, Name>> }`\>

Defined in: packages/client/dist/lib/command-processor/action-runner.types.d.ts:72

Typed action runner map keyed by action name. All action handlers are optional, but type inference is preserved for any handlers that are implemented.

## Type Parameters

### V

`V` _extends_ `VesselDefinition` = `VesselDefinition`

## Example

```typescript
import { ok } from '@maelstrom-co/protocol';

const runner: ActionRunner<typeof myVessel> = {
  selectOrder: (params) => {
    // params is fully typed based on vessel definition
    console.log(params.orderId);
    return ok(undefined);
  },
  closeOrderDetails: () => {
    return ok(undefined);
  },
};
```
