1
1
import { getCurrentHub } from '@sentry/hub' ;
2
- import { Client , Options , Transport } from '@sentry/types' ;
2
+ import { Client , NewTransport , Options } from '@sentry/types' ;
3
3
import { logger } from '@sentry/utils' ;
4
4
5
5
import { IS_DEBUG_BUILD } from './flags' ;
6
- import { NewTransport } from './transports/base' ;
7
6
8
7
/** A class object that can instantiate Client objects. */
9
- export type ClientClass < F extends Client , O extends Options > = new (
10
- options : O ,
11
- transport : Transport ,
12
- newTransport ?: NewTransport ,
13
- ) => F ;
8
+ export type ClientClass < F extends Client , O extends Options > = new ( options : O , transport : NewTransport ) => F ;
14
9
15
10
/**
16
11
* Internal function to create a new SDK client instance. The client is
@@ -22,8 +17,7 @@ export type ClientClass<F extends Client, O extends Options> = new (
22
17
export function initAndBind < F extends Client , O extends Options > (
23
18
clientClass : ClientClass < F , O > ,
24
19
options : O ,
25
- transport : Transport ,
26
- newTransport ?: NewTransport ,
20
+ transport : NewTransport ,
27
21
) : void {
28
22
if ( options . debug === true ) {
29
23
if ( IS_DEBUG_BUILD ) {
@@ -40,6 +34,6 @@ export function initAndBind<F extends Client, O extends Options>(
40
34
scope . update ( options . initialScope ) ;
41
35
}
42
36
43
- const client = new clientClass ( options , transport , newTransport ) ;
37
+ const client = new clientClass ( options , transport ) ;
44
38
hub . bindClient ( client ) ;
45
39
}
0 commit comments