title: TypeScript Handbook: class static side example overcomplication
body: <p>Came across example in <code>Classes -&gt; Advanced Techniques</code> section <a href="http://www.typescriptlang.org/Handbook#classes-advanced-techniques" rel="nofollow">http://www.typescriptlang.org/Handbook#classes-advanced-techniques</a></p>
  
  <pre><code>class Greeter {
      static standardGreeting = "Hello, there";
      greeting: string;
      greet() {
          if (this.greeting) {
              return "Hello, " + this.greeting;
          }
          else {
              return Greeter.standardGreeting;
          }
      }
  }
  
  var greeter1: Greeter;
  greeter1 = new Greeter();
  alert(greeter1.greet());
  
  var greeterMaker: typeof Greeter = Greeter;
  greeterMaker.standardGreeting = "Hey there!";
  var greeter2:Greeter = new greeterMaker();
  alert(greeter2.greet());
  </code></pre>
  
  <p>And explanation:</p>
  
  <blockquote>
    <p>Next, we then use the class directly. Here we create a new variable called 'greeterMaker'. This variable will hold the class itself, or said another way its constructor function. Here we use 'typeof Greeter', that is "give me the type of the Greeter class itself" rather than the instance type. Or, more precisely, "give me the type of the symbol called Greeter", which is the type of the constructor function. This type will contain all of the static members of Greeter along with the constructor that creates instances of the Greeter class. We show this by using 'new' on 'greeterMaker', creating new instances of 'Greeter' and invoking them as before.</p>
  </blockquote>
  
  <p>My question: what is the purpose of introducing <code>greeterMaker</code> variable? Ultimately, it just holds the reference to the <code>Greeter</code> class.</p>
  
  <p>We can write code below, </p>
  
  <pre><code>Greeter.standardGreeting = "Hey there!";
  var greeter2:Greeter = new Greeter();
  alert(greeter2.greet());
  </code></pre>
  
  <p>receive same result and not confuse ourselves with strangely looking</p>
  
  <pre><code>var greeterMaker: typeof Greeter = Greeter;
  </code></pre>
  
  <p>Am I missing something here?
  Is construct <code>var maker: typeof Foo = Foo;</code> indeed useful?</p>