title: Getting Parameter by index of a function type
body: <p>I have a function type:</p>
  <pre><code>export interface NativeMethods {
  
  measureLayout(
          relativeToNativeComponentRef: HostComponent&lt;unknown&gt; | number,
          onSuccess: MeasureLayoutOnSuccessCallback,
          onFail: () =&gt; void /* currently unused */,
      ): void;
  
  }
  </code></pre>
  <p>This is actually in a lib. I want to get the type of each parameter like this pseudo-code:</p>
  <p>type Param1 = Parameters&lt;NativeMethod.measureLayout&gt;[0];</p>
  <p>however it doesn't work, any ideas?</p>