mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-26 19:04:13 +08:00
Create express-enforces-ssl typings.
This commit is contained in:
6
types/express-enforces-ssl/express-enforces-ssl-tests.ts
Normal file
6
types/express-enforces-ssl/express-enforces-ssl-tests.ts
Normal file
@@ -0,0 +1,6 @@
|
||||
import express = require('express');
|
||||
import expressEnforcesSsl = require('express-enforces-ssl');
|
||||
|
||||
let app: express.Express = express();
|
||||
|
||||
app.use(expressEnforcesSsl());
|
||||
16
types/express-enforces-ssl/index.d.ts
vendored
Normal file
16
types/express-enforces-ssl/index.d.ts
vendored
Normal file
@@ -0,0 +1,16 @@
|
||||
// Type definitions for express-enforces-ssl 1.1
|
||||
// Project: https://github.com/aredo/express-enforces-ssl
|
||||
// Definitions by: Kevin Stubbs <https://github.com/kevinstubbs>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
|
||||
import { Request, Response, NextFunction } from 'express';
|
||||
|
||||
/**
|
||||
* Enforces HTTPS connections on any incoming requests.
|
||||
*/
|
||||
declare function enforceHTTPS(): (req: Request, res: Response, next: NextFunction) => void;
|
||||
|
||||
declare namespace enforceHTTPS {
|
||||
}
|
||||
|
||||
export = enforceHTTPS;
|
||||
22
types/express-enforces-ssl/tsconfig.json
Normal file
22
types/express-enforces-ssl/tsconfig.json
Normal file
@@ -0,0 +1,22 @@
|
||||
{
|
||||
"compilerOptions": {
|
||||
"module": "commonjs",
|
||||
"lib": [
|
||||
"es6"
|
||||
],
|
||||
"noImplicitAny": true,
|
||||
"noImplicitThis": true,
|
||||
"strictNullChecks": true,
|
||||
"baseUrl": "../",
|
||||
"typeRoots": [
|
||||
"../"
|
||||
],
|
||||
"types": [],
|
||||
"noEmit": true,
|
||||
"forceConsistentCasingInFileNames": true
|
||||
},
|
||||
"files": [
|
||||
"index.d.ts",
|
||||
"express-enforces-ssl-tests.ts"
|
||||
]
|
||||
}
|
||||
1
types/express-enforces-ssl/tslint.json
Normal file
1
types/express-enforces-ssl/tslint.json
Normal file
@@ -0,0 +1 @@
|
||||
{ "extends": "dtslint/dt.json" }
|
||||
Reference in New Issue
Block a user