@types/api-error-handler
TypeScript icon, indicating that this package has built-in type declarations

1.0.36 • Public • Published

Installation

npm install --save @types/api-error-handler

Summary

This package contains type definitions for api-error-handler (https://github.com/expressjs/api-error-handler).

Details

Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/api-error-handler.

index.d.ts

import * as express from "express";

declare namespace apiErrorHandler {
    // Body response: the JSON returned by api-error-handler
    // See https://github.com/expressjs/api-error-handler/blob/1.0.0/index.js
    interface Response {
        status: number;
        stack?: string | undefined;
        message: string;

        // Client errors
        code?: any;
        name?: string | undefined;
        type?: any;
    }
}

declare function apiErrorHandler(options?: any): express.ErrorRequestHandler;

export = apiErrorHandler;

Additional Details

  • Last updated: Mon, 06 Nov 2023 22:41:04 GMT
  • Dependencies: @types/express

Credits

These definitions were written by Tanguy Krotoff.

Readme

Keywords

none

Package Sidebar

Install

npm i @types/api-error-handler

Weekly Downloads

642

Version

1.0.36

License

MIT

Unpacked Size

3.77 kB

Total Files

5

Last publish

Collaborators

  • types