@univerjs/core v0.1.17 • Docs
Interface: IOperation<P, R>
Operation would change the state of Univer applications. State should only be in memory and does not require conflicting resolution.
Extends
ICommand
<P
,R
>
Type Parameters
Type Parameter | Default type |
---|---|
P extends object | object |
R | boolean |
Properties
Property | Modifier | Type | Description | Overrides | Inherited from | Defined in |
---|---|---|---|---|---|---|
id | readonly | string | ${businessName}.${type}.${name} | - | ICommand .id | submodules/univer/packages/core/src/services/command/command.service.ts:40 (opens in a new tab) |
onDispose? | public | () => void | When this command is unregistered, this function would be called. Deprecated | - | ICommand .onDispose | submodules/univer/packages/core/src/services/command/command.service.ts:50 (opens in a new tab) |
type | public | OPERATION | - | ICommand .type | - | submodules/univer/packages/core/src/services/command/command.service.ts:84 (opens in a new tab) |
Methods
handler()
handler(accessor, params): R
Operations must be a sync process.
Parameters
Parameter | Type | Description |
---|---|---|
accessor | IAccessor | - |
params | P | Params of the operation. A operation must has params. |
Returns
R
Overrides
Defined in
submodules/univer/packages/core/src/services/command/command.service.ts:91 (opens in a new tab)