Typescript hasOwnProperty equivalent : <p>In javascript if I want to loop through a dictionary and set properties of another dictionary, I'd use something like this:</p>

<pre><code>for (let key in dict) {
  if (obj.hasOwnProperty(key)) {
    obj[key] = dict[key];
  }
}
</code></pre>

<p>If <code>obj</code> is a Typescript object (instance of a class), is there a way to perform the same operation?</p>
