diff --git a/types/connect-trim-body/connect-trim-body-tests.ts b/types/connect-trim-body/connect-trim-body-tests.ts new file mode 100644 index 0000000000..3c056a951d --- /dev/null +++ b/types/connect-trim-body/connect-trim-body-tests.ts @@ -0,0 +1,6 @@ +import connectTrimBody from 'connect-trim-body'; +import express from 'express'; + +const app = express(); + +app.use(connectTrimBody()); diff --git a/types/connect-trim-body/index.d.ts b/types/connect-trim-body/index.d.ts new file mode 100644 index 0000000000..3c02c0eea0 --- /dev/null +++ b/types/connect-trim-body/index.d.ts @@ -0,0 +1,11 @@ +// Type definitions for connect-trim-body 0.0 +// Project: https://github.com/samora/connect-trim-body +// Definitions by: Levi Bostian +// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped +// TypeScript Version: 2.7 + +import { RequestHandler } from "express"; + +declare function connectTrimBodyMiddleware(): RequestHandler; + +export = connectTrimBodyMiddleware; diff --git a/types/connect-trim-body/tsconfig.json b/types/connect-trim-body/tsconfig.json new file mode 100644 index 0000000000..8e9d307545 --- /dev/null +++ b/types/connect-trim-body/tsconfig.json @@ -0,0 +1,24 @@ +{ + "compilerOptions": { + "module": "commonjs", + "lib": [ + "es6" + ], + "noImplicitAny": true, + "noImplicitThis": true, + "strictNullChecks": true, + "strictFunctionTypes": true, + "baseUrl": "../", + "typeRoots": [ + "../" + ], + "types": [], + "noEmit": true, + "forceConsistentCasingInFileNames": true, + "esModuleInterop": true + }, + "files": [ + "index.d.ts", + "connect-trim-body-tests.ts" + ] +} \ No newline at end of file diff --git a/types/connect-trim-body/tslint.json b/types/connect-trim-body/tslint.json new file mode 100644 index 0000000000..e60c15844f --- /dev/null +++ b/types/connect-trim-body/tslint.json @@ -0,0 +1,3 @@ +{ + "extends": "dtslint/dt.json" +} \ No newline at end of file