@@ -5,9 +5,9 @@ import { CaptureContext } from './scope';
5
5
import { SdkMetadata } from './sdkmetadata' ;
6
6
import { StackLineParser , StackParser } from './stacktrace' ;
7
7
import { SamplingContext } from './transaction' ;
8
- import { Transport , TransportClass , TransportOptions } from './transport' ;
8
+ import { BaseTransportOptions , NewTransport } from './transport' ;
9
9
10
- export interface ClientOptions {
10
+ export interface ClientOptions < TO extends BaseTransportOptions > {
11
11
/**
12
12
* Enable debug functionality in the SDK itself
13
13
*/
@@ -61,7 +61,7 @@ export interface ClientOptions {
61
61
/**
62
62
* Transport object that should be used to send events to Sentry
63
63
*/
64
- transport : TransportClass < Transport > ;
64
+ transport : ( transportOptions : TO ) => NewTransport ;
65
65
66
66
/**
67
67
* A stack parser implementation
@@ -72,7 +72,7 @@ export interface ClientOptions {
72
72
/**
73
73
* Options for the default transport that the SDK uses.
74
74
*/
75
- transportOptions ?: TransportOptions ;
75
+ transportOptions ?: TO ;
76
76
77
77
/**
78
78
* Sample rate to determine trace sampling.
@@ -202,7 +202,8 @@ export interface ClientOptions {
202
202
}
203
203
204
204
/** 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' > {
206
207
/**
207
208
* If this is set to false, default integrations will not be added, otherwise this will internally be set to the
208
209
* recommended default integrations.
@@ -220,7 +221,7 @@ export interface Options extends Omit<Partial<ClientOptions>, 'integrations' | '
220
221
/**
221
222
* Transport object that should be used to send events to Sentry
222
223
*/
223
- transport ?: TransportClass < Transport > ;
224
+ transport ?: ( transportOptions : TO ) => NewTransport ;
224
225
225
226
/**
226
227
* A stack parser implementation or an array of stack line parsers
0 commit comments