title: TS2322: Type 'File' is not assignable to type 'typeof File'
body: <blockquote>
    <p>TS2322: Type 'File' is not assignable to type 'typeof File'.
    Property 'prototype' is missing in type 'File'.</p>
  </blockquote>
  
  <p>I get this error. I don't know why I get it and I don't know how to solve it. If anyone would be so kind to give me a hand I would really appreciate it!</p>
  
  <p>I have this public class property:</p>
  
  <pre><code>registry = File;
  </code></pre>
  
  <p>The getRegistryFile function:</p>
  
  <pre><code>private async getRegistryFile(): Promise&lt;File&gt; {
          if (this.files === undefined || this.files.length === 0) {
              return Promise.reject('No files where returned from the server.');
          }
  
          const registryFileName = await this.createRegistryFileName();
  
          this.files.forEach((element) =&gt; {
              if (element === registryFileName) {
                  console.log('File registry found.');
                  return Promise.resolve(element);
              }
          });
      }
  </code></pre>
  
  <p>And the function I was constructing:</p>
  
  <pre><code>public WorkInProgress(file: File) {
      this.getRegistryFile().then((file) =&gt; this.registry = file);
  }
  </code></pre>