title: Typescript lodash: How to declare a dictionary to use with _.map?
body: <p>How to declare a dictionary to use with _.map in lodash?</p>
  
  <p>Here is the sample TypeScript program.</p>
  
  <pre><code>&lt;reference path="../scripts/typings/lodash/lodash.d.ts" /&gt;
  interface IQuestionAndOptions {
      text: string;
      options: { [key: number]: string };
  }
  
  function sample() {
     var question: IQuestionAndOptions = { text: "Are you happy?", options: {} };
     question['1'] = "Yes";
     question['2'] = "No";
  
    var values =  _.map(question.options, function (v: string, k: number) {
       return { text: v, value: k }; });
  }
  </code></pre>
  
  <p>It is not happy with the declaration of question.options and gives the following error.</p>
  
  <p>Argument of type '{ [key: number]: string; }' is not assignable to parameter of type 'List' at the _.map command</p>