---
title: "Command"
---
# Command

Defined in: [src/modules/history/command.ts:13](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L13)

### Constructor

**new Command**(`oldValue`, `newValue`, `history`, `tick`): `Command`

Defined in: [src/modules/history/command.ts:22](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L22)

#### Parameters

| Parameter | Type |
| ------ | ------ |
| `oldValue` | [`SnapshotType`](../interfaces/types.SnapshotType.html) |
| `newValue` | [`SnapshotType`](../interfaces/types.SnapshotType.html) |
| `history` | [`IHistory`](../interfaces/types.IHistory.html) |
| `tick` | `number` |

#### Returns

`Command`

### oldValue

`readonly` **oldValue**: [`SnapshotType`](../interfaces/types.SnapshotType.html)

Defined in: [src/modules/history/command.ts:23](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L23)

***

### newValue

`readonly` **newValue**: [`SnapshotType`](../interfaces/types.SnapshotType.html)

Defined in: [src/modules/history/command.ts:24](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L24)

***

### tick

`readonly` **tick**: `number`

Defined in: [src/modules/history/command.ts:26](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L26)

### undo()

**undo**(): `void`

Defined in: [src/modules/history/command.ts:14](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L14)

#### Returns

`void`

***

### redo()

**redo**(): `void`

Defined in: [src/modules/history/command.ts:18](https://github.com/xdan/jodit/blob/main/src/modules/history/command.ts#L18)

#### Returns

`void`
