---
title: "ICommandFactory | Customer's Canvas On-Premises"
canonical: "https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommandFactory/"
---

# ICommandFactory

> Creates a command of the required type.

## Interfaces

### ICommandFactory

#### Methods

##### create()

```ts
create(type, initData?): ICommand;
```

###### Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `type` | [`CommandType`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/CommandType.md#commandtype) | command type. |
| `initData?` | `any` | data required to initialize the command. |

###### Returns

[`ICommand`](https://customerscanvas.com/docs/on-premises/design-atoms-js/reference/design-atoms-text/ICommand.md#icommand)
