title: In TypeScript, how can I resolve 'Property does not exist on type'?
body: <p>I have just upgraded Node.js from v 6 (previously working) to v 8 (not working).</p>
  
  <p>I have a line of code where I try to preserve the path the user is trying to access:</p>
  
  <pre><code>req.session.returnTo = req.path;
  </code></pre>
  
  <p>Since the upgrade, I am getting:</p>
  
  <pre><code>error TS2339: Property 'returnTo' does not exist on type 'Session'
  </code></pre>
  
  <p>How do I resolve this?</p>