title: Load external javascript functions in one function inside main.ts (typescript)
body: <p>I'm using d3.js, and was hoping anyone could suggest a way to have typescript work like this;</p>
  
  <pre><code>import {loadbarchart} from "./javascript/charts/barchart";
  import {loadscatterchart} from "./javascript/charts/scatterchart";
  
  d3.json("data.json", function(error, data) {
      loadbarchart();
      loadscatterchart();
  })
  </code></pre>
  
  <p>What I'm hoping to do is create several charts in separate files, then just call all of the functions inside the d3.json function inside the main.ts. </p>
  
  <p>When I tried doing this, the <code>loadbarchart</code> and <code>loadscatterchart</code> are loaded outside of the d3.json function.</p>
  
  <p>From further reading, as I understand it may not be in the scope of typescript to import functions this way? </p>
  
  <p>I was hoping someone could offer some advice on how this can be achieved, if possible?</p>
  
  <p>Thanks</p>