isProp()function
isProp(obj: T, key: PropertyKey): key is keyof T
| Param | Type | |
|---|---|---|
obj | T | The object to test against. required |
key | PropertyKey | The key to test for. required |
| Return | |
|---|---|
key is keyof T | true if key is an own prop of obj, narrowing its type. |
Is an unknown value the key for an own prop of an object.