Skip to content

Commit 641ce9e

Browse files
committed
chore: tsc fixes
1 parent 787aae6 commit 641ce9e

File tree

2 files changed

+5
-6
lines changed

2 files changed

+5
-6
lines changed

src/wrapper.android.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -692,12 +692,11 @@ export namespace NATIVE {
692692
);
693693
config.setBeforeBreadcrumb(
694694
new io.sentry.SentryOptions.BeforeBreadcrumbCallback({
695-
execute(event, hint) {
695+
execute(breadcrumb: io.sentry.Breadcrumb, hint: io.sentry.Hint) {
696696
if (options.beforeBreadcrumb) {
697-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion
698-
return options.beforeBreadcrumb(event, hint);
697+
return options.beforeBreadcrumb(breadcrumb as any, hint) as any;
699698
} else {
700-
return event;
699+
return breadcrumb;
701700
}
702701
}
703702
})

src/wrapper.ios.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export namespace NATIVE {
370370
if (beforeBreadcrumb) {
371371
const deserialized = dictToJSON(breadcrumb.serialize());
372372
const processed = beforeBreadcrumb(deserialized, null);
373-
const serialized = dataSerialize(processed);
373+
const serialized = dataSerialize(processed) as NSDictionary<string, any>;
374374
const levels = ['log', 'debug', 'info', 'warning', 'error', 'fatal'];
375375

376376
if (processed) {
@@ -382,7 +382,7 @@ export namespace NATIVE {
382382
}
383383
}
384384
return breadcrumb;
385-
}
385+
};
386386
if (toPassOptions.hasOwnProperty('enableNativeCrashHandling')) {
387387
if (!toPassOptions.enableNativeCrashHandling) {
388388
const integrations = nSentryOptions.integrations.mutableCopy();

0 commit comments

Comments
 (0)