@univerjscorefunctionsSet

@univerjs/core v0.5.4


Function: set()

Call Signature

function set<T>(
   object, 
   path, 
   value): T

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@types+lodash@4.17.13/node_modules/@types/lodash/common/object.d.ts:2263

Sets the value at path of object. If a portion of path doesn’t exist it’s created. Arrays are created for missing index properties while objects are created for all other missing properties. Use _.setWith to customize path creation.

Type Parameters

Type Parameter
T extends object

Parameters

ParameterTypeDescription
objectTThe object to modify.
pathPropertyPathThe path of the property to set.
valueanyThe value to set.

Returns

T

Returns object.

Call Signature

function set<TResult>(
   object, 
   path, 
   value): TResult

Defined in: packages/api/tmp/univer-pro/node_modules/.pnpm/@types+lodash@4.17.13/node_modules/@types/lodash/common/object.d.ts:2267

Type Parameters

Type Parameter
TResult

Parameters

ParameterType
objectobject
pathPropertyPath
valueany

Returns

TResult

See

_.set