title: .every function in typescript + angular 2
body: <p>I am using every function to check if a particular checkbox in the grid is checked or not, I am using angular 2 and below is my code to do that:</p>
  
  <pre><code>// Typescript code
  this.toggle = this.contactlist.every(item =&gt; item.checked);
  
  // JS output is
  this.toggle = this.contactlist.every(function(item) {
     return item.checked;
  });
  </code></pre>
  
  <p>Now I want to include more code inside that every function so I tried this:</p>
  
  <pre><code>this.toggle = this.contactlist.every(item =&gt; {
      item.checked; 
      console.log('Item:', item)
  });
  
  // In Webpack it gives me this error
  Argument of type '(item: any) =&gt; void' is not assignable to parameter of type '(value: any, index: number, array: any[]) =&gt; boolean'.
    Type 'void' is not assignable to type 'boolean'.
  </code></pre>
  
  <p>How I can solve it?</p>