Installation
npm install --save @types/vhost
Summary
This package contains type definitions for vhost (https://github.com/expressjs/vhost).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vhost.
import connect = require("connect");
import http = require("http");
declare namespace vhost {
interface Request extends connect.IncomingMessage {
vhost: {
host: string;
hostname: string;
length: number;
[key: number]: string;
};
}
interface Handler {
(req: Request, res: http.ServerResponse, next: connect.NextFunction): void;
}
}
declare function vhost(hostname: string | RegExp, handler: vhost.Handler): connect.NextHandleFunction;
export = vhost;
Additional Details
- Last updated: Fri, 17 Nov 2023 21:35:41 GMT
- Dependencies: @types/connect
Credits
These definitions were written by Vincenzo Chianese, and Paul Grant.