SerenityJS
    Preparing search index...

    Class EntitySharedProperties

    Index

    Constructors

    Methods

    • Get all the shared properties of the entity that are shared with the client.

      Returns [string, SharedPropertyValue][]

      An array of tuples containing the identifier and value of each property.

    • Get the shared properties of the entity as a PropertySyncData object. This is used to sync the properties with the client.

      Returns PropertySyncData

      The PropertySyncData object.

    • Get the shared property of the entity that is shared with the client.

      Type Parameters

      • T extends SharedPropertyValue

      Parameters

      • identifier: string

        The identifier of the property.

      Returns T

      The value of the property.

      Error if the property does not exist on the entity type.

    • Check if the entity has a shared property with the given identifier.

      Parameters

      • identifier: string

        The identifier of the property.

      Returns boolean

      True if the property exists, false otherwise.

    • Sets the shared property of the entity that is shared with the client.

      Type Parameters

      • T extends SharedPropertyValue

      Parameters

      • identifier: string

        The identifier of the property.

      • value: T

        The value of the property.

      Returns void