forked from bugsnag/bugsnag-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathevent.d.ts
41 lines (39 loc) · 1.15 KB
/
event.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import { App, Device, Event, Request, Breadcrumb, User, Session } from './types'
import { Error } from './types/event'
interface HandledState {
unhandled: boolean
severity: string
severityReason: { type: string }
}
/**
* Extend the public type definitions with internal declarations.
*
* This is currently used by the unit tests. These will be rolled into the
* module itself once it is converted to TypeScript.
*/
export default class EventWithInternals extends Event {
constructor (errorClass: string, errorMessage: string, stacktrace: any[], handledState?: HandledState, originalError?: Error)
_metadata: { [key: string]: any }
_user: User
_handledState: HandledState
_session?: Session
toJSON(): {
payloadVersion: '4'
exceptions: Array<Error & { message: Error['errorMessage'] }>
severity: Event['severity']
unhandled: boolean
severityReason: {
type: string
[key: string]: any
}
app: App
device: Device
request: Request
breadcrumbs: Breadcrumb[]
context: string | undefined
groupingHash: string | undefined
metaData: { [key: string]: any }
user: User
session: Session
};
}