1.4.5 • Published 6 months ago
@types/honeybadger v1.4.5
Installation
npm install --save @types/honeybadger
Summary
This package contains type definitions for honeybadger (https://github.com/honeybadger-io/honeybadger-node).
Details
Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/honeybadger.
index.d.ts
// Type definitions for honeybadger 1.4
// Project: https://github.com/honeybadger-io/honeybadger-node
// Definitions by: Ryan Skrzypek <https://github.com/rskrz>
// Levi Bostian <https://github.com/levibostian>
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
// TypeScript Version: 2.9
import { RequestHandler, ErrorRequestHandler } from 'express';
import { EventEmitter } from 'events';
declare namespace honeybadger {
interface ConfigureOptions {
apiKey: string;
endpoint?: string | undefined;
hostname?: string | undefined;
environment?: string | undefined;
projectRoot?: string | undefined;
logger?: Console | undefined;
developmentEnvironments?: ReadonlyArray<string> | undefined;
filters?: ReadonlyArray<string> | undefined;
}
interface metadata {
name?: string | undefined;
message?: string | undefined;
context?: object | undefined;
session?: object | undefined;
headers?: object | undefined;
params?: object | undefined;
cgiData?: object | undefined;
url?: string | undefined;
component?: string | undefined;
action?: string | undefined;
fingerprint?: string | undefined;
}
type CallbackFunction = (err: Error | null, notice: object | null) => void;
type LambdaHandler = (event: object, context: object) => void;
interface HoneyBadgerInstance extends EventEmitter {
context: any;
configure: (options: ConfigureOptions) => void;
notify: (err?: any, name?: any, extra?: CallbackFunction | metadata, callback?: CallbackFunction) => void;
setContext: (context: object) => void;
resetContext: (context?: object) => void;
factory: (options?: ConfigureOptions) => HoneyBadgerInstance;
errorHandler: ErrorRequestHandler;
requestHandler: RequestHandler;
lambdaHandler: (handler: LambdaHandler) => LambdaHandler;
onUncaughtException: (func: (error: Error) => void) => void;
}
}
declare const honeybadger: honeybadger.HoneyBadgerInstance;
export = honeybadger;
Additional Details
- Last updated: Thu, 08 Jul 2021 14:22:53 GMT
- Dependencies: @types/express
- Global values: none
Credits
These definitions were written by Ryan Skrzypek, and Levi Bostian.