title: Typescript type guard that returns additional data
body: <p>is it possible for a type guard function to return other data?</p>
  <p>For example something like this:</p>
  <pre><code>function isNumber(value: any): [value is number, reason: string] {
      if (typeof value === 'number') {
          return [true, &quot;&quot;]
      } else {
          return [false, `Wrong typeof ${typeof value}`]
      }
  }
  </code></pre>