title: TypeScript | Immutable | proper way of extending Immutable.Map type
body: <p>I have a react-redux application written in typescript with immutable package. There I have a data, which comes from api and in store I pack it to Map. In all application they are used as a Map.</p>
  
  <p>I created an interface:</p>
  
  <pre><code>export interface PaymentMethod extends Immutable.Map&lt;string, string | NamedType&lt;number&gt;&gt; {
      id: string;
      name: string;
      description: string;
      accountNr: string;
      paymentMethodType: NamedType&lt;number&gt;;
  }
  </code></pre>
  
  <p>In general it works very good. Except tests, where I create data this way:</p>
  
  <pre><code>const dummyPaymentMethod: PaymentMethod = Map({
      id: '',
      name: '',
      description: '',
      accountNr: '',
      paymentMethodType: { id: 1, name: '' },
  });
  </code></pre>
  
  <p>and then I get a lint error:</p>
  
  <pre><code>Error:(116, 13) TS2322:Type 'Map&lt;string, string | { id: number; name: string; }&gt;' is not assignable to type 'PaymentMethod'.
  Property 'id' is missing in type 'Map&lt;string, string | { id: number; name: string; }&gt;'.
  </code></pre>
  
  <p>I feel totally lost, as I can see id in interface and in my dummy data.</p>
  
  <p>I would appreciate some light on it. I feel that somehow I should pass the list of acceptable keys to my Map, but no idea, how to do this.</p>
  
  <p>EDIT: misspell</p>