• The objDefine() method defines a new or modifies an existing single property accessors for the target object based on the configuration defined for the propDesc argument of type ObjDefinePropDescriptor. This will call objDefineProp after creating the required PropertyDescriptor populating defaults for the propDesc values. Note, the default values (true) for configurable and enumerable are different from the defaults provided by objDefineProp.

    Type Parameters

    • T

    Parameters

    • target: T

      The object on which to define the property.

    • key: keyof T

      The name of the property to be defined or modified

    • propDesc: ObjDefinePropDescriptor<any>

      An object which defines the Property Descriptor mappings for the mapping.

    Returns T

    The target object.

    0.6.0