# `HistoryGroup`

> Contract 2.0.0 · package sha256 `a857eca95b35921109faf997094bb4192f12527d9d0fcd4be7e97f06425bad6e` · generated from `configurator-runtime.d.ts` by `services/onsite-scripter/scripts/build-contract-docs.mjs`; edit the source, not this file.

Interface · `import type { HistoryGroup } from '@holostep-configurators/runtime-client/contract';` · stable · since 2.0.0 · section 5. Writers, transactions, session

The handle [`history.group()`](History.group.md) returns. What joins its one undo step and what ends it:
[`History.group`](History.group.md). A write called once it is not open that passes it as `expectGroup` is
refused 'conflict'.

## Members

| Member | Kind | Summary |
| --- | --- | --- |
| <a id="open"></a>[`open`](HistoryGroup.open.md) | property | False once the group ended: `commit()`, a call of [`undo()`](Session.undo.md) or [`redo()`](Session.redo.md), a shopper write's call (an 'assistant' group only), its timeout, its signal, or a newer group. |
| <a id="label"></a>[`label`](HistoryGroup.label.md) | property | The undo label of the group's step. |
| <a id="actor"></a>[`actor`](HistoryGroup.actor.md) | property | The actor the group was opened with; the default `actor` of writes that pass it as `expectGroup`. |
| <a id="commit"></a>[`commit`](HistoryGroup.commit.md) | method | Ends the group: writes called from now on are not in it; writes called while it was open still join its step when they commit, unless history changed first. |

## Declaration

```ts
export interface HistoryGroup {
  readonly open: boolean;
  readonly label: string;
  readonly actor: Actor;
  commit(): void;
}
```

## Generic-API test (spec 3.1)

| Rule | Result |
| --- | --- |
| 1. Neutral name | pass: `HistoryGroup` names no product |
| 2. A precedent | pass: [Unity Undo.CollapseUndoOperations](https://docs.unity3d.com/ScriptReference/Undo.CollapseUndoOperations.html) (row `X7`) |
| 3. Two apps, or labs | pass: 6 apps (ledger: app-04c2774145, app-37356bf09f, app-4762caacdc, app-bcb7ef21da, app-f3598fad77; fleet cross-check: app-04c2774145, app-37356bf09f, app-4762caacdc, app-510d750508, app-bcb7ef21da, app-f3598fad77) |
| 4. The cheaper fix first | decided per need in Appendix B: rows `X7` at tier stable (a member only where no rule, data, asset or app code serves the need) |
