Iterate through methods and properties of an ES6 class
<p>So with the growth of new frameworks with JavaScript many have adopted ECMAScript 6 shim's or TypeScript, with many new features. My question is this:  </p>

<p>How does one iterate over the methods/properties of an ES6 class?  </p>

<p>e.g. (with objects)</p>

<pre><code>var obj = {
  prop: 'this is a property',
  something: 256,
  method: function() { console.log('you have invoked a method'); }
}

for (var key in obj) {
  console.log(key);
}

// =&gt; 'prop'
// =&gt; 'something'
// =&gt; 'method'
</code></pre>

<p>(with classes)</p>

<pre><code>class MyClass {
  constructor() {
    this.prop = 'prop';
    this.something = 256;
  }

  method() {
    console.log('you have invoked a method');
  }
}
</code></pre>

<p>How do I list the methods <code>MyClass</code> has, and optionally its properties as well?</p>