title: How can I define a Typescript object return value for a function?
body: <p>My function looks like this:</p>
  
  <pre><code>parseRange = (text) =&gt; {
      var arr = [];
      var lower = null;
      var upper = null;
      if (!text || text === "") {
          lower = null;
          upper = null;
      }
      else if (text.indexOf("-") &gt; 0) {
          arr = text.split("-");
          lower = +arr[0];
          upper = +arr[1];
      }
      else {
          lower = +text;
          upper = null;
      }
      return {
          lower: lower,
          upper: upper
      };
  };
  </code></pre>
  
  <p>I am familiar with returning strings and numbers but how can I specify the return is an object with a lower and upper parameter?</p>