title: Firebase Admin SDK ERROR: Expression has type `void`. Put it on its own line as a statement
body: <p>I´m following this example from firebase.
  <a href="https://firebase.google.com/docs/functions/get-started" rel="noreferrer">https://firebase.google.com/docs/functions/get-started</a></p>
  
  <p>I´ve just download all the required API and had started learning.</p>
  
  <p>I´m creating the functions with TypeScript, this "Hello World" <a href="https://github.com/firebase/functions-samples/blob/master/typescript-getting-started/functions/src/index.ts" rel="noreferrer">https://github.com/firebase/functions-samples/blob/master/typescript-getting-started/functions/src/index.ts</a> worked fine.</p>
  
  <p>But "addMessage()" didn't. </p>
  
  <pre><code>exports.addMessage = functions.https.onRequest((req, res) =&gt; {
    const original = req.query.text;
    return admin.database().ref('/messages').push({original: original}).then((snapshot) =&gt; {
      return res.redirect(303, snapshot.ref.toString());
    });
  });
  </code></pre>
  
  <p>It's giving this error message:</p>
  
  <blockquote>
    <p>Firebase Admin SDK ERROR: Expression has type <code>void</code>. Put it on its own line as a statement</p>
  </blockquote>