Skip to content

Commit ffc15f2

Browse files
committed
fix deprecation issues
1 parent ea98579 commit ffc15f2

File tree

3 files changed

+6
-3
lines changed

3 files changed

+6
-3
lines changed

packages/browser/src/client.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,6 @@ export class BrowserClient extends Client<BrowserClientOptions> {
130130

131131
// Flush logs and metrics when page becomes hidden (e.g., tab switch, navigation)
132132
// todo(v11): Remove the experimental flag
133-
// eslint-disable-next-line deprecation/deprecation
134133
if (WINDOW.document && (sendClientReports || enableLogs || enableMetrics)) {
135134
WINDOW.document.addEventListener('visibilitychange', () => {
136135
if (WINDOW.document.visibilityState === 'hidden') {

packages/browser/src/profiling/integration.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ const _browserProfilingIntegration = (() => {
3232
options.profileLifecycle = 'manual';
3333
}
3434

35+
// eslint-disable-next-line deprecation/deprecation
3536
if (hasLegacyProfiling(options) && !options.profilesSampleRate) {
3637
DEBUG_BUILD && debug.log('[Profiling] Profiling disabled, no profiling options found.');
3738
return;

packages/browser/src/profiling/utils.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -651,8 +651,10 @@ export function shouldProfileSpanLegacy(span: Span): boolean {
651651
return false;
652652
}
653653

654-
// @ts-expect-error profilesSampleRate is not part of the browser options yet
655-
const profilesSampleRate: number | boolean | undefined = options.profilesSampleRate;
654+
// eslint-disable-next-line deprecation/deprecation
655+
const profilesSampleRate = (options as BrowserOptions).profilesSampleRate as
656+
| BrowserOptions['profilesSampleRate']
657+
| boolean;
656658

657659
// Since this is coming from the user (or from a function provided by the user), who knows what we might get. (The
658660
// only valid values are booleans or numbers between 0 and 1.)
@@ -727,6 +729,7 @@ export function shouldProfileSession(options: BrowserOptions): boolean {
727729
* Checks if legacy profiling is configured.
728730
*/
729731
export function hasLegacyProfiling(options: BrowserOptions): boolean {
732+
// eslint-disable-next-line deprecation/deprecation
730733
return typeof options.profilesSampleRate !== 'undefined';
731734
}
732735

0 commit comments

Comments
 (0)