Skip to content

Commit 05ab35b

Browse files
committed
update initAndBind
1 parent 054ef07 commit 05ab35b

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

packages/core/src/sdk.ts

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,11 @@
11
import { getCurrentHub } from '@sentry/hub';
2-
import { Client, Options, Transport } from '@sentry/types';
2+
import { Client, NewTransport, Options } from '@sentry/types';
33
import { logger } from '@sentry/utils';
44

55
import { IS_DEBUG_BUILD } from './flags';
6-
import { NewTransport } from './transports/base';
76

87
/** 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;
149

1510
/**
1611
* 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 (
2217
export function initAndBind<F extends Client, O extends Options>(
2318
clientClass: ClientClass<F, O>,
2419
options: O,
25-
transport: Transport,
26-
newTransport?: NewTransport,
20+
transport: NewTransport,
2721
): void {
2822
if (options.debug === true) {
2923
if (IS_DEBUG_BUILD) {
@@ -40,6 +34,6 @@ export function initAndBind<F extends Client, O extends Options>(
4034
scope.update(options.initialScope);
4135
}
4236

43-
const client = new clientClass(options, transport, newTransport);
37+
const client = new clientClass(options, transport);
4438
hub.bindClient(client);
4539
}

0 commit comments

Comments
 (0)