Function setWritable

  • Sets the specified properties of an object to be writable.

    Parameters

    • object: Record<ObjectKey, any>

      The object whose properties are to be made writable.

    • Rest ...properties: string[]

    Returns void

    void

    Throws

    Will throw an error if any of the specified properties do not exist on the object.

    Example

    setWritable({ a: 1, b: 2 }, 'a', 'b').a = 3;;
    //=> 3
    setWritable({ a: 1, b: 2 }, 'a', 'b').b = 4;;
    //=> 4

Generated using TypeDoc