Skip to content

Commit

Permalink
Merge pull request #20 from JPBM135/feat/d-types
Browse files Browse the repository at this point in the history
  • Loading branch information
ntedgi committed Dec 30, 2022
2 parents 593003a + 71c0ab2 commit 7de3415
Show file tree
Hide file tree
Showing 3 changed files with 148 additions and 9 deletions.
12 changes: 12 additions & 0 deletions index.d.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
declare module 'express-body-parser-error-handler' {
import type { Request, Response, NextFunction } from 'express';

export interface BodyParserErrorHandlerOptions {
onError: (err: Error, req: Request, res: Response) => void;
errorMessage: (err: Error) => string;
}

export default function bodyParserErrorHandler(
options?: BodyParserErrorHandlerOptions,
): (req: Request, res: Response, next: NextFunction) => void;
}
133 changes: 129 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 7 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,17 +23,19 @@
"url": "https://github.com/ntedgi/express-body-parser-error-handler/issues"
},
"homepage": "https://github.com/ntedgi/express-body-parser-error-handler#readme",
"dependencies": {},
"dependencies": {
"@types/express": "^4.17.15"
},
"devDependencies": {
"supertest": "^6.1.6",
"body-parser": "^1.15.1",
"chai": "^4.3.4",
"coveralls": "^3.1.1",
"express": "^4.17.2",
"jest": "^29.1.2",
"nyc": "^15.1.0",
"sinon": "^14.0.1",
"jest": "^29.1.2",
"standard": "^17.0.0"
"standard": "^17.0.0",
"supertest": "^6.1.6"
},
"standard": {
"globals": [
Expand All @@ -43,4 +45,4 @@
"afterAll"
]
}
}
}

0 comments on commit 7de3415

Please sign in to comment.