# CloseCommand

## Content

# Class: CloseCommand

Close command.

## Implements

- [`UndoCommandSupport`](../interfaces/UndoCommandSupport)

## Constructors

### Constructor

```ts
new CloseCommand(viewer): CloseCommand;
```

CloseCommand constructor.

#### Parameters

##### viewer

[`ImageViewerAPI`](../interfaces/ImageViewerAPI)

#### Returns

`CloseCommand`

## Properties

### name

```ts
name: "Close";
```

Optional. The unique name of the command. Used by the undo.skipCommands option setting.

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`name`](../interfaces/UndoCommandSupport#name)

## Methods

### execute()

```ts
execute(viewer): Promise<void>;
```

Action implementation.

#### Parameters

##### viewer

[`ImageViewerAPI`](../interfaces/ImageViewerAPI)

#### Returns

`Promise`&lt;`void`&gt;

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`execute`](../interfaces/UndoCommandSupport#execute)

***

### undo()

```ts
undo(viewer): Promise<void>;
```

Undo action implementation.

#### Parameters

##### viewer

[`ImageViewerAPI`](../interfaces/ImageViewerAPI)

#### Returns

`Promise`&lt;`void`&gt;

#### Implementation of

[`UndoCommandSupport`](../interfaces/UndoCommandSupport).[`undo`](../interfaces/UndoCommandSupport#undo)
