How can I just import typings into Typescript, without the whole module?
<p>I am writing a piece of Express middleware in Typescript. It will be published to npm as a standalone package. I would like to be able to define my functions using Express types, as this lets me write with type safety:
</p>

<pre class="lang-typescript prettyprint-override"><code>function playWithRequest( req: express.Request, res: express.Response, next: express.NextFunction ) {
    req['key'] = 'stuff';
}

module.exports = playWithRequest;
</code></pre>

<p>However, I have no need to <code>require('express')</code> itself, and I want to avoid <code>import</code> statements that will generate such a <code>require()</code> call. How can I tell Typescript about the express types without importing express itself?</p>

<p>The express typings are installed by <code>npm install @types/express</code>, and are thus hanging around in <code>node_modules/@types/express/index.d.ts</code>.</p>