title: TypeScript - property does not exist on type (but it exists)?
body: <p>I have a type of User that contains some user data. There's also a type of UsersResponse which basically is <code>users: User[]</code>. So far everything is easy. The problem is I have to pass UsersResponse as props and then I can't access <code>.users</code>. Why is that?</p>
  <p><a href="https://codesandbox.io/s/create-react-app-typescript-forked-hweiq?file=/src/index.tsx" rel="nofollow noreferrer">Link to Codesandbox</a>.</p>
  <p>Part of the code:</p>
  <pre><code>export type User = {
    login: string;
    password: string;
  }
  
  export type UsersResponse = {
    users: User[];
  }
  
  export interface MyProps {
    props: UsersResponse;
  }
  
  const App = (props: MyProps): any =&gt; {
    console.log('props: ', props.users);
  
    return (
      &lt;&gt;foo&lt;/&gt;
    );
  }
  </code></pre>
  <p>Console.log fails because <code>Property 'users' does not exist on type 'MyProps'.</code></p>
  <p>But this makes no sense to me, because MyProps returns UsersResponse and it has <code>users</code>. What am I missing here? How do I fix that? I know it's something really obvious or I made a typo, but really, I can't find it. Note I have to use <code>props: type</code> as this format is forced by the framework I'm using.</p>