Function hasSetter

  • Determine if the given object has a setter accessor.

    Type Parameters

    • T extends object

      Type of data.

    • K extends string | number | symbol

      Accessor key.

    Parameters

    • object: T

      An object.

    • accessor: K

      Accessor to test.

    Returns object is T & { [P in string | number | symbol]: T[P] }

    Whether the given object has the setter for accessor.