title: TypeScript + Express: Property 'rawBody' does not exist on type 'IncomingMessage'
body: <p>In my <code>src/app.ts</code>, I have:</p>
  
  <pre><code>import express from 'express';
  import bodyParser from 'body-parser';
  const app = express()
  
  app.use(bodyParser.json({ verify: (req, res, buf) =&gt; req.rawBody = buf }))
  </code></pre>
  
  <p>But I get the error <code>Property 'rawBody' does not exist on type 'IncomingMessage'</code> on:</p>
  
  <pre><code>app.use(bodyParser.json({ verify: (req, res, buf) =&gt; req.rawBody = buf }))
  </code></pre>
  
  <p>I have a <code>typings/express.d.ts</code>, in which I have:</p>
  
  <pre><code>declare namespace Express {
      export interface Request {
          rawBody: any;
      }
  }
  </code></pre>
  
  <p>and my <code>tsconfig.json</code> is:</p>
  
  <pre><code>{
      "compilerOptions": {
          "outDir": "./built",
          "allowJs": true,
          "target": "es6",
          "esModuleInterop": true,
          "sourceMap": true,
          "moduleResolution": "node"
      },
      "include": [
          "./src/**/*"
      ],
      "files": [
          "typings/*"
      ]
  }
  </code></pre>
  
  <p>So what am I doing wrong?</p>