@types/vhost
Advanced tools
+17
-1
| // 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 | ||
@@ -8,4 +9,19 @@ | ||
| declare function vhost(hostname: string | RegExp, handler: express.Handler): express.Handler; | ||
| 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; |
| { | ||
| "name": "@types/vhost", | ||
| "version": "3.0.3", | ||
| "version": "3.0.4", | ||
| "description": "TypeScript definitions for vhost", | ||
@@ -12,2 +12,7 @@ "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/vhost", | ||
| "githubUsername": "XVincentX" | ||
| }, | ||
| { | ||
| "name": "Cambo", | ||
| "url": "https://github.com/indentedspace", | ||
| "githubUsername": "indentedspace" | ||
| } | ||
@@ -26,4 +31,4 @@ ], | ||
| }, | ||
| "typesPublisherContentHash": "98ccb3a532a818666fd4ffbc9431a8420a2219f05aa75029e350583ced05d12b", | ||
| "typesPublisherContentHash": "77723dd834475ab5435f9f54cce366160d369944d224e78993145d0690b3d703", | ||
| "typeScriptVersion": "3.6" | ||
| } |
+19
-3
@@ -14,2 +14,3 @@ # Installation | ||
| // Definitions by: Vincenzo Chianese <https://github.com/XVincentX> | ||
| // Cambo <https://github.com/indentedspace> | ||
| // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped | ||
@@ -19,4 +20,19 @@ | ||
| declare function vhost(hostname: string | RegExp, handler: express.Handler): express.Handler; | ||
| 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; | ||
@@ -27,3 +43,3 @@ | ||
| ### Additional Details | ||
| * Last updated: Thu, 08 Jul 2021 22:42:19 GMT | ||
| * Last updated: Fri, 09 Jul 2021 01:01:20 GMT | ||
| * Dependencies: [@types/express](https://npmjs.com/package/@types/express) | ||
@@ -33,2 +49,2 @@ * Global values: none | ||
| # Credits | ||
| These definitions were written by [Vincenzo Chianese](https://github.com/XVincentX). | ||
| These definitions were written by [Vincenzo Chianese](https://github.com/XVincentX), and [Cambo](https://github.com/indentedspace). |
Trivial Package
Supply chain riskPackages less than 10 lines of code are easily copied into your own project and may not warrant the additional supply chain risk of an external dependency.
Found 1 instance in 1 package
4354
29.74%21
200%47
51.61%0
-100%