title: Typescript does not recognize static methods of class
body: <p>I have a typescript function with a generic class named &quot;Model&quot;. This class has a static method &quot;build&quot;. Typescript does not recognize the static methods of the class and shows me this error. The compiled javasript does work without errors:</p>
  <pre class="lang-ts prettyprint-override"><code>export function dataToInstance(model: Model, data: any) {
      if (!data) {
          return data;
      }
  
      const include = generateIncludeRecurse(model);
      const instance = model.build(data, { isNewRecord: false, raw: false, include });
      restoreTimestamps(data, instance);
      return instance;
  }
  </code></pre>
  <p>Error: <a href="https://i.stack.imgur.com/rCN1J.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/rCN1J.png" alt="enter image description here" /></a></p>
  <p>How can i get typescript to accept the static methods. I already tried &quot;typeof&quot; but then typescript throws errors because model is an abstract class.</p>