Function definePrototypeLazyProperty

  • Create a getter that transforms then to a property

    Type Parameters

    • T extends { prototype: unknown }
    • P extends string
    • V

    Parameters

    • Class: T
    • property: P

      name of the property

    • callback: LazyCallback<V>

      function called when the property is accessed the first time

    • Optionaloptions: DefinePropertyOptions
      • Optionalconfigurable?: boolean
      • Optionalenumerable?: boolean
      • Optionalwritable?: boolean

    Returns any | T & { [K in P]: V }

    Class