A subclass of Set which manages the Token ids which the User has targeted.

Hierarchy

  • Set
    • UserTargets

Accessors

Methods

Accessors

  • get ids(): string[]

    Return the Token IDs which are user targets

    Returns string[]

Methods

  • Returns void

  • Create a new Set where every element is modified by a provided transformation function.

    Type Parameters

    • U

    Parameters

    • transform: (
          element: canvas.placeables.Token,
          index: number,
          set: Set<canvas.placeables.Token>,
      ) => U

      The transformation function to apply. Positional arguments are the value, the index of iteration, and the set being transformed.

    Returns Set<U>

    A new Set of equal size containing transformed elements.

    Array#map

  • Create a new Set with elements that are filtered and transformed by a provided reducer function.

    Type Parameters

    • U

    Parameters

    • reducer: (
          accum: U,
          element: canvas.placeables.Token,
          index: number,
          set: Set<canvas.placeables.Token>,
      ) => U

      A reducer function applied to each value. Positional arguments are the accumulator, the value, the index of iteration, and the set being reduced.

    • Optionalinitial: U

      The initial value of the returned accumulator.

    Returns U

    The final value of the accumulator.

    Array#reduce