Function: prop()

prop<T>(property): (object) => T[keyof T]

Returns a function which extracts the property from from the passed object.

Type parameters

Type parameter
T extends Record<string, unknown>

Parameters

ParameterType
propertykeyof T

Returns

Function

Parameters

ParameterType
objectT

Returns

T[keyof T]