title: returning an object when the return is Promise<void> - legit?
body: <p>I have an async function that has some database code like this:</p>
  <pre><code>export async myCode():Promise&lt;void&gt;{
  
      let fetchData:Array&lt;string&gt; = []
      const result = await SomeDatabaseOperation();
      if(result === 1){
         fetchData.push('success');
      }else{
         fetchData.push('failure');
      }
  }
  </code></pre>
  <p>and this function is called in <code>obj.ts</code> as:</p>
  <pre><code>async function main(){
     await myCode()
  }
  
  main()  
    
  </code></pre>
  <p>but, what I now want to do is, also return the array <code>fetchData</code>:</p>
  <pre><code>let myCodeArray = await myCode()  
    
  </code></pre>
  <p>But, then function <code>myCode</code> returns a promise, so, can I do this :</p>
  <pre><code>export async myCode():Promise&lt;void&gt;{
  
      let fetchData:Array&lt;string&gt; = []
      const result = await SomeDatabaseOperation();
      if(result === 1){
         fetchData.push('success');
      }else{
         fetchData.push('failure');
      }
      return fetchData;  // ##### &lt;---------------- notice this change
  }  
  </code></pre>
  <p>I mean, the return type is a Promise but, I'm returning an array. So far, it's not giving me any error, and the code is returning the array, <strong>But, I wonder if this is legit way of doing it?</strong> Are there any things I should notice while doing this? (Like perhaps maybe typescript wraps the array automatically in a promise or something?)</p>