---
url: /api/kiln/functions/inState.md
---
[Kiln API](../../index.md) / [kiln](../index.md) / inState

# Function: inState()

```ts
function inState<S>(s, value): Condition;
```

Run condition: true while the state is `value`.

## Type Parameters

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

## Parameters

| Parameter | Type |
| ------ | ------ |
| `s` | [`State`](../interfaces/State.md)<`S`> |
| `value` | `S` |

## Returns

[`Condition`](../type-aliases/Condition.md)
