title: Types for static property of styled-components element
body: <p>How can I type a styled-component element that has a static property?</p>
  
  <pre class="lang-js prettyprint-override"><code>interface IMyList {
    Item: ThemedStyledFunction&lt;"li", any&gt;;
  }
  
  const MyList: IMyList = styled.ul`
    padding: 0;
    margin: 0;
  `;
  
  MyList.Item = styled.li`
    display: block;
    padding-left: 16px;
    color: rebeccapurple;
  `;
  
  // Usage
  type TUser = {
      name: string;
      age: number
  }
  
  export default function Users(data: TUser[]) {
      return (
          &lt;List&gt;
              {data.map(user =&gt; {
                  &lt;List.Item&gt;
                      &lt;span className="name"&gt;{ user.name }&lt;/span&gt;
                      &lt;span className="age"&gt;{ user.age }&lt;/span&gt;
                  &lt;/List.Item&gt;
              })}
          &lt;/List&gt;
      );
  }
  </code></pre>
  
  <p>The above throws me <code>Property 'Item' is missing in type 'String &amp; StyledComponentBase&lt;"ul", any, {}, never&gt;' but required in type 'IMyList'.ts(2741)</code> for "MyList" and <code>Property 'attrs' is missing in type 'String &amp; StyledComponentBase&lt;"li", any, {}, never&gt;' but required in type 'ThemedStyledFunction&lt;"li", any, {}, never&gt;'.ts(2741)</code> for "MyList.Item". </p>