vlocode-project - v1.42.0
    Preparing search index...

    Function defineReadonlyProperties

    • Define read-only properties on the target object which are mapped to the source properties specified in the properties parameter. The read-only properties are defined as non-enumerable and configurable.

      Type Parameters

      • T extends object

      Parameters

      • target: T

        Target object on which to define the read-only properties

      • properties: Record<PropertyKey, any>

        Object specifying the mapping of the read-only properties to the source properties; the keys of the object are the read-only property names and the values are either a function that returns the value of the property or a string which is the name of the source property

      • Optionaloptions: { configurable?: boolean; enumerable?: boolean }

      Returns T

      The target object with the defined read-only properties