• Load an automerge document from a compressed document produce by save

    Type Parameters

    • T

      The type of the value which is contained in the document. Note that no validation is done to make sure this type is in fact the type of the contained value so be a bit careful

    Parameters

    • data: Uint8Array

      The compressed document

    • Optional _opts: string | InitOptions<T>

      Either an actor ID or some InitOptions, if the actor ID is null a random actor ID will be created

      Note that load will throw an error if passed incomplete content (for example if you are receiving content over the network and don't know if you have the complete document yet). If you need to handle incomplete content use init followed by loadIncremental.

    Returns Doc<T>

Generated using TypeDoc