Interface ICommandHistory
History of executed commands.
Package: @aurigma/design-atoms-text
Methods
addCommand(command)
Adds the executed command to history.
Declaration
addCommand(command: ICommand): void;
Parameters
| Type | Name | Description |
|---|---|---|
| ICommand | command |
executed command. |
Returns
| Type | Description |
|---|---|
| void |
clearHistory()
Clears the history of executed commands.
Declaration
clearHistory(): void;
Returns
| Type | Description |
|---|---|
| void |
getCommandsCount()
Returns the number of commands in history.
Declaration
getCommandsCount(): number;
Returns
| Type | Description |
|---|---|
| number |
getLastCommand(index)
Returns the last command executed from history by index.
Declaration
getLastCommand(index?: number): ICommand;
Parameters
| Type | Name | Description |
|---|---|---|
| number | index |
command index ('0' used for the most recent command). |
Returns
| Type | Description |
|---|---|
| ICommand |