@@ -240,10 +240,11 @@ const b: number = client.listenerCount(splitEvent);
240240let nodeEventEmitter : NodeJS . EventEmitter = client ;
241241
242242// Ready, destroy and flush
243- const readyPromise : Promise < void > = client . ready ( ) ;
244- const destroyPromise : Promise < void > = client . destroy ( ) ;
245- // @ts -ignore
246- const flushPromise : Promise < void > = client . flush ( ) ;
243+ let promise : Promise < void > = client . ready ( ) ;
244+ promise = client . destroy ( ) ;
245+ promise = SDK . destroy ( ) ;
246+ // @TODO not public yet
247+ // promise = client.flush();
247248
248249// We can call getTreatment with or without a key.
249250treatment = client . getTreatment ( splitKey , 'mySplit' ) ;
@@ -332,10 +333,11 @@ const b1: number = asyncClient.listenerCount(splitEvent);
332333nodeEventEmitter = asyncClient ;
333334
334335// Ready, destroy and flush (same as for sync client, just for interface checking)
335- const readyPromise1 : Promise < void > = asyncClient . ready ( ) ;
336- asyncClient . destroy ( ) ;
337- // @ts -ignore
338- asyncClient . flush ( ) ;
336+ promise = asyncClient . ready ( ) ;
337+ promise = asyncClient . destroy ( ) ;
338+ promise = AsyncSDK . destroy ( ) ;
339+ // @TODO not public yet
340+ // promise = asyncClient.flush();
339341
340342// We can call getTreatment but always with a key.
341343asyncTreatment = asyncClient . getTreatment ( splitKey , 'mySplit' ) ;
@@ -391,7 +393,7 @@ splitView = manager.split('mySplit');
391393splitViews = manager . splits ( ) ;
392394
393395// Manager implements ready promise.
394- const managerReadyPromise : Promise < void > = manager . ready ( ) ;
396+ promise = manager . ready ( ) ;
395397
396398// Manager implements methods from NodeJS.Events. Testing a few.
397399manager = manager . on ( splitEvent , ( ) => { } ) ;
@@ -415,7 +417,7 @@ splitViewAsync = asyncManager.split('mySplit');
415417splitViewsAsync = asyncManager . splits ( ) ;
416418
417419// asyncManager implements ready promise.
418- const asyncManagerReadyPromise : Promise < void > = asyncManager . ready ( ) ;
420+ promise = asyncManager . ready ( ) ;
419421
420422// asyncManager implements methods from NodeJS.Events. Testing a few.
421423asyncManager = asyncManager . on ( splitEvent , ( ) => { } ) ;
0 commit comments