Home > @i2analyze/notebook-sdk > commands > ICommandApi > createCommand
commands.ICommandApi.createCommand() method
Creates a command, and registers it with the application.
Signature:
createCommand<TCommandType extends CommandType>(config: ICommandConfig<TCommandType>): ICommand;
Introduced: version 1.0
Type Parameters
| Parameter | Type | Description |
|---|---|---|
| TCommandType | extends CommandType | The type of the command. |
Parameters
| Parameter | Type | Description |
|---|---|---|
| config | ICommandConfig<TCommandType> | The information necessary for creating the command. |
Returns:
The registered command.
Exceptions
Error if the config was not valid.