@@ -7,13 +7,7 @@ import {
77 Integrations as CoreIntegrations ,
88} from '@sentry/core' ;
99import type { UserFeedback } from '@sentry/types' ;
10- import {
11- addInstrumentationHandler ,
12- logger ,
13- resolvedSyncPromise ,
14- stackParserFromStackParserOptions ,
15- supportsFetch ,
16- } from '@sentry/utils' ;
10+ import { addInstrumentationHandler , logger , stackParserFromStackParserOptions , supportsFetch } from '@sentry/utils' ;
1711
1812import type { BrowserClientOptions , BrowserOptions } from './client' ;
1913import { BrowserClient } from './client' ;
@@ -179,15 +173,6 @@ export function showReportDialog(options: ReportDialogOptions = {}, hub: Hub = g
179173 }
180174}
181175
182- /**
183- * This is the getter for lastEventId.
184- *
185- * @returns The last event id of a captured event.
186- */
187- export function lastEventId ( ) : string | undefined {
188- return getCurrentHub ( ) . lastEventId ( ) ;
189- }
190-
191176/**
192177 * This function is here to be API compatible with the loader.
193178 * @hidden
@@ -204,40 +189,6 @@ export function onLoad(callback: () => void): void {
204189 callback ( ) ;
205190}
206191
207- /**
208- * Call `flush()` on the current client, if there is one. See {@link Client.flush}.
209- *
210- * @param timeout Maximum time in ms the client should wait to flush its event queue. Omitting this parameter will cause
211- * the client to wait until all events are sent before resolving the promise.
212- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
213- * doesn't (or if there's no client defined).
214- */
215- export function flush ( timeout ?: number ) : PromiseLike < boolean > {
216- const client = getCurrentHub ( ) . getClient < BrowserClient > ( ) ;
217- if ( client ) {
218- return client . flush ( timeout ) ;
219- }
220- __DEBUG_BUILD__ && logger . warn ( 'Cannot flush events. No client defined.' ) ;
221- return resolvedSyncPromise ( false ) ;
222- }
223-
224- /**
225- * Call `close()` on the current client, if there is one. See {@link Client.close}.
226- *
227- * @param timeout Maximum time in ms the client should wait to flush its event queue before shutting down. Omitting this
228- * parameter will cause the client to wait until all events are sent before disabling itself.
229- * @returns A promise which resolves to `true` if the queue successfully drains before the timeout, or `false` if it
230- * doesn't (or if there's no client defined).
231- */
232- export function close ( timeout ?: number ) : PromiseLike < boolean > {
233- const client = getCurrentHub ( ) . getClient < BrowserClient > ( ) ;
234- if ( client ) {
235- return client . close ( timeout ) ;
236- }
237- __DEBUG_BUILD__ && logger . warn ( 'Cannot flush events and disable SDK. No client defined.' ) ;
238- return resolvedSyncPromise ( false ) ;
239- }
240-
241192/**
242193 * Wrap code within a try/catch block so the SDK is able to capture errors.
243194 *
0 commit comments