@@ -40,21 +40,22 @@ declare namespace Rollbar {
40
40
) => void | Promise < TResult > ;
41
41
export type MaybeError = Error | undefined | null ;
42
42
export type Level = "debug" | "info" | "warning" | "error" | "critical" ;
43
+ export type Dictionary = { [ key : string ] : unknown } ;
43
44
/**
44
45
* {@link https://docs.rollbar.com/docs/rollbarjs-configuration-reference#reference }
45
46
*/
46
47
export interface Configuration {
47
48
accessToken ?: string ;
48
49
addErrorContext ?: boolean ;
49
- addRequestData ?: ( data : object , req : object ) => void ;
50
+ addRequestData ?: ( data : Dictionary , req : Dictionary ) => void ;
50
51
autoInstrument ?: AutoInstrumentOptions ;
51
52
captureEmail ?: boolean ;
52
53
captureIp ?: boolean | "anonymize" ;
53
54
captureLambdaTimeouts ?: boolean ;
54
55
captureUncaught ?: boolean ;
55
56
captureUnhandledRejections ?: boolean ;
56
57
captureUsername ?: boolean ;
57
- checkIgnore ?: ( isUncaught : boolean , args : LogArgument [ ] , item : object ) => boolean ;
58
+ checkIgnore ?: ( isUncaught : boolean , args : LogArgument [ ] , item : Dictionary ) => boolean ;
58
59
/**
59
60
* `codeVersion` takes precedence over `code_version`, if provided.
60
61
* `client.javascript.code_version` takes precedence over both top level properties.
@@ -86,7 +87,7 @@ declare namespace Rollbar {
86
87
maxRetries ?: number ;
87
88
maxTelemetryEvents ?: number ;
88
89
nodeSourceMaps ?: boolean ;
89
- onSendCallback ?: ( isUncaught : boolean , args : LogArgument [ ] , item : object ) => void ;
90
+ onSendCallback ?: ( isUncaught : boolean , args : LogArgument [ ] , item : Dictionary ) => void ;
90
91
overwriteScrubFields ?: boolean ;
91
92
payload ?: Payload ;
92
93
reportLevel ?: Level ;
@@ -101,23 +102,23 @@ declare namespace Rollbar {
101
102
stackTraceLimit ?: number ;
102
103
telemetryScrubber ?: TelemetryScrubber ;
103
104
timeout ?: number ;
104
- transform ?: ( data : object , item : object ) => void | Promise < void > ;
105
+ transform ?: ( data : Dictionary , item : Dictionary ) => void | Promise < void > ;
105
106
transmit ?: boolean ;
106
107
uncaughtErrorLevel ?: Level ;
107
108
verbose ?: boolean ;
108
109
version ?: string ;
109
110
wrapGlobalEventHandlers ?: boolean ;
110
111
}
111
112
export type Callback < TResponse = any > = ( err : MaybeError , response : TResponse ) => void ;
112
- export type LogArgument = string | Error | object | Callback | Date | any [ ] | undefined ;
113
+ export type LogArgument = string | Error | object | Dictionary | Callback | Date | any [ ] | undefined ;
113
114
export interface LogResult {
114
115
uuid : string ;
115
116
}
116
117
export interface TelemetryEvent {
117
118
level : Level ;
118
119
type : string ;
119
120
timestamp_ms : number ;
120
- body : object ;
121
+ body : Dictionary ;
121
122
source : string ;
122
123
uuid ?: string ;
123
124
}
0 commit comments