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

    3.0.4 • 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

    // Type definitions for vhost 3.0
    // Project: https://github.com/expressjs/vhost
    // Definitions by: Vincenzo Chianese <https://github.com/XVincentX>
    //                 Cambo <https://github.com/indentedspace>
    // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
    
    import express = require('express');
    
    declare namespace vhost {
        interface Request extends express.Request {
            vhost: {
                host: string;
                hostname: string;
                length: number;
                [key: number]: string;
            };
        }
    
        interface Handler {
            (req: Request, res: express.Response, next: express.NextFunction): void;
        }
    }
    
    declare function vhost(hostname: string | RegExp, handler: vhost.Handler): express.Handler;
    
    export = vhost;

    Additional Details

    • Last updated: Fri, 09 Jul 2021 01:01:20 GMT
    • Dependencies: @types/express
    • Global values: none

    Credits

    These definitions were written by Vincenzo Chianese, and Cambo.

    Keywords

    none

    Install

    npm i @types/vhost

    DownloadsWeekly Downloads

    4,853

    Version

    3.0.4

    License

    MIT

    Unpacked Size

    4.35 kB

    Total Files

    4

    Last publish

    Collaborators

    • avatar