title: Javascript nameof object property
body: <p>In C# there is the posibility to get the name of an object property as a string value.</p>
  
  <p>nameof(object.myProperty) --> "myProprty"</p>
  
  <p>Can this be done in Javascript/Typescript?</p>
  
  <p>Object.Keys() is the only thing i found, but it gives me all the keys.</p>
  
  <p>Example what I want to achieve:</p>
  
  <pre><code>export interface myObject {
       myProperty: string;
  }
  
  console.log(myObject["myProperty"]); 
  </code></pre>
  
  <p>Let's say I change my interface for some reason to:</p>
  
  <pre><code>export interface myObject {
       myPropertyOther: string;
  }
  
  console.log(myObject["myProperty"]); // This will not give an error on build
  </code></pre>
  
  <p>So I want to have something like this:</p>
  
  <pre><code>console.log(myObject[nameOf(myObject.myProperty)]
  // This will give an error on build when the interface is changed
  </code></pre>