title: Typescript compile time error
body: <p>How do I get rid of this compile time typescript error?</p>
  
  <pre><code>import * as Ajv from "ajv";
  
  export class ValidateJsonService {
      validateJson(json, schema) {
          let ajv = new Ajv.default({ allErrors: true });
          if (!ajv.validate(schema, json)) {
              throw new Error("JSON does not conform to schema: " + ajv.errorsText())
          }
      }
  }
  </code></pre>
  
  <blockquote>
    <p>app/services/jsonSchemaValidation.service.ts(8,27): error TS2339: Property 'default' does not exist on type '{ (options?: Options): Ajv; new (options?: Options): Ajv; }'.
    npm ERR! Test failed.  See above for more details.</p>
  </blockquote>
  
  <p>The javascript code runs without error, but typescript complains, and it is stopping me from being able to run my unit tests.</p>
  
  <p>It is not to do with typings. I'm using the Ajv library by calling <code>default</code> due to an import problem. For details on why, see <a href="https://stackoverflow.com/questions/42103343/typeerror-ajv-is-not-a-constructor">my other question</a>.</p>
  
  <p>I think there is some little hack to get rid of this typescript compile time error isn't there? </p>