@@ -40,21 +40,22 @@ declare namespace Rollbar {
4040 ) => void | Promise < TResult > ;
4141 export type MaybeError = Error | undefined | null ;
4242 export type Level = "debug" | "info" | "warning" | "error" | "critical" ;
43+ export type Dictionary = { [ key : string ] : unknown } ;
4344 /**
4445 * {@link https://docs.rollbar.com/docs/rollbarjs-configuration-reference#reference }
4546 */
4647 export interface Configuration {
4748 accessToken ?: string ;
4849 addErrorContext ?: boolean ;
49- addRequestData ?: ( data : object , req : object ) => void ;
50+ addRequestData ?: ( data : Dictionary , req : Dictionary ) => void ;
5051 autoInstrument ?: AutoInstrumentOptions ;
5152 captureEmail ?: boolean ;
5253 captureIp ?: boolean | "anonymize" ;
5354 captureLambdaTimeouts ?: boolean ;
5455 captureUncaught ?: boolean ;
5556 captureUnhandledRejections ?: boolean ;
5657 captureUsername ?: boolean ;
57- checkIgnore ?: ( isUncaught : boolean , args : LogArgument [ ] , item : object ) => boolean ;
58+ checkIgnore ?: ( isUncaught : boolean , args : LogArgument [ ] , item : Dictionary ) => boolean ;
5859 /**
5960 * `codeVersion` takes precedence over `code_version`, if provided.
6061 * `client.javascript.code_version` takes precedence over both top level properties.
@@ -86,7 +87,7 @@ declare namespace Rollbar {
8687 maxRetries ?: number ;
8788 maxTelemetryEvents ?: number ;
8889 nodeSourceMaps ?: boolean ;
89- onSendCallback ?: ( isUncaught : boolean , args : LogArgument [ ] , item : object ) => void ;
90+ onSendCallback ?: ( isUncaught : boolean , args : LogArgument [ ] , item : Dictionary ) => void ;
9091 overwriteScrubFields ?: boolean ;
9192 payload ?: Payload ;
9293 reportLevel ?: Level ;
@@ -101,23 +102,23 @@ declare namespace Rollbar {
101102 stackTraceLimit ?: number ;
102103 telemetryScrubber ?: TelemetryScrubber ;
103104 timeout ?: number ;
104- transform ?: ( data : object , item : object ) => void | Promise < void > ;
105+ transform ?: ( data : Dictionary , item : Dictionary ) => void | Promise < void > ;
105106 transmit ?: boolean ;
106107 uncaughtErrorLevel ?: Level ;
107108 verbose ?: boolean ;
108109 version ?: string ;
109110 wrapGlobalEventHandlers ?: boolean ;
110111 }
111112 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 ;
113114 export interface LogResult {
114115 uuid : string ;
115116 }
116117 export interface TelemetryEvent {
117118 level : Level ;
118119 type : string ;
119120 timestamp_ms : number ;
120- body : object ;
121+ body : Dictionary ;
121122 source : string ;
122123 uuid ?: string ;
123124 }
0 commit comments