---
title: ChartState
description: A state node.
---

# `ChartState`

Type, in `@jr2/orchestrator/src/chart.ts`. The signature of an export, or a type that it names, names this type. The [Authoring surface](../authoring-surface.md) page lists each export. This type is not an export of `@jr2/orchestrator`, so a workflow module does not import it by name.

```ts
type ChartState = {
  type?: "atomic" | "compound" | "parallel" | "final" | "history";
  initial?: string;
  states?: Record<string, ChartState>;
  history?: "shallow" | "deep";
  invoke?: ChartInvoke | ChartInvoke[];
  on?: Record<string, ChartTransitions>;
  always?: ChartTransitions;
  after?: Record<string, ChartTransitions>;
  entry?: ChartAction[];
  exit?: ChartAction[];
  output?: ChartValue;
  meta?: ChartJson;
  tags?: string[];
  description?: string;
};
```

A state node.

**Fields**

- `type` (optional): `"atomic" | "compound" | "parallel" | "final" | "history"`
- `initial` (optional): `string`
- `states` (optional): `Record<string, ChartState>`
- `history` (optional): `"shallow" | "deep"`
- `invoke` (optional): `ChartInvoke | ChartInvoke[]`
- `on` (optional): `Record<string, ChartTransitions>`
- `always` (optional): [`ChartTransitions`](type-charttransitions.md)
- `after` (optional): `Record<string, ChartTransitions>`
- `entry` (optional): `ChartAction[]`
- `exit` (optional): `ChartAction[]`
- `output` (optional): [`ChartValue`](type-chartvalue.md)
- `meta` (optional): [`ChartJson`](type-chartjson.md)
- `tags` (optional): `string[]`
- `description` (optional): `string`
