title: Typescript Advanced Type NonFunctionPropertyNames Explained
body: <p>I was trying to get deeper understanding of advanced types in Typescript one of those types as example is NonFunctionPropertyNames which extracts only a properties of a given object.</p>
  
  <pre><code>type NonFunctionPropertyNames&lt;T&gt; = { [K in keyof T]: T[K] extends Function ? never : K }[keyof T];
  </code></pre>
  
  <p>I can understand the first part inside the curly brackets <code>'{ [K in keyof T]: T[K] extends Function ? never : K }'</code>, we are declaring an object and exclude the properties which extend Function. What puzzles me is the part after the curly brackets <code>[keyof T]</code>. This looks like a definition of an array <code>{...}[keyof T]</code> but it in fact returns object. 
  Can someone explain why only the curly brackets part is not enough for declaring the type, and what is the role of <code>[keyof T]</code>.</p>