title: Typescript Ambient type declaration
body: <p>I am trying to wrap a pure js library no exports, simply only a global variable with prototype extensions. <a href="https://github.com/davidshimjs/qrcodejs" rel="nofollow noreferrer">https://github.com/davidshimjs/qrcodejs</a></p>
  
  <p><strong>Declaration file is separate from npm library</strong></p>
  
  <ul>
  <li>Updated the typings file, after research found out that the correct way to go is to declare a class </li>
  <li>Still cannot import QRCode</li>
  </ul>
  
  <pre><code>
  declare class QRCode {
  
          constructor (el: HTMLElement, vOption: string|Options): IQRCode;
  
          public makeCode(sText: string): void
  
          public clear(): void
  }
  
  declare module 'davidshimjs-qrcodejs' {
      export enum CorrectLevel {
              M = 0,
              L = 1,
              H = 2,
              Q = 3
      }
  
      export interface Options {
              text: string,
              width: number = 256,
              height: number = 256,
              colorDark: string = '#000000',
              colorLight: string = '#ffffff',
              correctLevel: CorrectLevel
      }
  }
  
  </code></pre>