Skip to content

Commit 3e5d640

Browse files
3rd step: move SplitIO namespace definition from JS SDK to JS-Commons and merge
1 parent dabfdab commit 3e5d640

File tree

3 files changed

+5
-4
lines changed

3 files changed

+5
-4
lines changed

CHANGES.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
- Added `factory.destroy()` method, which invokes the `destroy` method of all clients created by the factory.
44
- Updated @splitsoftware/splitio-commons package to version 2.0.0 that includes major updates and updated some transitive dependencies for vulnerability fixes.
55
- BREAKING CHANGES:
6+
- Renamed some TypeScript definitions in the SplitIO namespace to avoid conflicts with other libraries: `SplitIO.IBrowserSettings` to `SplitIO.IClientSideSettings`, `SplitIO.IBrowserAsyncSettings` to `SplitIO.IClientSideAsyncSettings`.
67
- Removed internal ponyfills for the `Map` and `Set` global objects, dropping support for IE and other outdated browsers. The SDK now requires the runtime environment to support these features natively or provide a polyfill.
78
- Removed the deprecated `GoogleAnalyticsToSplit` and `SplitToGoogleAnalytics` pluggable integration modules, along with the related interfaces in the TypeScript definitions.
89
- Removed the `LocalhostFromObject` export from the default import (`import { LocalhostFromObject } from '@splitsoftware/splitio-browserjs'`). It is no longer necessary to manually import and configure it in the `sync.localhostMode` option to enable localhost mode.

ts-tests/index.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -197,8 +197,8 @@ const instantiatedSettingsStartup: { [key: string]: number } = SDK.settings.star
197197
const instantiatedStorage: SplitIO.StorageSync = SDK.settings.storage;
198198
const instantiatedSettingsUrls: { [key: string]: string } = SDK.settings.urls;
199199
const instantiatedSettingsVersion: string = SDK.settings.version;
200-
let instantiatedSettingsFeatures = SDK.settings.features;
201-
// // We should be able to write on features prop. The rest are readonly props.
200+
let instantiatedSettingsFeatures = SDK.settings.features as SplitIO.MockedFeaturesMap;
201+
// We should be able to write on features prop. The rest are readonly props.
202202
instantiatedSettingsFeatures.something = 'something';
203203
SDK.settings.features = { 'split_x': 'on' };
204204

types/index.d.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,8 @@ declare module JsSdk {
1313
* The settings parameter should be an object that complies with the SplitIO.IClientSideSettings or SplitIO.IClientSideAsyncSettings interfaces.
1414
* For more information read the corresponding article: @see {@link https://help.split.io/hc/en-us/articles/360058730852-Browser-SDK#configuration}
1515
*/
16-
export function SplitFactory(config: SplitIO.IClientSideSettings): SplitIO.ISDK;
17-
export function SplitFactory(config: SplitIO.IClientSideAsyncSettings): SplitIO.IAsyncSDK;
16+
export function SplitFactory(settings: SplitIO.IClientSideSettings): SplitIO.ISDK;
17+
export function SplitFactory(settings: SplitIO.IClientSideAsyncSettings): SplitIO.IAsyncSDK;
1818

1919
/**
2020
* Persistent storage based on the LocalStorage Web API for browsers.

0 commit comments

Comments
 (0)