Type Alias. Command Return
sprotty / CommandReturn
CommandReturn =
SModelRootImpl|Promise<SModelRootImpl> |CommandResult
Defined in: packages/sprotty/src/base/commands/command.ts:76
Commands return the changed model or a Promise for it. Promises serve animating commands to render some intermediate states before finishing. The CommandStack is in charge of chaining these promises, such that they run sequentially only one at a time. Due to that chaining, it is essential that a command does not make any assumption on the state of the model before execute() is called.