TypeScript, what are call signature of an object literal and how can they be used with generic types? : <p>I'm reading this section of the <a href="https://www.typescriptlang.org/docs/handbook/generics.html" rel="noreferrer">TypeScript documentation</a>, under the generic types section, the following two are stated to be the equivalent:</p>

<p><strong>Code Sample 1</strong></p>

<pre><code>function identity&lt;T&gt;(arg: T): T {
    return arg;
}

let myIdentity: &lt;T&gt;(arg: T) =&gt; T = identity;
</code></pre>

<p><strong>Code Sample 2</strong></p>

<pre><code>function identity&lt;T&gt;(arg: T): T {
    return arg;
}

let myIdentity: {&lt;T&gt;(arg: T): T} = identity;
</code></pre>

<p>The documentation states this is possible due to the following.</p>

<blockquote>
  <p>We can also write the generic type as a call signature of an object literal type</p>
</blockquote>

<p>Despite this line I'm still struggling to understand how the two are equivalent, is there any further documentation or explanation of what it means to be 'a call signature of an object literal type'.</p>

<p>I'm sorry I can't give any further explanation but I'm completely drawing a blank as to how the two are equivalent, to me the second type definition states that myIdentity should be an object?</p>

<p>Thanks.</p>
