title: Typescript and Jquery import - $ is not a function
body: <p>I'm using typescript with jquery, but I keep getting </p>
  
  <blockquote>
    <p>Uncaught TypeError: $ is not a function</p>
  </blockquote>
  
  <p>Has anybody seen this before?</p>
  
  <p>I'm compiling typescript to ES2017, then transpiling to ES5 using webpack.</p>
  
  <pre><code>//tsconfig
  {
        "compileOnSave": true,
        "compilerOptions": {
          "module": "es2015",
  
          "removeComments": true,
          "preserveConstEnums": true,
          "sourceMap": true,
          "target": "es2017",
          "noImplicitAny": false,
          "outDir": "Output",
          "esModuleInterop": true
  
        }
      }
  </code></pre>
  
  <p>How jquery is being used</p>
  
  <pre><code>import * as $ from "jquery";
   var form = $(document.createElement('form'));
  </code></pre>
  
  <p>The browser sees jquery ($)
  <a href="https://i.stack.imgur.com/2LH8q.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/2LH8q.png" alt="enter image description here"></a></p>
  
  <p>But then I get this</p>
  
  <p><a href="https://i.stack.imgur.com/UttzF.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/UttzF.png" alt="enter image description here"></a></p>