(obj: object, key: string)
| 47 | export function getOwnProperty(obj: object, key: string): unknown |
| 48 | /** @internal */ |
| 49 | export function getOwnProperty(obj: object, key: string): unknown { |
| 50 | if (!hasOwnProperty(obj, key)) { |
| 51 | return undefined |
| 52 | } |
| 53 | // @ts-expect-error we know the property exists |
| 54 | return obj[key] |
| 55 | } |
| 56 | |
| 57 | /** |
| 58 | * An alias for `Object.keys` that treats the object as a map and so preserves the type of the keys. |
no test coverage detected
searching dependent graphs…