title: Typescript autocomplete
body: <p>I have some problems with autocompletion in my code. The main idea is to enable autocompletion when I use a factory class for create objects:</p>
  
  <pre><code>class Test1 {
      method1(){}
  }
  class Test2 {
      method2(){}
  }
  class Test_Factory {
      create(type) {
          if (type === "test1") {
              return new Test1()
          } else if (type === "test2") {
              return new Test2()
          }
      }
  }
  let factory1 = new Test_Factory()
  let tst1 = factory1.create("test1")
  tst1. // autocomplite not work
  </code></pre>
  
  <p>any ideas?</p>