| 11 | [pluginContextSymbol]?: IPublicModelPluginContext; |
| 12 | |
| 13 | constructor(innerCommand: ICommand, pluginContext?: IPublicModelPluginContext, options?: ICommandOptions) { |
| 14 | this[commandSymbol] = innerCommand; |
| 15 | this[optionsSymbol] = options; |
| 16 | this[pluginContextSymbol] = pluginContext; |
| 17 | const commandScope = options?.commandScope; |
| 18 | if (commandScope && commandScopeSet.has(commandScope)) { |
| 19 | throw new Error(`Command scope "${commandScope}" has been registered.`); |
| 20 | } |
| 21 | } |
| 22 | |
| 23 | registerCommand(command: IPublicTypeCommand): void { |
| 24 | this[commandSymbol].registerCommand(command, this[optionsSymbol]); |