title: Using immutability-helper in typescript and react
body: <p>I imported <code>update</code> from <code>@types/immutability-helper</code>. Now I want to push an item to the an array in a React's component state.</p>
  
  <p>The syntax in <code>index.d.ts</code> file says:</p>
  
  <pre><code>interface UpdateFunction {
      (value: any[], spec: UpdateArraySpec): any[];
      (value: {}, spec: UpdateSpec): any;
      extend: (commandName: string, handler: CommandHandler) =&gt; any;
  }
  </code></pre>
  
  <p>and <code>UpdateArraySpec</code> is </p>
  
  <pre><code>interface UpdateArraySpec extends UpdateSpecCommand {
      $push?: any[];
      $unshift?: any[];
      $splice?: any[][];
      [customCommand: string]: any;
  }
  </code></pre>
  
  <p>does it mean I have to write 2 updates?:</p>
  
  <pre><code>this.setState(update(this.state, update(this.state.Markers, { $push: [info] })));
  </code></pre>
  
  <p>Or what?</p>