UNPKG

1.84 kBTypeScriptView Raw
1import type { Scope } from '@sentry/core';
2import { BaseClient } from '@sentry/core';
3import type { BrowserClientReplayOptions, ClientOptions, Event, EventHint, Options, Severity, SeverityLevel, UserFeedback } from '@sentry/types';
4import type { BrowserTransportOptions } from './transports/types';
5/**
6 * Configuration options for the Sentry Browser SDK.
7 * @see @sentry/types Options for more information.
8 */
9export declare type BrowserOptions = Options<BrowserTransportOptions> & BrowserClientReplayOptions;
10/**
11 * Configuration options for the Sentry Browser SDK Client class
12 * @see BrowserClient for more information.
13 */
14export declare type BrowserClientOptions = ClientOptions<BrowserTransportOptions>;
15/**
16 * The Sentry Browser SDK Client.
17 *
18 * @see BrowserOptions for documentation on configuration options.
19 * @see SentryClient for usage documentation.
20 */
21export declare class BrowserClient extends BaseClient<BrowserClientOptions> {
22 /**
23 * Creates a new Browser SDK instance.
24 *
25 * @param options Configuration options for this SDK.
26 */
27 constructor(options: BrowserClientOptions);
28 /**
29 * @inheritDoc
30 */
31 eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
32 /**
33 * @inheritDoc
34 */
35 eventFromMessage(message: string, level?: Severity | SeverityLevel, hint?: EventHint): PromiseLike<Event>;
36 /**
37 * @inheritDoc
38 */
39 sendEvent(event: Event, hint?: EventHint): void;
40 /**
41 * Sends user feedback to Sentry.
42 */
43 captureUserFeedback(feedback: UserFeedback): void;
44 /**
45 * @inheritDoc
46 */
47 protected _prepareEvent(event: Event, hint: EventHint, scope?: Scope): PromiseLike<Event | null>;
48 /**
49 * Sends client reports as an envelope.
50 */
51 private _flushOutcomes;
52}
53//# sourceMappingURL=client.d.ts.map
\No newline at end of file