What is "type '{}'"?
<p>In TypeScript, what exactly is <code>type '{}'</code> and how does it relate to other built-in types?</p>

<p>For example, the last line of the following example gives <code>Type '{}' is not assignable to type 'number'</code>, and I am not completely clear on what <code>type {}</code> is in this context, or indeed how it comes about:</p>

<pre><code>// A function taking no arguments and returning T
type NoArgsFn&lt;T&gt; = () =&gt; T;

// An instance of NoArgsFn&lt;number&gt;
function get_the_answer(): number {
  return 42;
}

// Call the supplied function and return its value
function call&lt;T, Fn extends NoArgsFn&lt;T&gt;&gt;(fn: Fn): T {
  return fn();
}

// Expect this to be equivalent to `let the_answer: number = 42', but
// instead get "Type '{}' is not assignable to type 'number'"
let the_answer: number = call(get_the_answer);
</code></pre>