title: How can I define a return type of void for a function in a Typescript interface?
body: <p>I have this function:</p>
  
  <pre><code>   network = (action): void =&gt;{
          if (action) {
              this.action = action;
              this.net = true;
              this.netd = true;
          } else {
              this.action = null;
              this.net = false;
              this.netd = false;
          }
      }
  </code></pre>
  
  <p>I tried to define an interface but it's not working for me:</p>
  
  <pre><code>interface IStateService {
      network: (action: string): void;
  }
  </code></pre>
  
  <p>I get a message saying "unexpected token" on void</p>