title: Import AMD/requirejs Javascript file into Typescript
body: <p>I have a library: js and d.ts files.
  How can I import them in es6 typescript file?</p>
  <p><strong>Javascript</strong> file</p>
  <pre><code>define(&quot;Calculator&quot;, [&quot;require&quot;, &quot;exports&quot;], function (require, exports) {
      &quot;use strict&quot;;
      Object.defineProperty(exports, &quot;__esModule&quot;, { value: true });
      var Calculator = /** @class */ (function () {
          function Calculator() {
          }
          Calculator.prototype.calc = function (a) {
              return a + 1;
          };
          return Calculator;
      }());
      exports.default = Calculator;
  });
  </code></pre>
  <p><strong>d.ts</strong> file</p>
  <pre><code>declare module &quot;Calculator&quot; {
      export default class Calculator {
          calc(a: number): number;
      }
  }
  </code></pre>
  <p><strong>Typescript</strong> file with import:</p>
  <pre><code>import calculator = require('../libs/calculator');
  </code></pre>
  <p>Error says <strong>File '.../libs/calculator.d.ts' is not a module</strong></p>