forked from honeybadger-io/honeybadger-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
honeybadger-js.d.ts
45 lines (42 loc) · 1.17 KB
/
honeybadger-js.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
declare module "honeybadger-js" {
interface Config {
debug?: boolean;
apiKey: string;
revision?: string;
host?: string;
ssl?: boolean;
projectRoot?: string;
environment?: string;
component?: string;
action?: string;
onerror?: boolean;
disabled?: boolean;
maxErrors?: number;
ignorePatterns?: RegExp[];
async?: boolean;
}
interface Notice {
stack: any;
name: string;
message: string;
url: string;
project_root: string;
environment: string;
component: string;
action: string;
fingerprint: string;
context: any;
cookies?: string;
}
class Honeybadger {
static configure(config: Config): void;
static notify(...args: any[]): void;
static wrap<T extends Function>(func: T): T;
static setContext<T extends Object>(context: T): void;
static resetContext(): void;
static beforeNotify(func: (notice?: Notice) => void): void;
static factory(config: Config): Honeybadger;
}
namespace Honeybadger {}
export = Honeybadger;
}