setProps()function

setProps(obj: T, entries: T | Partial<T> | Iterable<Prop<T>>): void
ParamType
objT
The object to set the props on (modified by reference). required
entriesT
Partial<T>
Iterable<Prop<T>>
The props to set, as an object or iterable set of key/value entry tuples. required

Set several named props on an object (by reference).

Examples

setProps(obj, { a: 1, b: 2 });