title: Typescript | TypeError: __WEBPACK_IMPORTED_MODULE_1_signature_pad__ is not a constructor
body: <p>I'm currently working on an Angular2 project and I'm trying to use a JS library (<a href="https://github.com/szimek/signature_pad" rel="nofollow noreferrer">https://github.com/szimek/signature_pad</a>) for signature input. </p>
  
  <p>I've tried using the library as is, with my code as follows:</p>
  
  <pre><code>// .ts file
  import * as SignaturePad from 'signature_pad';
  
  export class ... {
      private signaturePad: SignaturePad;
  
      ngOnInit() {
          let canvas = document.querySelector("canvas");
          this.signaturePad = new SignaturePad(canvas);
      }
  }
  </code></pre>
  
  <p>.</p>
  
  <pre><code>// .html file
  &lt;div...&gt;
      &lt;canvas&gt;&lt;/canvas&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>and I get the following error when I launch the browser page:
  <a href="https://i.stack.imgur.com/P0ve1.png" rel="nofollow noreferrer">ERROR Error: Uncaught (in promise): TypeError: <strong>WEBPACK_IMPORTED_MODULE_1_signature_pad</strong> is not a constructor</a></p>
  
  <p>I've also tried using dimpu's angular2-signature-pad, but the same error essentially comes up.</p>