title: Cannot invoke an expression whose type lacks a call signature, using moment
body: <p>I am trying to get <code>moment</code> to work in my <code>angular</code> application. Here is a clean sample <a href="https://github.com/prolink007/MomentTest" rel="noreferrer">repo</a> to demonstrate the issue. Clone that repo and run <code>ng build test-library</code> in the root directory. Install packages first, <code>npm install</code>.</p>
  
  <p>When i try to use <code>moment</code>, i am getting the following error. What am i doing wrong? I have been trying to fix this for a while now. I have googled it many times and tried several suggestions to no avail.</p>
  
  <p>Usage:</p>
  
  <pre><code>import * as moment from 'moment';
  
  ...
  
    public doSomething(): string {
      const aMoment: moment.Moment = moment(); // line 22
      return aMoment.format();
    }
  </code></pre>
  
  <hr>
  
  <p>Error:</p>
  
  <pre><code>projects/test-library/src/lib/test-library.component.ts(22,36): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'typeof moment' has no compatible call signatures.
  </code></pre>
  
  <hr>
  
  <p>tsconfig.json</p>
  
  <pre><code>{
    "extends": "../../tsconfig.json",
    "compilerOptions": {
      "allowSyntheticDefaultImports": true,
      "esModuleInterop": true,
      "outDir": "../../out-tsc/lib",
      "target": "es2015",
      "module": "es2015",
      "moduleResolution": "node",
      "declaration": true,
      "sourceMap": true,
      "inlineSources": true,
      "emitDecoratorMetadata": true,
      "experimentalDecorators": true,
      "importHelpers": true,
      "types": [],
      "lib": [
        "dom",
        "es2018"
      ]
    },
    "angularCompilerOptions": {
      "annotateForClosureCompiler": true,
      "skipTemplateCodegen": true,
      "strictMetadataEmit": true,
      "fullTemplateTypeCheck": true,
      "strictInjectionParameters": true,
      "enableResourceInlining": true
    },
    "exclude": [
      "src/test.ts",
      "**/*.spec.ts"
    ]
  }
  </code></pre>