title: What's the correct way to use requireJS with typescript?
body: <p>The examples I have found <a href="https://stackoverflow.com/questions/16584629/use-requirejs-to-load-multiple-typescript-javascript-files">here</a> and <a href="http://blorkfish.wordpress.com/2012/10/23/typescript-organizing-your-code-with-amd-modules-and-require-js/" rel="noreferrer">here</a> say to use module(). However, when I compile I get "warning TS7021: 'module(...)' is deprecated. Use 'require(...)' instead."</p>
  
  <p>So a couple of basic questions:</p>
  
  <ol>
  <li>When using typescript and requireJS, how do I access a class in one
  .ts file from another .ts file where requireJS will load the second
  file and give me the class in the first file?</li>
  <li>Is there a way to do the standard requireJS approach with two .ts files where the define() at the top loads the second ts file and returns back the object it builds at the end?</li>
  <li>Sort-of the same as question #2. From a <strong>java</strong> script file, can I use the define() construct on a <strong>type</strong> script file to get the instantiated object? If so, how?</li>
  </ol>
  
  <p><strong>Update:</strong> The following gives me a tsc compile error:</p>
  
  <pre><code>///&lt;reference path='../../libs/ExtJS-4.2.0.d.ts' /&gt;
  ///&lt;reference path='../../libs/require.d.ts' /&gt;
  
  import fdm = require("./file-definitions");
  require(["../../scripts/ribbon"], function () {
  
  export module Menu {
  
      export class MainMenu {
  </code></pre>