title: TypeScript class implements interface
body: <p>Why can the following code be complied correctly, rather than the compiler raising an error <code>Type '() =&gt; number' is not assignable to type '() =&gt; void'.</code>?</p>
  <pre><code> interface ClockInterface {
        currentTime: Date;
        f() : void;
      }
      
      class Clock implements ClockInterface {
        sdd : unknown = undefined
        currentTime: Date = new Date();
         f():number{
               return 8
         }
        constructor(h: number, m: number){}
      }
  </code></pre>