Skip to content

@yantrix/automata v0.6.0 • Docs


Yantrix API / @yantrix/automata / updateModelProperty

Function: updateModelProperty() ​

ts
function updateModelProperty<ObjectType, Key>(
   object, 
   key, 
   update): ObjectType

Updates one Object property without mutating the source Object.

Type Parameters ​

• ObjectType extends object

• Key extends string | number | symbol

Parameters ​

• object: Exclude<ObjectType, readonly unknown[]>

• key: Key

• update

Returns ​

ObjectType