> ## 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.

# FlowStateWith<S, K, V>

> Type alias exported by @botmesh/core.

```ts theme={null}
type FlowStateWith<S, K, V> = string extends K ? S : { [P in keyof S | K]: P extends K ? V : P extends keyof S ? S[P] : never };
```

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

`S` with key `K` set to `V` (replacing any previous type of `K`). A non-literal key
(`K = string`) cannot be tracked, so `S` is returned unchanged — the value stays reachable
as `unknown` through the open index signature of [FlowControls](https://botmesh.afaya.com.co/api/core/type-aliases/FlowControls.md).

## Type Parameters

| Type Parameter |
| - |
|  `S` |
|  `K` *extends* `string` |
|  `V` |


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