Class InspectableMap

The InspectableMap provides access meta-data about Map fields in an object. The primary use-case for this class is type reflection within the Inspector APIs.

Constructors

  • Constructor for use by the runtime only.

    Parameters

    • keyType: Type

      TypeScript type of the keys in the map.

    • valueType: Type

      TypeScript type of the values in the map.

    • parentProperty: InspectableProperty

      Property used for retrieving this entry.

    Returns InspectableMap

Properties

parentProperty: InspectableProperty

Accessors

  • get keyType(): Type
  • Type used for of keys stored in the map.

    Returns Type

  • get valueType(): Type
  • Type used for values stored in the map.

    Returns Type

Methods

  • Uses the provided path elements to find an map element with the specified key, and returns a property to the element, or to a child property of that element.

    Parameters

    • pathElements: PropertyPathElement[]

      Path elements representing field names and keys to look for.

    • elementIndex: number

      Index in the pathElements array to start the search at.

    Returns InspectableProperty

    Property representing the final path element, or null if not found (key or property with that path doesn't exist).

  • Returns the total number of elements in the map.

    Returns number

    Total number of elements in the map.