forked from rollbar/rollbar-react-native
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
48 lines (42 loc) · 1.62 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
export class Client {
constructor(config: Configuration | string);
public captureUncaughtExceptions(): void;
public captureUnhandledRejections(): void;
public log(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public debug(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public info(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public warning(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public error(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public critical(obj: LogArgument, extra?: Extra, callback?: Callback): LogResult;
public setPerson(id: string, name?: string, email?: string): void;
public clearPerson(): void;
}
export class Configuration {
constructor(accessToken: string, options?: ConfigurationOptions);
public setPlatform(platform: string): void;
public toJSON(): object;
}
export type LogArgument = string | Error | object | Callback | Date | any[];
export type Extra = object | undefined | null;
export interface LogResult {
uuid: string;
}
export type MaybeError = Error | undefined | null;
export type Callback = (err: MaybeError, response: object) => void;
export interface ConfigurationOptions {
environment?: string;
logLevel?: string;
reportLevel?: string;
endpoint?: string;
appVersion?: string;
codeBundleId?: string;
releaseStage?: string;
enabledReleaseStages?: string[];
captureUncaught?: boolean;
captureUnhandledRejections?: boolean;
captureDeviceInfo?: boolean;
payload?: object;
enabled?: boolean;
verbose?: boolean;
transform?: (data: object) => void;
}