@univerjs-pro/collaboration v0.5.0-beta.1 • Docs
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 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()
handler(m1, m2)
handler(m1, m2): ITransformMutationResult
Parameters
Parameter | Type |
---|---|
m1 | IMutationInfo <M > |
m2 | IMutationInfo <N > |
Returns
Defined in
packages/collaboration/src/services/transform/transform.service.ts:28
handler(m1, m2, onlyLater)
handler(
m1,
m2,
onlyLater?): IFailureTransformMutationResult | Omit<ISuccessTransformMutationResult, "m1Prime">
Parameters
Parameter | Type |
---|---|
m1 | IMutationInfo <M > |
m2 | IMutationInfo <N > |
onlyLater ? | true |
Returns
IFailureTransformMutationResult
| Omit
<ISuccessTransformMutationResult
, "m1Prime"
>
Defined in
packages/collaboration/src/services/transform/transform.service.ts:29