• A function to subscribe [source] to [sink].

    Be aware that this function is producing a diff to the actual SCL. It is therefore crucial to make sure that at the point of calling this function the SCL is up to date.

    Parameters

    Returns (Insert | Update)[]

    An array of edits to do a valid subscription

    Example

    // do not do this
    const diff1 = subscribe(conn1);
    const diff2 = subscribe(conn2);
    .dispatch(editEvent([diff1, diff2]));

    // better do this
    const diff = subscribe([conn1, conn2]);
    .dispatch(editEvent(diff))

Generated using TypeDoc