Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "utils/inherited-property-descriptor/docs/types/index.d"

Index

Functions

Export assignment inheritedPropertyDescriptor

  • inheritedPropertyDescriptor(value: any, property: string | symbol, level?: undefined | number): TypedPropertyDescriptor<any> | null
  • Returns a property descriptor for an object's inherited property.

    Notes

    • In contrast to the built-in Object.getOwnPropertyDescriptor(), this function returns null if provided undefined or null, rather than throwing an error.
    • In contrast to the built-in Object.getOwnPropertyDescriptor(), this function returns null if an object does not have an inherited provided property, rather than undefined.
    throws

    third argument must be a positive integer

    Parameters

    • value: any

      input object

    • property: string | symbol

      property

    • Optional level: undefined | number

      inheritance level

    Returns TypedPropertyDescriptor < any > | null

    property descriptor or null

    Example

    var desc = inheritedPropertyDescriptor( {}, 'toString' );
    // returns {...}