title: typescript requireJS hitting recursive load error - from a new call
body: <p>This only occurs in our application which is a ton of code and not something I can put up, nor something anyone would be willing to slog through. So all I can do is describe the error.</p>
  
  <p>We are building our typescript with --amd and have a ton of recursive references between files. It all is working fine until I put this one call in a function:</p>
  
  <pre><code>var di = new moduleDocIterator.DocIterator(null);
  </code></pre>
  
  <p>With this, the initial load of the main .ts (.js actually) file gives me the null or undefined reference exception on setting up __extends at the top of the generated .js file.</p>
  
  <p>Both the file this call is in and the file moduleDocIterator references have nothing static in them except a couple of strings. The generated .js creates the object for each class but nothing that looks like it is actually executing.</p>
  
  <p>And none of this code is called at the time this happens. This is just the initial load of everything asked for via requireJS.</p>
  
  <p>How do I figure out why it's unhappy?</p>