mirror of
https://github.com/FlipsideCrypto/DefinitelyTyped.git
synced 2026-02-06 10:56:53 +00:00
feat: add vhost types (#43467)
* feat: add vhost types * refactor: lints
This commit is contained in:
parent
8b65eec5a8
commit
e21346be33
10
types/vhost/index.d.ts
vendored
Normal file
10
types/vhost/index.d.ts
vendored
Normal file
@ -0,0 +1,10 @@
|
||||
// Type definitions for vhost 3.0
|
||||
// Project: https://github.com/expressjs/vhost
|
||||
// Definitions by: Vincenzo Chianese <https://github.com/DefinitelyTyped>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import express = require('express');
|
||||
|
||||
declare function vhost(hostname: string, handler: express.Handler): string;
|
||||
|
||||
export = vhost;
|
||||
24
types/vhost/tsconfig.json
Normal file
24
types/vhost/tsconfig.json
Normal file
@ -0,0 +1,24 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictFunctionTypes": true,
|
||||
"esModuleInterop": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"vhost-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/vhost/tslint.json
Normal file
1
types/vhost/tslint.json
Normal file
@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
5
types/vhost/vhost-tests.ts
Normal file
5
types/vhost/vhost-tests.ts
Normal file
@ -0,0 +1,5 @@
|
||||
import vhost from 'vhost';
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
|
||||
vhost('hostname', (_req: Request, _res: Response, _next: NextFunction) => {
|
||||
});
|
||||
Loading…
Reference in New Issue
Block a user