title: Getting a number from KO observable
body: <p>(I am sorry for so many Typescript questions - am just getting started with TS)</p>
  
  <p>I have a KO observable called index.  I just want to increase the value of it by one.</p>
  
  <p>Original JS code:</p>
  
  <pre><code>data.index(data.index()+1);
  </code></pre>
  
  <p>This gives compile error:  Left hand side must be a number... so I get the value as a number.</p>
  
  <pre><code>var currentIndex: number = data.index();
  data.index(currentIndex-1);
  </code></pre>
  
  <p>However, I then get another compile error: Type '{}' is not assignable to type 'number'.</p>
  
  <p>How do I tell TS that index() is returning a number?</p>