-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.d.ts
62 lines (54 loc) · 1.73 KB
/
index.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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
// Type definitions for Jerrbit
// Project: jerrbit
/**
* Client for Errbit or Airbrake monitoring service, capable of reporting
* errors and the context in which they occur, when they happen.
*/
export default class Client {
/**
* Creates a new instance of Client
*/
constructor(options: {
/**
* The host url to send all exception reports to.
*/
host: string,
/**
* The id of the project registered in Airbrake or Errbit. If unspecified, the
* projectKey is used instead.
*/
projectId?: string,
/**
* The key of the project registered in Airbrake or Errbit. This value is only
* used if projectId is not specified.
*/
projectKey?: string,
/**
* List of environments where errors should ignored service.
*/
ignoredEnvironments?: Array<string>
} = { host: 'https://api.airbrake.io', ignoredEnvironments: ['development', 'test'] });
/**
* Sends an error report to the monitoring service if the environment is
* not listed in ignoredEnvironments
*/
notify(exception: Error, context?: {
context?: {
/**
* The url on which the error occurred. This is automatically set, if left
* unspecified.
*/
url: string,
},
/**
* An object containing the current url's query parameters. This is
* automatically set, if left unspecified.
*/
params?: object,
/**
* An object containing the contents of the user's current session. This is
* automatically set, if left unspecified.
*/
session?: object,
});
}