Skip to content

Commit d58d8e3

Browse files
Bugfixing - Removed an overloaded method in the interface
1 parent 8ba5830 commit d58d8e3

File tree

3 files changed

+5
-13
lines changed

3 files changed

+5
-13
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Updated @splitsoftware/splitio-commons package to version 1.18.0 that includes minor updates:
44
- Added support for targeting rules based on large segments for browsers.
55
- Updated some transitive dependencies for vulnerability fixes.
6+
- Bugfixing - Removed an overloaded `client` method in the `SplitIO.ISDK` interface that accepted a key and trafficType parameters. This interface corresponds to the SDK factory instance in NodeJS, which, unlike `SplitIO.IBrowserSDK` for the Browser, does not handle multiple client instances based on keys or traffic types.
67

78
10.28.0 (September 6, 2024)
89
- Updated @splitsoftware/splitio-commons package to version 1.17.0 that includes minor updates:

ts-tests/index.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -195,15 +195,14 @@ SDK.settings.features = { 'split_x': 'on' }; // Browser
195195

196196
// Client and Manager
197197
client = SDK.client();
198-
client = SDK.client('a customer key');
199-
client = SDK.client('a customer key', 'a traffic type');
200198
manager = SDK.manager();
201199
// Today async clients are only possible on Node. Shared client creation not available here.
202200
asyncClient = AsyncSDK.client();
203201
asyncManager = AsyncSDK.manager();
204202
// Browser client for attributes binding
205203
browserClient = BrowserSDK.client();
206204
browserClient = BrowserSDK.client('a customer key');
205+
browserClient = BrowserSDK.client('a customer key', 'a traffic type');
207206

208207
// Logger
209208
SDK.Logger.enable();

types/splitio.d.ts

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1380,14 +1380,6 @@ declare namespace SplitIO {
13801380
* @returns {IClient} The client instance.
13811381
*/
13821382
client(): IClient,
1383-
/**
1384-
* Returns a shared client of the SDK. For usage on the browser.
1385-
* @function client
1386-
* @param {SplitKey} key The key for the new client instance.
1387-
* @param {string=} trafficType The traffic type of the provided key.
1388-
* @returns {IClient} The client instance.
1389-
*/
1390-
client(key: SplitKey, trafficType?: string): IClient,
13911383
/**
13921384
* Returns a manager instance of the SDK to explore available information.
13931385
* @function manager
@@ -1398,17 +1390,17 @@ declare namespace SplitIO {
13981390
/**
13991391
* This represents the interface for the SDK instance with synchronous storage.
14001392
* @interface IBrowserSDK
1401-
* @extends ISDK
1393+
* @extends IBasicSDK
14021394
*/
1403-
interface IBrowserSDK extends ISDK {
1395+
interface IBrowserSDK extends IBasicSDK {
14041396
/**
14051397
* Returns the default client instance of the SDK.
14061398
* @function client
14071399
* @returns {IBrowserClient} The client instance.
14081400
*/
14091401
client(): IBrowserClient,
14101402
/**
1411-
* Returns a shared client of the SDK. For usage on the browser.
1403+
* Returns a shared client of the SDK.
14121404
* @function client
14131405
* @param {SplitKey} key The key for the new client instance.
14141406
* @param {string=} trafficType The traffic type of the provided key.

0 commit comments

Comments
 (0)