@univerjs/core v0.1.17 • Docs
Interface: IMutation<P, R>
Mutation would change the model of Univer applications.
Extends
ICommand
<P
,R
>
Type Parameters
Type Parameter | Default type |
---|---|
P extends 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 | MUTATION | - | ICommand .type | - | submodules/univer/packages/core/src/services/command/command.service.ts:69 (opens in a new tab) |
Methods
handler()
handler(accessor, params): R
Mutations must be a sync process.
Parameters
Parameter | Type | Description |
---|---|---|
accessor | IAccessor | - |
params | P | Params of the mutation. A mutation must has params. |
Returns
R
Overrides
Defined in
submodules/univer/packages/core/src/services/command/command.service.ts:76 (opens in a new tab)