# SerializedGrowableDisjointSet

Defined in: [packages/disjoint-set/src/serialization/json.ts:28](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/serialization/json.ts#L28)

A plain, inert description of a partition. It holds no behavior and no reference to the structure it came from, so it can be stored, compared, structurally cloned, or sent through `postMessage`. It survives `JSON.stringify` when the elements themselves do.

`kind` identifies the storage layout to restore. The two arrays are parallel and always have the same length. `labels[i]` is the group of `elements[i]`. Labels are opaque. Two elements share a set when their labels are equal, and nothing else about the value is meaningful. `serializeDisjointSetJson` emits dense labels counting from 0, and `deserializeDisjointSetJson` accepts any numbers and groups them by equality.

## Type Parameters

### T

`T`

## Properties

### schemaVersion

> `readonly` **schemaVersion**: `1`

Defined in: [packages/disjoint-set/src/serialization/json.ts:30](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/serialization/json.ts#L30)

Wire-schema version.

***

### kind

> `readonly` **kind**: `"object"` | `"struct-of-arrays"`

Defined in: [packages/disjoint-set/src/serialization/json.ts:32](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/serialization/json.ts#L32)

The storage layout to restore when no factory override is supplied.

***

### elements

> `readonly` **elements**: readonly `T`\[]

Defined in: [packages/disjoint-set/src/serialization/json.ts:34](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/serialization/json.ts#L34)

Every element, in the order it was added.

***

### labels

> `readonly` **labels**: readonly `number`\[]

Defined in: [packages/disjoint-set/src/serialization/json.ts:36](https://github.com/jkomyno/knotkit/blob/ef04dc6fd5182dca281abddf3e1dcb13118c15a4/packages/disjoint-set/src/serialization/json.ts#L36)

The group label of the element at the same position.
