title: How to use javascript in typescript
body: <p>I have a javascript file called ui.js.</p>
  
  <p>Inside ui.js is UI setup code.</p>
  
  <pre><code>if (!("ontouchstart" in document.documentElement)) {
      document.documentElement.className += " no-touch";
      var jScrollOptions = {
          autoReinitialise: true,
          autoReinitialiseDelay: 100
      };
  
      $('.box-typical-body').jScrollPane(jScrollOptions);
      $('.side-menu').jScrollPane(jScrollOptions);
      $('.scrollable-block').jScrollPane(jScrollOptions);
  }
  </code></pre>
  
  <p>I would like to be able to call this from typescript.</p>
  
  <p>I don't want to convert the code to typescript as there are hundreds of lines and it's not really necessary.  It just needs to be one once after the UI is ready.</p>
  
  <p>It seems to me that I should be able to wrap it in a function, and then call that function from typescript.</p>
  
  <p>But I have not been able to figure out how to do that.</p>
  
  <p>Note: Not a duplicate of earlier question, as that was how to convert js, not use it directly with as little modification as possible.</p>