hasOwn
Check if an obj
object has a specific key
property, including non-enumerable properties and symbol keys.
obj
(T extends object
): The object to check.key
(keyof T | (string & {}) | symbol | number
): The key to check, can be string, symbol or number.boolean
): Returns true
if the object has the property, false
otherwise.