title: Typescript array of objects as props
body: <pre><code>import React from &quot;react&quot;;
  import SingleEvent from &quot;./SingleEvent&quot;;
  interface Item {
    id: string;
    title: string;
    description: string;
    location: string;
    date: string;
    image: string;
    isFeatured: false;
  }
  
  export default function EventList({ items }) {
    return (
      &lt;ul&gt;
        {items.map((item: Item) =&gt; (
          &lt;SingleEvent key={item.id} /&gt;
        ))}
      &lt;/ul&gt;
    );
  }
  </code></pre>
  <p>I have this component. Here I destructure the props and get the items array. I do want to define the type of that array.</p>
  <p>I tried this</p>
  <pre><code>function EventList({ items :Item[]})
  </code></pre>
  <p>But this seems not working and also the items props can be an empty array as well.</p>
  <p>How do I achieve this using TS?</p>