Adding types for existing node module "express-list-endpoints" (#40656)

* initial commit

* fix: update express-list-endpoints-tests.ts

* fix: update index.d.ts

I followed in express-less's footsteps

* fix: update tslint.json

I used the tslint file found in express-less.

* fix: remove unnecessary rule changes

* fix: remove unneeded "export"

* docs: update header

* fix: remove tslint rule
This commit is contained in:
sjoseph7
2019-12-03 15:12:15 -08:00
committed by Andrew Casey
parent 254fd7c1bb
commit 35fd1ba5db
4 changed files with 49 additions and 0 deletions

View File

@@ -0,0 +1,6 @@
import express = require('express');
import getEndpoints = require('express-list-endpoints');
const app = express();
getEndpoints(app);

17
types/express-list-endpoints/index.d.ts vendored Normal file
View File

@@ -0,0 +1,17 @@
// Type definitions for express-list-endpoints 4.0
// Project: https://github.com/AlbertoFdzM/express-list-endpoints
// Definitions by: S Joseph <https://github.com/sjoseph7>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
import express = require('express');
declare function getEndpoints(app: express.Express): getEndpoints.Endpoint[];
declare namespace getEndpoints {
interface Endpoint {
path: string;
methods: string[];
}
}
export = getEndpoints;

View File

@@ -0,0 +1,23 @@
{
"compilerOptions": {
"module": "commonjs",
"lib": [
"es6"
],
"noImplicitAny": true,
"noImplicitThis": true,
"strictNullChecks": true,
"strictFunctionTypes": true,
"baseUrl": "../",
"typeRoots": [
"../"
],
"types": [],
"noEmit": true,
"forceConsistentCasingInFileNames": true
},
"files": [
"index.d.ts",
"express-list-endpoints-tests.ts"
]
}

View File

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