title: Does T[keyof T] work like the distributive conditional type?
body: <p>I'm trying to understand this example from the <a href="https://www.typescriptlang.org/docs/handbook/advanced-types.html#distributive-conditional-types" rel="nofollow noreferrer">Distributive conditional types</a> section:</p>
  <blockquote>
  <p>Conditional types are particularly useful when combined with mapped
  types:</p>
  <pre><code>type FunctionPropertyNames&lt;T&gt; = {
    [K in keyof T]: T[K] extends Function ? K : never;
  }[keyof T];
  </code></pre>
  </blockquote>
  <p>The usage of the <strong>index access</strong> operator is not clear for me, in this example.
  Here is the simplest example which uses the same idea (as far as I can understand):</p>
  <pre><code>type Foo = {
      prop1: never;
      prop2: never
      method1: &quot;method1&quot;;
      method2: &quot;method2&quot;;
  }
  
  type FunctionPropertyNames = Foo[keyof Foo] // &quot;method1&quot; | &quot;method2&quot;
  </code></pre>
  <p>So, my question: is such usage of index access operator just a specific case of the distributive conditional type? Because it looks like result type is the union of all applications of T[K] where <code>never</code> is filtered because <a href="https://github.com/microsoft/TypeScript/issues/31751#issuecomment-498526919" rel="nofollow noreferrer">&quot;<code>never</code> is the empty union&quot;</a></p>
  <hr />
  <p><strong>Update.</strong> I will try to formulate this question more precisely:
  TS Handbook describes what is the syntax for mapped types, and for conditional types.
  However, I did not find any description of this form of the type definition:</p>
  <pre><code>type Keys = 'name1' | 'name2' | 'name3'
  type Foo = Bar[Keys]
  </code></pre>
  <p>or, more realistic:</p>
  <pre><code>type Foo = Bar[keyof Bar]
  </code></pre>
  <p>It looks like some kind of mapping, but it also provides filtering, in the case when Keys contains <code>never</code>. So my question was more about if there any precise description of this feature of the TS type system.</p>