Documentation - v1.2.0-alpha.3
    Preparing search index...

    A collection for managing state within a turn context.

    Hierarchy

    • Map<any, any>
      • TurnContextStateCollection
    Index

    Constructors

    • Parameters

      • Optionalentries: readonly (readonly [any, any])[] | null

      Returns TurnContextStateCollection

    • Parameters

      • Optionaliterable: Iterable<readonly [any, any], any, any> | null

      Returns TurnContextStateCollection

    Properties

    "[toStringTag]": string
    size: number

    the number of elements in the Map.

    "[species]": MapConstructor

    Methods

    • Returns an iterable of entries in the map.

      Returns MapIterator<[any, any]>

    • Returns void

    • Parameters

      • key: any

      Returns boolean

      true if an element in the Map existed and has been removed, or false if the element does not exist.

    • Returns an iterable of key, value pairs for every entry in the map.

      Returns MapIterator<[any, any]>

    • Executes a provided function once per each key/value pair in the Map, in insertion order.

      Parameters

      • callbackfn: (value: any, key: any, map: Map<any, any>) => void
      • OptionalthisArg: any

      Returns void

    • Gets the value associated with the specified key.

      Type Parameters

      • T = any

      Parameters

      • key: any

        The key of the element to get.

      Returns T

      The element associated with the specified key, or undefined if the key does not exist.

    • Gets the value associated with the specified key.

      Parameters

      • key: any

        The key of the element to get.

      Returns any

      The element associated with the specified key, or undefined if the key does not exist.

    • Parameters

      • key: any

      Returns boolean

      boolean indicating whether an element with the specified key exists or not.

    • Returns an iterable of keys in the map

      Returns MapIterator<any>

    • Adds a new element with a specified key and value to the Map. If an element with the same key already exists, the element will be updated.

      Parameters

      • key: any
      • value: any

      Returns this

    • Returns an iterable of values in the map

      Returns MapIterator<any>