diff --git a/types/express-list-endpoints/express-list-endpoints-tests.ts b/types/express-list-endpoints/express-list-endpoints-tests.ts new file mode 100644 index 0000000000..e742cacc12 --- /dev/null +++ b/types/express-list-endpoints/express-list-endpoints-tests.ts @@ -0,0 +1,6 @@ +import express = require('express'); +import getEndpoints = require('express-list-endpoints'); + +const app = express(); + +getEndpoints(app); diff --git a/types/express-list-endpoints/index.d.ts b/types/express-list-endpoints/index.d.ts new file mode 100644 index 0000000000..eb142dd295 --- /dev/null +++ b/types/express-list-endpoints/index.d.ts @@ -0,0 +1,17 @@ +// Type definitions for express-list-endpoints 4.0 +// Project: https://github.com/AlbertoFdzM/express-list-endpoints +// Definitions by: S Joseph +// 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; diff --git a/types/express-list-endpoints/tsconfig.json b/types/express-list-endpoints/tsconfig.json new file mode 100644 index 0000000000..625bc95a30 --- /dev/null +++ b/types/express-list-endpoints/tsconfig.json @@ -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" + ] +} \ No newline at end of file diff --git a/types/express-list-endpoints/tslint.json b/types/express-list-endpoints/tslint.json new file mode 100644 index 0000000000..f93cf8562a --- /dev/null +++ b/types/express-list-endpoints/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +}