title: Passing an object to ._map in typescript
body: <p>Below is my class with static member config. </p>
  
  <pre><code>import {Injectable} from '@angular/core';
  import {Config} from '../shared/interfaces'
  
  export class GlobalData {
  
      static config:Config = {
          appName: "",
          line: "",
      }
  
      constructor(private app:PApplication){
          GlobalData.config.appName = app.getData().Style? 'P_APP' : 'P_WEB'
          GlobalData.config.line = 'PApp'
      }
  
  }
  </code></pre>
  
  <p>Below is my interface Config</p>
  
  <pre><code>export interface Config {
      appName: string
      line: string
  }
  </code></pre>
  
  <p>I am trying to pass my static config object to below function: </p>
  
  <pre><code>var appConfig = this.appConfig(GlobalData.config);
  
  appConfig = (configVariable: Config) =&gt; {
      return _.map(configVariable, function(val, key) {
          return key + "=" + val;
      }).join("&amp;");
  }
  </code></pre>
  
  <p>I am getting the below error: </p>
  
  <blockquote>
    <p>[ts] Argument of type 'Config' is not assignable to parameter of type
    'List&lt;{}> | Dictionary&lt;{}> | NumericDictionary&lt;{}>'.   Type 'Config'
    is not assignable to type 'NumericDictionary&lt;{}>'.
        Index signature is missing in type 'Config'.</p>
  </blockquote>
  
  <p>Basically in <code>Javascript</code>, the config was a <code>global object</code>, which can be accessed in any <code>controller/services</code>. </p>
  
  <pre><code>var config = {appName: "", line: "" }
  </code></pre>