Defines a CrudArrayObjectStore with streamlined configuration through TJSGameSettings to register a world game setting. WorldArrayObjectStore is automatically associated as the store receiving updates with the associated game setting.

Type Parameters

Hierarchy

Constructors

Accessors

  • get _data(): S[]
  • Returns S[]

    The internal data array tracked allowing child classes direct access.

  • get key(): string
  • Returns string

    The Foundry game setting key.

  • get length(): number
  • Returns number

    The length of all data.

  • get namespace(): string
  • Returns string

    The Foundry game setting namespace.

Methods

  • Deletes a given entry store by ID from this world setting array store instance.

    Parameters

    • id: string

      ID of entry to delete.

    Returns boolean

    Delete operation successful.

  • Duplicates an entry store by the given ID.

    Parameters

    • id: string

      UUIDv4 string.

    Returns S

    Instance of StoreClass.

  • Find an entry in the backing child store array.

    Parameters

    • predicate: (value: S, index: number, obj: S[]) => unknown

      A predicate function.

    Returns S

    Found entry in array or undefined.

  • Finds an entry store instance by 'id' / UUIDv4.

    Parameters

    • id: string

      A UUIDv4 string.

    Returns S

    Entry store instance.

  • Updates subscribers, but provides special handling when a crudDispatch function is attached. When update is an object with a valid UUIDv4 string as the id property the crudDispatch function is invoked along with the data payload.

    Parameters

    • Optionalupdate: boolean | ExtractDataType<S>

      A boolean indicating that subscribers should be notified otherwise

    Returns void