SerenityJS
    Preparing search index...

    Class ObjectProperty<T>

    Type Parameters

    • T = unknown

    Hierarchy (View Summary)

    Index

    Constructors

    • Create a new string property with the given name and value.

      Type Parameters

      • T = unknown

      Parameters

      • name: string

        The name of the property, used for identification and referencing purposes.

      • parent: null | ObjectProperty<unknown> = null

        The parent property of the current property, which can be used to establish a hierarchical relationship between properties and allow for proper referencing and access within the object hierarchy when serialized and deserialized.

      Returns ObjectProperty<T>

    Properties

    name: string

    The name of the property, used for identification and referencing purposes.

    parent: null | ObjectProperty<unknown> = null

    The path of the property within the object hierarchy.

    triggerCount: bigint = 0n

    A counter that keeps track of the number of times the listeners have been triggered, which can be used for various purposes such as debugging, analytics, or controlling the flow of events within the user interface based on the number of interactions that have occurred.

    type: Type = DataStorePropertyValueType.Type

    The type of the property, used for serialization and deserialization purposes.

    The value of the property, which can be of various types depending on the specific implementation and use case. This value is used for storing and retrieving data associated with the property.

    Methods

    • Get the path of the property within the object hierarchy, which can be used for proper referencing and access when serialized and deserialized.

      Returns string

      The path of the property within the object hierarchy, which is constructed based on the parent path and the name of the property.

    • Get the data store information for the property, which includes the identifier of the root screen and the path of the property within the object hierarchy, allowing for proper referencing and access when serialized and deserialized.

      Returns null | DataDrivenScreen

      A tuple containing the identifier of the root screen and the path of the property within the object hierarchy, which can be used for proper referencing and access when serialized and deserialized.

    • Trigger all listener functions associated with the observable element, allowing it to respond to specific events or interactions within the user interface by executing the defined behavior and response of each listener function.

      Parameters

      • player: Player

        The player associated with the event or interaction, which can be used to provide context and information about the user who triggered the event, enabling personalized and dynamic user interfaces based on the player's actions.

      • data: T | ObjectPropertyInterface

        The data to be passed to each listener function when triggered, which can be used to provide context and information about the event or interaction that occurred, enabling dynamic and responsive user interfaces based on the provided data.

      Returns void