# calculateStateMachineCoverage

**Kind:** Function

**Source:** [`atloria-monorepo/libs/parser-core/src/utils/coverage-calculator.ts`](https://github.com/sherkety/atloria/blob/main/atloria-monorepo/libs/parser-core/src/utils/coverage-calculator.ts#L144)

Calculate coverage for a single state machine

## Signature

```ts
function calculateStateMachineCoverage(stateMachine: StateMachine, screenshots: EnhancedScreenshotMetadata[], interactions: UIInteraction[]): StateMachineCoverage
```

## Parameters

| Name | Type |
|---|---|
| `stateMachine` | `StateMachine` |
| `screenshots` | `EnhancedScreenshotMetadata[]` |
| `interactions` | `UIInteraction[]` |

**Returns:** `StateMachineCoverage`
