@univerjs-pro/collaboration v0.5.4
Interface: IMutationTransformAlgorithm<M, N>
Defined in: packages/collaboration/src/services/transform/transform.service.ts:24
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 Parameter | Default type |
---|---|
M extends object | any |
N extends object | any |
Properties
Property | Type | Defined in |
---|---|---|
m1 | string | packages/collaboration/src/services/transform/transform.service.ts:25 |
m2? | string | packages/collaboration/src/services/transform/transform.service.ts:26 |
Methods
handler()
Call Signature
handler(m1, m2): ITransformMutationResult
Defined in: packages/collaboration/src/services/transform/transform.service.ts:28
Parameters
Parameter | Type |
---|---|
m1 | IMutationInfo <M > |
m2 | IMutationInfo <N > |
Returns
Call Signature
handler(
m1,
m2,
onlyLater?):
| IFailureTransformMutationResult
| Omit<ISuccessTransformMutationResult, "m1Prime">
Defined in: packages/collaboration/src/services/transform/transform.service.ts:29
Parameters
Parameter | Type |
---|---|
m1 | IMutationInfo <M > |
m2 | IMutationInfo <N > |
onlyLater ? | true |
Returns
| IFailureTransformMutationResult
| Omit
<ISuccessTransformMutationResult
, "m1Prime"
>