@bugsnag/node
Version:
Bugsnag error reporter for Node.js
24 lines (18 loc) • 624 B
TypeScript
import { Client, Event, Logger, Config, BugsnagStatic } from '@bugsnag/core'
type AfterErrorCb = (err: any, event: Event, logger: Logger) => void;
interface NodeConfig extends Config {
hostname?: string
onUncaughtException?: AfterErrorCb
onUnhandledRejection?: AfterErrorCb
agent?: any
projectRoot?: string
sendCode?: boolean
}
interface NodeBugsnagStatic extends BugsnagStatic {
start(apiKeyOrOpts: string | NodeConfig): Client
createClient(apiKeyOrOpts: string | NodeConfig): Client
}
declare const Bugsnag: NodeBugsnagStatic
export default Bugsnag
export * from '@bugsnag/core'
export { NodeConfig }