forked from bugsnag/bugsnag-js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclient.d.ts
44 lines (37 loc) · 1.26 KB
/
client.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
import { Client, OnErrorCallback, Config, Breadcrumb, Session, OnSessionCallback, OnBreadcrumbCallback, Plugin } from './types'
interface LoggerConfig {
debug: (msg: any) => void
info: (msg: any) => void
warn: (msg: any) => void
error: (msg: any) => void
}
/**
* 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 ClientWithInternals extends Client {
public constructor(opts: Config, schema?: {[key: string]: any}, internalPlugins?: Plugin[])
_config: { [key: string]: {} }
_logger: LoggerConfig
_breadcrumbs: Breadcrumb[];
_setDelivery: (handler: (client: Client) => {
sendEvent: (payload: any, cb: (err?: Error | null) => void) => void
}) => void
_metadata: { [key: string]: any }
startSession(): ClientWithInternals
resumeSession(): ClientWithInternals;
_session: Session | null
_pausedSession: Session | null
_sessionDelegate: {
startSession: (client: ClientWithInternals) => any
}
_addOnSessionPayload: (cb: (sessionPayload: Session) => void) => void
_cbs: {
e: OnErrorCallback[]
s: OnSessionCallback[]
sp: any[]
b: OnBreadcrumbCallback[]
}
}