title: Typescript, Array to dynamic key Object , how set return types?
body: <p>How to set this function return type?</p>
  <pre><code>function arr2ObjByKeys(range: [string, string], keys: { start: string; end: string }) {
    return {
      [keys.start]: range[0],
      [keys.end]: range[1]
    }
  }
  </code></pre>
  <p>For example:</p>
  <pre><code>arr2ObjByKeys(['a', 'b'], { start: 'start1', end: 'end1' })
  </code></pre>
  <p>I hope vscode intelligent tip: start1 and end1</p>