mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-06-28 14:20:12 +00:00
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:
@@ -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
17
types/express-list-endpoints/index.d.ts
vendored
Normal 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;
|
||||
23
types/express-list-endpoints/tsconfig.json
Normal file
23
types/express-list-endpoints/tsconfig.json
Normal 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"
|
||||
]
|
||||
}
|
||||
3
types/express-list-endpoints/tslint.json
Normal file
3
types/express-list-endpoints/tslint.json
Normal file
@@ -0,0 +1,3 @@
|
||||
{
|
||||
"extends": "dtslint/dt.json"
|
||||
}
|
||||
Reference in New Issue
Block a user