@types/vhost
TypeScript icon, indicating that this package has built-in type declarations

3.0.9 • Public • Published

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.

index.d.ts

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.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/vhost

Weekly Downloads

30,957

Version

3.0.9

License

MIT

Unpacked Size

3.88 kB

Total Files

5

Last publish

Collaborators

  • types