how to see if an object has a key in typescript code example Example: typescript check if object has key if ('key' in myObj)