title: How to create a type excluding instance methods from a class in typescript?
body: <p>Given a class, containing both properties and methods, I'd like to derive a type that just contains its properties.</p>
  <p>For example, if I define a class as follow:</p>
  <pre><code>class MyObject {
  
    constructor(public prop1: string, public prop2: number) {}
  
    instanceMethod() { ... }
  }
  </code></pre>
  <p>I'd like to have a type, say <code>MyObjectConstructor</code> that would be like this:</p>
  <pre><code>type MyObjectConstructor = {
    prop1: string;
    prop2: number;
  }
  </code></pre>
  <p>I know I can use the built-in type <code>Pick</code> and manually select the keys I want by name, but I don't want to have to repeat the keys all over, and have to change them every time I add new properties to my class.</p>
  <p>Is there a way to define a generic type <code>ConstructorType&lt;T&gt;</code>that only returns the properties of a class in typescript ?</p>