title: TypeScript Compile Error Cannot invoke an expression whose type lacks a call signature
body: <p>error message after transpiling code below:</p>
  <blockquote>
  <p>[tsc] &gt; C:/Workarea/MyFirstAngular/src/enum/msg.ts(35,33): error
  TS2349: Cannot invoke an expression whose type lacks a call signature.
  Failed to compile TypeScript: Error: tsc command has exited
  with code:2</p>
  </blockquote>
  <pre><code>module MessageUtil {
      enum Morning {
      &quot;Good Morning&quot;,
      &quot;Great to see you!&quot;,
      &quot;Good day.&quot;,
      &quot;Lovely day today, isn't it?&quot;,
      &quot;What's up?&quot;,
      &quot;Nice to meet you&quot;,
  }
  }
      export class MessageData {
          private getRandomElementOfEnum(e : any):string{
              var length:number = Object.keys(e).length();  //&lt;-- This is Line 35
              return e[Math.floor((Math.random() * length)+1)];
          }
          public getRandMorning():string {
              return this.getRandomElementOfEnum(Morning);
          }
      }
  }
  </code></pre>
  <p>Does anybody know what's my exact fault?</p>
  <p>My Setup:
  -IDEA 14
  -Node.js
  -Gulp
  -gulp-tsc
  -gulp-connect (for Livereload)</p>