MCPcopy Index your code
hub / github.com/alibaba/lowcode-engine / constructor

Method constructor

packages/shell/src/api/command.ts:13–21  ·  view source on GitHub ↗
(innerCommand: ICommand, pluginContext?: IPublicModelPluginContext, options?: ICommandOptions)

Source from the content-addressed store, hash-verified

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]);

Callers

nothing calls this directly

Calls 1

hasMethod · 0.65

Tested by

no test coverage detected