@univerjs-procollaborationinterfacesImutationtransformalgorithm

@univerjs-pro/collaboration v0.5.0-beta.1Docs


Interface: IMutationTransformAlgorithm<M, N>

A single transform algorithm. Algorithms are registered to the transform service in the form of {m1}-{m2}. When the transform service is transforming two mutations, it would find the algorithm by the form of {m1}-{m2}. m1 is the mutation on the left side, and m2 is the mutation on the right side.

Type Parameters

Type ParameterDefault type
M extends objectany
N extends objectany

Properties

PropertyTypeDefined in
m1stringpackages/collaboration/src/services/transform/transform.service.ts:25
m2?stringpackages/collaboration/src/services/transform/transform.service.ts:26

Methods

handler()

handler(m1, m2)

handler(m1, m2): ITransformMutationResult
Parameters
ParameterType
m1IMutationInfo<M>
m2IMutationInfo<N>
Returns

ITransformMutationResult

Defined in

packages/collaboration/src/services/transform/transform.service.ts:28

handler(m1, m2, onlyLater)

handler(
   m1, 
   m2, 
onlyLater?): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, "m1Prime">
Parameters
ParameterType
m1IMutationInfo<M>
m2IMutationInfo<N>
onlyLater?true
Returns

IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, "m1Prime">

Defined in

packages/collaboration/src/services/transform/transform.service.ts:29