title: Listing all possible properties of a class in javascript
body: <p>I want to list all possible class properties. Something like this:</p>
  <pre><code>class Rectangle {
    height;
    width;
    constructor(width) {
      this.width = width;
    }
  }
  
  getClassProperties(Rectangle) // ['height', 'width']
  </code></pre>
  <p>I want to be able to make this calculation give the <strong>class</strong>, not an instance of it. using <code>hasOwnProperty</code> \ <code>getOwnPropertyName</code> + <code>getPrototypeOf</code> will only work on an instance.</p>