title: using MomentJS with TypeScript - What type does moment() have?
body: <p>I am currently converting my project from ES5 to ES6, but I am running into an issue with MomentJS (<code>version 2.18.1</code>). The problem is that I have a few variables that are Moment objects, but I cannot call moment() on them. </p>
  
  <p>An example:</p>
  
  <pre><code>import * as moment from "moment";
  
  export class DateThingy {
  
    constructor(private moment) { //What type does this have??
    }
  
    public getDate(): moment.Moment { 
      return this.moment();
    }
  }
  </code></pre>
  
  <p>1) If I set the type of <code>private moment</code> to <code>private moment: moment</code> WebStorm complains: "<em>cannot find name 'moment'.</em>"</p>
  
  <p>2) If I set the type to <code>private moment: moment.Moment</code> the object has changed and I cannot call <code>this.moment()</code> anymore (it is now an object and does not have a function call on it). Webstorm tells me: "<em>cannot invoke an expression whose type lacks a call signiture. Type 'Moment' has no campatible call signatures.</em>"</p>
  
  <p>3) I cannot use MomentStatic anymore, since it is not exported. If I type <code>private moment: moment.MomentStatic</code> WebStorm gives me: "<em>namespace 'moment' does not have an exported member 'MomentStatic'</em>"</p>
  
  <p>So what typing should I use for this example? </p>