mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-12-03 19:51:53 +00:00
Unwrap all lone ambient external modules
This commit is contained in:
Vendored
+18
-19
@@ -5,28 +5,27 @@
|
||||
|
||||
/// <reference path="../express/express.d.ts" />
|
||||
|
||||
declare module "errorhandler" {
|
||||
import * as express from 'express';
|
||||
|
||||
function errorHandler(options?: errorHandler.Options): express.ErrorRequestHandler;
|
||||
import * as express from 'express';
|
||||
|
||||
namespace errorHandler {
|
||||
interface LoggingCallback {
|
||||
(err: Error, str: string, req: express.Request, res: express.Response): void;
|
||||
}
|
||||
declare function errorHandler(options?: errorHandler.Options): express.ErrorRequestHandler;
|
||||
|
||||
interface Options {
|
||||
/**
|
||||
* Defaults to true.
|
||||
*
|
||||
* Possible values:
|
||||
* true : Log errors using console.error(str).
|
||||
* false : Only send the error back in the response.
|
||||
* A function : pass the error to a function for handling.
|
||||
*/
|
||||
log: boolean | LoggingCallback;
|
||||
}
|
||||
declare namespace errorHandler {
|
||||
interface LoggingCallback {
|
||||
(err: Error, str: string, req: express.Request, res: express.Response): void;
|
||||
}
|
||||
|
||||
export = errorHandler;
|
||||
interface Options {
|
||||
/**
|
||||
* Defaults to true.
|
||||
*
|
||||
* Possible values:
|
||||
* true : Log errors using console.error(str).
|
||||
* false : Only send the error back in the response.
|
||||
* A function : pass the error to a function for handling.
|
||||
*/
|
||||
log: boolean | LoggingCallback;
|
||||
}
|
||||
}
|
||||
|
||||
export = errorHandler;
|
||||
|
||||
Reference in New Issue
Block a user