Function: prop()
prop<
T>(property): (object) =>T[keyofT]
Returns a function which extracts the property from from the passed object.
Type parameters
| Type parameter |
|---|
T extends Record<string, unknown> |
Parameters
| Parameter | Type |
|---|---|
property | keyof T |
Returns
Function
Parameters
| Parameter | Type |
|---|---|
object | T |
Returns
T[keyof T]