Skip to main content

set

Sets the value of the specified property in the object.

Signature

set<T, K extends keyof T>(object: T, property: K, value: T[K]): T[K]

Parameters

NameTypeOptionalDescription
objectTNoReference to the object.
propertyKNoName of the property.
valueT[K]NoValue for the property.

Return value

Returns the new value.