• Merge remote into local

    Returns

    • The merged document

    Often when you are merging documents you will also need to clone them. Both arguments to merge are frozen after the call so you can no longer call mutating methods (such as change) on them. The symtom of this will be an error which says "Attempting to change an out of date document". To overcome this call clone on the argument before passing it to merge.

    Type Parameters

    • T

      The type of values contained in each document

    Parameters

    • local: Doc<T>

      The document to merge changes into

    • remote: Doc<T>

      The document to merge changes from

    Returns Doc<T>

Generated using TypeDoc