title: Return Promise or Resolved Value from an Async function?
body: <p>I have a Javascript async/await design question. </p>
  
  <p>Imagine this function exists:</p>
  
  <pre><code>async function readFile(filename) { 
     // Asynchronously reads file and returns the content as string
  }
  </code></pre>
  
  <p>Now if I were to use <code>readFile</code> with a certain parameter and return its result, I could do it either like so:</p>
  
  <pre><code>async function readSettings1() {
     const settings = await readFile("settings.json");
     return settings;
  }
  </code></pre>
  
  <p>or:</p>
  
  <pre><code>async function readSettings2() {
     return readFile("settings.json");
  }
  </code></pre>
  
  <p>I understand both approaches work similarly, and must be invoked identically. They both return Promises. There are a couple of syntactic differences:</p>
  
  <ol>
  <li><p><code>readSettings1</code> first resolves the value of <code>readFile</code> and then returns the hard result. Here, the keyword <code>async</code> is used in the function definition so I can use <code>await</code>. </p></li>
  <li><p><code>readSettings2</code> is really just a passthrough. In fact, I can omit <code>async</code> from this function definition. </p></li>
  </ol>
  
  <p>My question is: are there any semantic differences between <code>readSettings1</code> and <code>readSettings2</code>? Do they behave differently in any way? Do you have a preference for either style? Why? Have you read any documentation recommending one style over the other? </p>