title: Can't cast a function inside an object to a type
body: <p>I try to cast a function inside an object to a type.</p>
  <p>Why does this not work?</p>
  <pre class="lang-js prettyprint-override"><code>export type Validator&lt;TInput&gt; = (
    input: TInput
  ) =&gt; Promise&lt;{ [key: string]: string }&gt;;
  
  const works: Validator&lt;string&gt; = async (input) =&gt; {
    return {};
  };
  
  const doesNotWork = {
    myFancyProperty: Validator&lt;string&gt; = async (input) =&gt; {
      return {};
    }
  }
  
  =&gt; 'Validator' only refers to a type, but is being used as a value here.
  </code></pre>
  <p>What's the correct syntax?
  I've searched and tried for an hour now.
  Maybe i am to tired.</p>