API Reference
@univerjs
@univerjs/core
interfaces
Ioperation

@univerjs/core v0.1.17Docs


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

Type Parameters

Type ParameterDefault type
P extends objectobject
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)
typepublicOPERATION-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

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

Returns

R

Overrides

ICommand.handler

Defined in

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


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