title: Exclude function types from an object type
body: <p>In the following excerpt of code:</p>
  
  <pre><code>interface User {
    name: string;
    age: number;
    bestFriend: User;
    getInfo: () =&gt; any;
  }
  
  type MyCustomType = {
    [key in keyof User]: User[key]
  };
  </code></pre>
  
  <p><sup><a href="https://www.typescriptlang.org/play/index.html#code/JYOwLgpgTgZghgYwgAgKoGdrIN4FgBQyRyIcAthAFzLphSgDmA3AccnA1SQK5kBG0FoWIDaAMXoQQAE2oZBrYpzABJEDAD21ABQBKZAF4AfOxABPAgF8CBMGYAOKALJmAwt1oayAFQcoDOIpEANoA1hBmyKDI4WYaMGiYUAC6cklhEclWQgQA9LnIABIaAG5YpVhgABYoAAYu7p4+frXIdo4AdMgAmhrcAOQANoM0ECjVcGBRU1Vw6G01yABEymqaS8gw3CAIYMAaIG1+HXkFKvPV0ChwyADucJFgGsgQAB4Ig9zS18NHjhezKZwKDXTbbXb7EAAfiAA" rel="nofollow noreferrer">Playground link.</a></sup></p>
  
  <p>Is there a way to remove only the function types of that interface? I've created the <code>MyCustomType</code> type, but I did not find a way to remove the function types, such as <code>getInfo</code>.</p>
  
  <p>How can I allow only non-functions types in that <code>MyCustomType</code> type?</p>
  
  <p>P.S.: Types such as <code>User</code> should not be filtered out.</p>