Poq.SDK.Node

Home > @poq/sdk-sfcc > BaseModel > setPropertyValue

BaseModel.setPropertyValue() method

Method helps to set custom properties of object since they are not defined in schema.

Signature:

setPropertyValue<T extends {
        [K in keyof T]: T[K];
    }, K extends keyof T>(propertyName: K, value: T[K]): void;

Parameters

Parameter Type Description
propertyName K Property name.
value T[K] Value of the property.

Returns:

void

Value of the property.

Example

// Code set property that is  efined in original model.
instance.setPropertyValue('definedProperty', value);