title: Typescript compiler error when importing json file
body: <p>So the code is simple:</p>
  
  <p>calls.json</p>
  
  <pre><code>{"SERVER":{
      "requests":{
        "one":"1"
      }
  } }
  </code></pre>
  
  <p>file.ts</p>
  
  <pre><code>import json = require('../static/calls.json');
  console.log(json.SERVER);
  </code></pre>
  
  <p>the generated javascript is correct and when running the node js server, the console log json.SERVER prints '{ requests: { one: '1' } }', as it should.</p>
  
  <p>The typescript compiler (commonjs) however, somehow does not particularly like this situation and throws: "Cannot find module '../static/calls.json'".</p>
  
  <p>Ofcourse I tried writing a .d.ts file, like this:</p>
  
  <pre><code>declare module '../static/calls.json'{
      var exp:any;
      export = exp;
  }
  </code></pre>
  
  <p>this then obviously throws: "Ambient module declaration cannot specify relative module name".</p>
  
  <p>I also tried different variants, like:</p>
  
  <pre><code>declare module 'calls.json' {
      import * as json from '/private/static/calls.json';
      export = json;
  }
  </code></pre>
  
  <p>and then requiring:</p>
  
  <pre><code>import json = require('calls.json');
  </code></pre>
  
  <p>None work properly and have their own little compiler errors :)</p>
  
  <p>I want to use an external .json file because I use commonjs serverside and amd clientside and I want a single file for loading constants.</p>