Skip to content

Commit

Permalink
stricter types
Browse files Browse the repository at this point in the history
  • Loading branch information
billyvg committed Jun 1, 2023
1 parent 3ad8b3d commit e995437
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions packages/replay/src/replay.ts
@@ -1,7 +1,7 @@
/* eslint-disable max-lines */ // TODO: We might want to split this file up
import { EventType, record } from '@sentry-internal/rrweb';
import { captureException, getCurrentHub } from '@sentry/core';
import type { Breadcrumb, ReplayRecordingMode } from '@sentry/types';
import type { ReplayRecordingMode } from '@sentry/types';
import { logger } from '@sentry/utils';

import {
Expand All @@ -21,6 +21,7 @@ import type {
AddEventResult,
AddUpdateCallback,
AllPerformanceEntry,
BreadcrumbFrame,
EventBuffer,
InternalEventContext,
PopEventContext,
Expand Down Expand Up @@ -777,7 +778,7 @@ export class ReplayContainer implements ReplayContainerInterface {
/**
* Tasks to run when we consider a page to be hidden (via blurring and/or visibility)
*/
private _doChangeToBackgroundTasks(breadcrumb?: Breadcrumb): void {
private _doChangeToBackgroundTasks(breadcrumb?: BreadcrumbFrame): void {
if (!this.session) {
return;
}
Expand All @@ -797,7 +798,7 @@ export class ReplayContainer implements ReplayContainerInterface {
/**
* Tasks to run when we consider a page to be visible (via focus and/or visibility)
*/
private _doChangeToForegroundTasks(breadcrumb?: Breadcrumb): void {
private _doChangeToForegroundTasks(breadcrumb?: BreadcrumbFrame): void {
if (!this.session) {
return;
}
Expand Down Expand Up @@ -850,7 +851,7 @@ export class ReplayContainer implements ReplayContainerInterface {
/**
* Helper to create (and buffer) a replay breadcrumb from a core SDK breadcrumb
*/
private _createCustomBreadcrumb(breadcrumb: Breadcrumb): void {
private _createCustomBreadcrumb(breadcrumb: BreadcrumbFrame): void {
this.addUpdate(() => {
void this.throttledAddEvent({
type: EventType.Custom,
Expand Down

0 comments on commit e995437

Please sign in to comment.