Provides a wrapper implementing the Svelte store / subscriber protocol around any Document / ClientMixinDocument. This makes documents reactive in a Svelte component, but otherwise provides subscriber functionality external to Svelte.

Type Parameters

Implements

Constructors

Accessors

  • get uuidv4(): string
  • Returns string

    Returns the UUIDv4 assigned to this store.

Methods

  • Completely removes all internal subscribers, any optional delete callback, and unregisters from the ClientDocumentMixin apps tracking object.

    Returns void

  • Returns D

    Current document

  • Sets the document by Foundry UUID performing a lookup and setting the document if found.

    Parameters

    • Optionaluuid: string

      A Foundry UUID to lookup.

    • Optionaloptions: TJSDocument.Data.Update

      New document update options to set.

    Returns Promise<boolean>

    True if successfully set document from UUID.