@@ -12,88 +12,88 @@ export interface Options {
12
12
/**
13
13
* Enable debug functionality in the SDK itself
14
14
*/
15
- debug ?: boolean ;
15
+ debug ?: boolean | undefined ;
16
16
17
17
/**
18
18
* Specifies whether this SDK should activate and send events to Sentry.
19
19
* Disabling the SDK reduces all overhead from instrumentation, collecting
20
20
* breadcrumbs and capturing events. Defaults to true.
21
21
*/
22
- enabled ?: boolean ;
22
+ enabled ?: boolean | undefined ;
23
23
24
24
/**
25
25
* The Dsn used to connect to Sentry and identify the project. If omitted, the
26
26
* SDK will not send any data to Sentry.
27
27
*/
28
- dsn ?: string ;
28
+ dsn ?: string | undefined ;
29
29
30
30
/**
31
31
* If this is set to false, default integrations will not be added, otherwise this will internally be set to the
32
32
* recommended default integrations.
33
33
* TODO: We should consider changing this to `boolean | Integration[]`
34
34
*/
35
- defaultIntegrations ?: false | Integration [ ] ;
35
+ defaultIntegrations ?: false | Integration [ ] | undefined ;
36
36
37
37
/**
38
38
* List of integrations that should be installed after SDK was initialized.
39
39
* Accepts either a list of integrations or a function that receives
40
40
* default integrations and returns a new, updated list.
41
41
*/
42
- integrations ?: Integration [ ] | ( ( integrations : Integration [ ] ) => Integration [ ] ) ;
42
+ integrations ?: Integration [ ] | ( ( integrations : Integration [ ] ) => Integration [ ] ) | undefined ;
43
43
44
44
/**
45
45
* A pattern for error messages which should not be sent to Sentry.
46
46
* By default, all errors will be sent.
47
47
*/
48
- ignoreErrors ?: Array < string | RegExp > ;
48
+ ignoreErrors ?: Array < string | RegExp > | undefined ;
49
49
50
50
/**
51
51
* Transport object that should be used to send events to Sentry
52
52
*/
53
- transport ?: TransportClass < Transport > ;
53
+ transport ?: TransportClass < Transport > | undefined ;
54
54
55
55
/**
56
56
* Options for the default transport that the SDK uses.
57
57
*/
58
- transportOptions ?: TransportOptions ;
58
+ transportOptions ?: TransportOptions | undefined ;
59
59
60
60
/**
61
61
* A URL to an envelope tunnel endpoint. An envelope tunnel is an HTTP endpoint
62
62
* that accepts Sentry envelopes for forwarding. This can be used to force data
63
63
* through a custom server independent of the type of data.
64
64
*/
65
- tunnel ?: string ;
65
+ tunnel ?: string | undefined ;
66
66
67
67
/**
68
68
* The release identifier used when uploading respective source maps. Specify
69
69
* this value to allow Sentry to resolve the correct source maps when
70
70
* processing events.
71
71
*/
72
- release ?: string ;
72
+ release ?: string | undefined ;
73
73
74
74
/** The current environment of your application (e.g. "production"). */
75
- environment ?: string ;
75
+ environment ?: string | undefined ;
76
76
77
77
/** Sets the distribution for all events */
78
- dist ?: string ;
78
+ dist ?: string | undefined ;
79
79
80
80
/**
81
81
* The maximum number of breadcrumbs sent with events. Defaults to 100.
82
82
* Values over 100 will be ignored and 100 used instead.
83
83
*/
84
- maxBreadcrumbs ?: number ;
84
+ maxBreadcrumbs ?: number | undefined ;
85
85
86
86
/** Console logging verbosity for the SDK Client. */
87
- logLevel ?: LogLevel ;
87
+ logLevel ?: LogLevel | undefined ;
88
88
89
89
/** A global sample rate to apply to all events (0 - 1). */
90
- sampleRate ?: number ;
90
+ sampleRate ?: number | undefined ;
91
91
92
92
/** Attaches stacktraces to pure capture message / log integrations */
93
- attachStacktrace ?: boolean ;
93
+ attachStacktrace ?: boolean | undefined ;
94
94
95
95
/** Maxium number of chars a single value can have before it will be truncated. */
96
- maxValueLength ?: number ;
96
+ maxValueLength ?: number | undefined ;
97
97
98
98
/**
99
99
* Maximum number of levels that normalization algorithm will traverse in objects and arrays.
@@ -104,7 +104,7 @@ export interface Options {
104
104
* - `extra`
105
105
* Defaults to `3`. Set to `0` to disable.
106
106
*/
107
- normalizeDepth ?: number ;
107
+ normalizeDepth ?: number | undefined ;
108
108
109
109
/**
110
110
* Controls how many milliseconds to wait before shutting down. The default is
@@ -113,7 +113,7 @@ export interface Options {
113
113
* high can cause the application to block for users with network connectivity
114
114
* problems.
115
115
*/
116
- shutdownTimeout ?: number ;
116
+ shutdownTimeout ?: number | undefined ;
117
117
118
118
/**
119
119
* Sample rate to determine trace sampling.
@@ -124,31 +124,33 @@ export interface Options {
124
124
* Tracing is enabled if either this or `tracesSampler` is defined. If both are defined, `tracesSampleRate` is
125
125
* ignored.
126
126
*/
127
- tracesSampleRate ?: number ;
127
+ tracesSampleRate ?: number | undefined ;
128
128
129
129
/**
130
130
* A flag enabling Sessions Tracking feature.
131
131
* By default, Sessions Tracking is enabled.
132
132
*/
133
- autoSessionTracking ?: boolean ;
133
+ autoSessionTracking ?: boolean | undefined ;
134
134
135
135
/**
136
136
* Initial data to populate scope.
137
137
*/
138
- initialScope ?: CaptureContext ;
138
+ initialScope ?: CaptureContext | undefined ;
139
139
140
140
/**
141
141
* Set of metadata about the SDK that can be internally used to enhance envelopes and events,
142
142
* and provide additional data about every request.
143
143
* */
144
- _metadata ?: SdkMetadata ;
144
+ _metadata ?: SdkMetadata | undefined ;
145
145
146
146
/**
147
147
* Options which are in beta, or otherwise not guaranteed to be stable.
148
148
*/
149
- _experiments ?: {
150
- [ key : string ] : any ;
151
- } ;
149
+ _experiments ?:
150
+ | {
151
+ [ key : string ] : any ;
152
+ }
153
+ | undefined ;
152
154
153
155
/**
154
156
* Function to compute tracing sample rate dynamically and filter unwanted traces.
@@ -162,7 +164,7 @@ export interface Options {
162
164
* @returns A sample rate between 0 and 1 (0 drops the trace, 1 guarantees it will be sent). Returning `true` is
163
165
* equivalent to returning 1 and returning `false` is equivalent to returning 0.
164
166
*/
165
- tracesSampler ?( samplingContext : SamplingContext ) : number | boolean ;
167
+ tracesSampler ?: undefined | ( ( samplingContext : SamplingContext ) => number | boolean ) ;
166
168
167
169
/**
168
170
* A callback invoked during event submission, allowing to optionally modify
@@ -176,7 +178,7 @@ export interface Options {
176
178
* @param hint May contain additional information about the original exception.
177
179
* @returns A new event that will be sent | null.
178
180
*/
179
- beforeSend ?( event : Event , hint ?: EventHint ) : PromiseLike < Event | null > | Event | null ;
181
+ beforeSend ?: undefined | ( ( event : Event , hint ?: EventHint ) => PromiseLike < Event | null > | Event | null ) ;
180
182
181
183
/**
182
184
* A callback invoked when adding a breadcrumb, allowing to optionally modify
@@ -189,5 +191,5 @@ export interface Options {
189
191
* @param breadcrumb The breadcrumb as created by the SDK.
190
192
* @returns The breadcrumb that will be added | null.
191
193
*/
192
- beforeBreadcrumb ?( breadcrumb : Breadcrumb , hint ?: BreadcrumbHint ) : Breadcrumb | null ;
194
+ beforeBreadcrumb ?: undefined | ( ( breadcrumb : Breadcrumb , hint ?: BreadcrumbHint ) => Breadcrumb | null ) ;
193
195
}
0 commit comments