title: Declaration and Instantiation of Constructor Function
body: <p>How do I declare a constructor function that matches the pattern in 'myConstructor'? In the example, the compiler says when assigning the function to 'g' :  <code>Subsequent variable declarations must have the same type</code>. What should the function assigned to 'g' look like?</p>
  
  <pre><code>interface MyType {
      myProperty: string;
  }
  interface myConstructor {
  
      new(s: string): MyType
  }
  
  
  var g: myConstructor;
  
  var g = function (s) {
      this.myProperty = s;
  }
  
  var c = new g('abc');
  </code></pre>