Skip to content

Commit fd448a6

Browse files
committed
inline flush options
1 parent 061ead9 commit fd448a6

File tree

2 files changed

+10
-11
lines changed

2 files changed

+10
-11
lines changed

packages/replay/src/replay.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,6 @@ import type {
2020
RecordingOptions,
2121
ReplayContainer as ReplayContainerInterface,
2222
ReplayExperimentalPluginOptions,
23-
ReplayFlushOptions,
2423
ReplayPluginOptions,
2524
Session,
2625
Timeouts,
@@ -801,7 +800,16 @@ export class ReplayContainer implements ReplayContainerInterface {
801800
* Flush recording data to Sentry. Creates a lock so that only a single flush
802801
* can be active at a time. Do not call this directly.
803802
*/
804-
private _flush = async ({ force = false }: ReplayFlushOptions = {}): Promise<void> => {
803+
private _flush = async ({
804+
force = false,
805+
}: {
806+
/**
807+
* If true, flush while ignoring the `_isEnabled` state of
808+
* Replay integration. (By default, flush is noop if integration
809+
* is stopped).
810+
*/
811+
force?: boolean;
812+
} = {}): Promise<void> => {
805813
if (!this._isEnabled && !force) {
806814
// This can happen if e.g. the replay was stopped because of exceeding the retry limit
807815
return;

packages/replay/src/types.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -474,15 +474,6 @@ export interface ReplayContainer {
474474
setInitialState(): void;
475475
}
476476

477-
export interface ReplayFlushOptions {
478-
/**
479-
* If true, flush while ignoring the `_isEnabled` state of
480-
* Replay integration. (By default, flush is noop if integration
481-
* is stopped).
482-
*/
483-
force?: boolean;
484-
}
485-
486477
export interface ReplayPerformanceEntry<T> {
487478
/**
488479
* One of these types https://developer.mozilla.org/en-US/docs/Web/API/PerformanceEntry/entryType

0 commit comments

Comments
 (0)