Create express-enforces-ssl typings.

This commit is contained in:
Kevin Stubbs
2017-06-16 14:58:27 -07:00
parent bce28b648f
commit dbb73101aa
4 changed files with 45 additions and 0 deletions

View 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
View 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;

View 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"
]
}

View File

@@ -0,0 +1 @@
{ "extends": "dtslint/dt.json" }