title: Is it possible to make constructor static in TypeScript?
body: <p>I read about a static constructor in TypeScript and tried it myself but it doesn't work. I want to initialize a static variable by that (the method shall only be called once) but I get the following compiler error:</p>
  <blockquote>
  <p>Error: 'static' modifier cannot appear on a constructor declaration.</p>
  </blockquote>
  <p>Code:</p>
  <pre class="lang-js prettyprint-override"><code>export class DataManagement {
    private static subjects: string[];
  
    static constructor() {
      DataManagement.subjects = [];
      //some more code here
    }
  }
  </code></pre>