API Reference
@univerjs
@univerjs/core
interfaces
Imutation

@univerjs/core v0.1.17Docs


Interface: IMutation<P, R>

Mutation would change the model of Univer applications.

Extends

Type Parameters

Type ParameterDefault type
P extends object-
Rboolean

Properties

PropertyModifierTypeDescriptionOverridesInherited fromDefined in
idreadonlystring${businessName}.${type}.${name}-ICommand.idsubmodules/univer/packages/core/src/services/command/command.service.ts:40 (opens in a new tab)
onDispose?public() => voidWhen this command is unregistered, this function would be called. Deprecated-ICommand.onDisposesubmodules/univer/packages/core/src/services/command/command.service.ts:50 (opens in a new tab)
typepublicMUTATION-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

ParameterTypeDescription
accessorIAccessor-
paramsPParams of the mutation. A mutation must has params.

Returns

R

Overrides

ICommand.handler

Defined in

submodules/univer/packages/core/src/services/command/command.service.ts:76 (opens in a new tab)


Copyright © 2021-2024 DreamNum Co,Ltd. All Rights Reserved.