Function: prop

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

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

Type parameters

NameType
Textends Record<string, unknown>

Parameters

NameType
propertykeyof T

Returns

fn

▸ (object): T[keyof T]

Parameters
NameType
objectT
Returns

T[keyof T]