title: how do you declare an array of objects inside typescript?
body: <p>I would like to specify a function that takes an array of objects as a parameter, but I don't have a particular type defined for the object (a sort of &quot;anonymous type&quot;)</p>
  <pre><code>bagTotal = (products) =&gt; {
   // function does stuff
  }
  </code></pre>
  <p>I understand I can do this:</p>
  <pre><code>bagTotal = (products: any[]) =&gt; {
   // function does stuff
  }
  </code></pre>
  <p>but this is a bit more relaxed then what I want: to be strict with typescript.</p>
  <p><code>products</code> is an array of the same-looking objects; all objects have a name, a price and a description.</p>
  <p>how can I declare that?</p>
  <p>I want to do something like</p>
  <pre><code>bagTotal = (products: [{name: string, price: number, description: string}]) =&gt; {
   // function does stuff
  }
  </code></pre>
  <p>but that's not right. How can I declare this?</p>