InitOptions<T>: {
    actor?: ActorId;
    allowMissingChanges?: boolean;
    convertRawStringsToText?: boolean;
    freeze?: boolean;
    patchCallback?: PatchCallback<T>;
}

Type Parameters

  • T

Type declaration

  • Optional actor?: ActorId

    The actor ID to use for this document, a random one will be generated if null is passed

  • Optional allowMissingChanges?: boolean

    Allow loading a document with missing changes

  • Optional convertRawStringsToText?: boolean

    Whether to convert raw string to text objects

    Remarks

    This is useful if you have some documents which were created using the older API which represented text as the Text class and you are migrating to the new API where text is just a string. In this case the strings from the old document will appear as RawStrings in the new document. This option will convert those RawStrings to Text objects. This conversion is achieved by rewriting all the old string fields to new text fields

  • Optional freeze?: boolean
  • Optional patchCallback?: PatchCallback<T>

    A callback which will be called with the initial patch once the document has finished loading

Generated using TypeDoc