Skip to content

Commit 375e993

Browse files
twavvonurtemizkan
authored andcommitted
fix(types): Make Options type method params contravariant (#4234)
1 parent ee3015e commit 375e993

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/types/src/options.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ export interface Options {
167167
* @returns A sample rate between 0 and 1 (0 drops the trace, 1 guarantees it will be sent). Returning `true` is
168168
* equivalent to returning 1 and returning `false` is equivalent to returning 0.
169169
*/
170-
tracesSampler?(samplingContext: SamplingContext): number | boolean;
170+
tracesSampler?: (samplingContext: SamplingContext) => number | boolean;
171171

172172
/**
173173
* A callback invoked during event submission, allowing to optionally modify
@@ -181,7 +181,7 @@ export interface Options {
181181
* @param hint May contain additional information about the original exception.
182182
* @returns A new event that will be sent | null.
183183
*/
184-
beforeSend?(event: Event, hint?: EventHint): PromiseLike<Event | null> | Event | null;
184+
beforeSend?: (event: Event, hint?: EventHint) => PromiseLike<Event | null> | Event | null;
185185

186186
/**
187187
* A callback invoked when adding a breadcrumb, allowing to optionally modify
@@ -194,5 +194,5 @@ export interface Options {
194194
* @param breadcrumb The breadcrumb as created by the SDK.
195195
* @returns The breadcrumb that will be added | null.
196196
*/
197-
beforeBreadcrumb?(breadcrumb: Breadcrumb, hint?: BreadcrumbHint): Breadcrumb | null;
197+
beforeBreadcrumb?: (breadcrumb: Breadcrumb, hint?: BreadcrumbHint) => Breadcrumb | null;
198198
}

0 commit comments

Comments
 (0)