title: extending a method in typescript
body: <p>Hi all i currently have a method. and i would like to add an option to create a custom method once its been filled out when its called.</p>
  
  <p>currently all my methods get call like</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>let test = foo(var)</code></pre>
  </div>
  </div>
  </p>
  
  <p>I would like to have the option to add this on top of the current method</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>    let test = foo(var).bar('i want this added to current method')</code></pre>
  </div>
  </div>
  </p>
  
  <p>I have no idea how to do this or even what this would be called.</p>
  
  <p>Thank you </p>