diff --git a/CHANGES.txt b/CHANGES.txt index 1453141e9..0fb91f911 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,4 +1,5 @@ 10.29.0 (September XX, 2024) + - Added `factory.destroy()` method, which invokes the `destroy` method on all SDK clients created by the factory. - Updated @splitsoftware/splitio-commons package to version 1.18.0 that includes minor updates: - Added support for targeting rules based on large segments for browsers. - Updated some transitive dependencies for vulnerability fixes. diff --git a/ts-tests/index.ts b/ts-tests/index.ts index a37c52808..7bdc4c834 100644 --- a/ts-tests/index.ts +++ b/ts-tests/index.ts @@ -240,10 +240,11 @@ const b: number = client.listenerCount(splitEvent); let nodeEventEmitter: NodeJS.EventEmitter = client; // Ready, destroy and flush -const readyPromise: Promise = client.ready(); -const destroyPromise: Promise = client.destroy(); -// @ts-ignore -const flushPromise: Promise = client.flush(); +let promise: Promise = client.ready(); +promise = client.destroy(); +promise = SDK.destroy(); +// @TODO not public yet +// promise = client.flush(); // We can call getTreatment with or without a key. treatment = client.getTreatment(splitKey, 'mySplit'); @@ -332,10 +333,11 @@ const b1: number = asyncClient.listenerCount(splitEvent); nodeEventEmitter = asyncClient; // Ready, destroy and flush (same as for sync client, just for interface checking) -const readyPromise1: Promise = asyncClient.ready(); -asyncClient.destroy(); -// @ts-ignore -asyncClient.flush(); +promise = asyncClient.ready(); +promise = asyncClient.destroy(); +promise = AsyncSDK.destroy(); +// @TODO not public yet +// promise = asyncClient.flush(); // We can call getTreatment but always with a key. asyncTreatment = asyncClient.getTreatment(splitKey, 'mySplit'); @@ -391,7 +393,7 @@ splitView = manager.split('mySplit'); splitViews = manager.splits(); // Manager implements ready promise. -const managerReadyPromise: Promise = manager.ready(); +promise = manager.ready(); // Manager implements methods from NodeJS.Events. Testing a few. manager = manager.on(splitEvent, () => { }); @@ -415,7 +417,7 @@ splitViewAsync = asyncManager.split('mySplit'); splitViewsAsync = asyncManager.splits(); // asyncManager implements ready promise. -const asyncManagerReadyPromise: Promise = asyncManager.ready(); +promise = asyncManager.ready(); // asyncManager implements methods from NodeJS.Events. Testing a few. asyncManager = asyncManager.on(splitEvent, () => { });