@@ -5,9 +5,9 @@ import { CaptureContext } from './scope';
55import { SdkMetadata } from './sdkmetadata' ;
66import { StackLineParser , StackParser } from './stacktrace' ;
77import { SamplingContext } from './transaction' ;
8- import { Transport , TransportClass , TransportOptions } from './transport' ;
8+ import { BaseTransportOptions , NewTransport } from './transport' ;
99
10- export interface ClientOptions {
10+ export interface ClientOptions < TO extends BaseTransportOptions > {
1111 /**
1212 * Enable debug functionality in the SDK itself
1313 */
@@ -61,7 +61,7 @@ export interface ClientOptions {
6161 /**
6262 * Transport object that should be used to send events to Sentry
6363 */
64- transport : TransportClass < Transport > ;
64+ transport : ( transportOptions : TO ) => NewTransport ;
6565
6666 /**
6767 * A stack parser implementation
@@ -72,7 +72,7 @@ export interface ClientOptions {
7272 /**
7373 * Options for the default transport that the SDK uses.
7474 */
75- transportOptions ?: TransportOptions ;
75+ transportOptions ?: TO ;
7676
7777 /**
7878 * Sample rate to determine trace sampling.
@@ -202,7 +202,8 @@ export interface ClientOptions {
202202}
203203
204204/** Base configuration options for every SDK. */
205- export interface Options extends Omit < Partial < ClientOptions > , 'integrations' | 'transport' | 'stackParser' > {
205+ export interface Options < TO extends BaseTransportOptions = BaseTransportOptions >
206+ extends Omit < Partial < ClientOptions < TO > > , 'integrations' | 'transport' | 'stackParser' > {
206207 /**
207208 * If this is set to false, default integrations will not be added, otherwise this will internally be set to the
208209 * recommended default integrations.
@@ -220,7 +221,7 @@ export interface Options extends Omit<Partial<ClientOptions>, 'integrations' | '
220221 /**
221222 * Transport object that should be used to send events to Sentry
222223 */
223- transport ?: TransportClass < Transport > ;
224+ transport ?: ( transportOptions : TO ) => NewTransport ;
224225
225226 /**
226227 * A stack parser implementation or an array of stack line parsers
0 commit comments