> ## Documentation Index
> Fetch the complete documentation index at: https://botmesh.afaya.com.co/llms.txt
> Use this file to discover all available pages before exploring further.

# ChooseOption<S>

> Type alias exported by @botmesh/core.

```ts theme={null}
type ChooseOption<S> = 
  | string
  | {
  label: string;
  then?:   | FlowBuilder<object>
     | CompiledFlow
     | FlowAction<S>;
  goto?: string | FlowBuilder<object>;
};
```

Defined in: [flows/FlowBuilder.ts:171](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L171)

One option of `.choose()`: a label, or a label plus what happens when it is picked.

## Type Parameters

| Type Parameter | Default type |
| - | - |
|  `S` *extends* `object` | [`EmptyFlowState`](https://botmesh.afaya.com.co/api/core/type-aliases/EmptyFlowState) |

## Union Members

`string`

***

### Type Literal

```ts theme={null}
{
  label: string;
  then?:   | FlowBuilder<object>
     | CompiledFlow
     | FlowAction<S>;
  goto?: string | FlowBuilder<object>;
}
```

| Name | Type | Description | Defined in |
| - | - | - | - |
| `label` | `string` | - | [flows/FlowBuilder.ts:174](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L174) |
| `then?` | \| [`FlowBuilder`](https://botmesh.afaya.com.co/api/core/classes/FlowBuilder)\<`object`> \| [`CompiledFlow`](https://botmesh.afaya.com.co/api/core/interfaces/CompiledFlow) \| [`FlowAction`](https://botmesh.afaya.com.co/api/core/type-aliases/FlowAction)\<`S`> | Inline sub-flow (runs and RETURNS to the parent, sharing `c.state`) or an action. | [flows/FlowBuilder.ts:176](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L176) |
| `goto?` | `string` \| [`FlowBuilder`](https://botmesh.afaya.com.co/api/core/classes/FlowBuilder)\<`object`> | Leave this flow for another conversation (e.g. `volver: { label: 'Volver', goto: menu }`). | [flows/FlowBuilder.ts:178](https://github.com/andresayac/botmesh/blob/main/packages/core/src/flows/FlowBuilder.ts#L178) |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.