title: Typescript- Creating member function outside of a Class definition with return types
body: <p>How do you define a member function, outside the definition of a class in Typescript?</p>
  
  <p>To quote an example from c++:</p>
  
  <pre><code>class A
  {
     void runThis();
    //Member variables and constructors here 
  } 
  
  
  A::runThis()
  {
    //code goes here
  }
  </code></pre>
  
  <p>How do you achieve the same in typescript? By searching in google I found something like:</p>
  
  <pre><code>class A
  {
    runThis: () =&gt; void;             
  }
  
  
  A.prototype.runThis = function(){
   //Anonymous function code goes here
  }
  </code></pre>
  
  <p>However, I have not found the syntax, to do the same with functions that have a return type (such as a number or a string).</p>
  
  <p>How can this be achieved? </p>