Home > @poq/sdk-sfcc > BaseModel > getPropertyValue
Method helps to get defined properties from contract.
Signature:
getPropertyValue<T extends {
[K in keyof T]: T[K];
}, K extends keyof T>(propertyName: K): T[K];
Parameter | Type | Description |
---|---|---|
propertyName | K | Property name. |
Returns:
T[K]
Value of the property.
// Code could get defined properties and custom properties.
instance.getPropertyValue('definedProperty');