# TypesManager

## Content

# Class: TypesManager

Manages operational transformation (OT) types for collaboration, enabling registration and retrieval by URI.

## Table of contents

### Constructors

- [constructor](TypesManager#constructor)

### Methods

- [getType](TypesManager#gettype)
- [register](TypesManager#register)

## Constructors

### <a id="constructor" name="constructor"></a> constructor

• **new TypesManager**()

## Methods

### <a id="gettype" name="gettype"></a> getType

▸ `Static` **getType**<`S`, `T`\>(`typeUri`): [`OT_Type`](../interfaces/OT_Type)<`S`, `T`\>

Retrieves an OT type by its URI.

#### Type parameters

| Name | Description |
| :------ | :------ |
| `S` | The type of snapshot data. |
| `T` | The type of operation data. |

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `typeUri` | `string` | The URI of the type to retrieve. |

#### Returns

[`OT_Type`](../interfaces/OT_Type)<`S`, `T`\>

The OT type associated with the specified URI.

___

### <a id="register" name="register"></a> register

▸ `Static` **register**<`S`, `T`\>(`type`): `void`

Registers a custom OT type.

#### Type parameters

| Name | Description |
| :------ | :------ |
| `S` | The type of snapshot data. |
| `T` | The type of operation data. |

#### Parameters

| Name | Type | Description |
| :------ | :------ | :------ |
| `type` | [`OT_Type`](../interfaces/OT_Type)<`S`, `T`\> | The user-defined OT type to register. |

#### Returns

`void`
