The object whose property descriptors are to be updated.
An array of property names for which the descriptors are to be updated.
A function that takes a property descriptor and a property name, and returns a new property descriptor.
Will throw an error if any of the specified properties do not exist on the object.
const obj = { a: 1, b: 2 };
objUpdatePropertyDescriptors(obj, ['a', 'b'], (descriptor, property) => {
descriptor.writable = true;
return obj;
});
Generated using TypeDoc
Updates the property descriptors of the specified properties on the given object.