@@ -458,19 +458,34 @@ interface IClientSideSyncSharedSettings extends IClientSideSharedSettings, ISync
458458 */
459459declare namespace SplitIO {
460460
461- interface StorageWrapper {
461+ interface SyncStorageWrapper {
462462 /**
463- * Returns a promise that resolves to the current value associated with the given key, or null if the given key does not exist.
463+ * Returns the value associated with the given key, or null if the key does not exist.
464464 */
465- getItem ( key : string ) : Promise < string | null > | string | null ;
465+ getItem ( key : string ) : string | null ;
466466 /**
467- * Returns a promise that resolves when the value of the pair identified by key is set to value , creating a new key/value pair if none existed for key previously .
467+ * Sets the value for the given key, creating a new key/value pair if key does not exist .
468468 */
469- setItem ( key : string , value : string ) : Promise < void > | void ;
469+ setItem ( key : string , value : string ) : void ;
470470 /**
471- * Returns a promise that resolves when the key/value pair with the given key is removed , if a key/value pair with the given key exists.
471+ * Removes the key/value pair for the given key, if the key exists.
472472 */
473- removeItem ( key : string ) : Promise < void > | void ;
473+ removeItem ( key : string ) : void ;
474+ }
475+
476+ interface AsyncStorageWrapper {
477+ /**
478+ * Returns a promise that resolves to the value associated with the given key, or null if the key does not exist.
479+ */
480+ getItem ( key : string ) : Promise < string | null > ;
481+ /**
482+ * Returns a promise that resolves when the value of the pair identified by key is set to value, creating a new key/value pair if key does not exist.
483+ */
484+ setItem ( key : string , value : string ) : Promise < void > ;
485+ /**
486+ * Returns a promise that resolves when the key/value pair for the given key is removed, if the key exists.
487+ */
488+ removeItem ( key : string ) : Promise < void > ;
474489 }
475490
476491 /**
@@ -992,7 +1007,7 @@ declare namespace SplitIO {
9921007 *
9931008 * @defaultValue `window.localStorage`
9941009 */
995- wrapper ?: StorageWrapper ;
1010+ wrapper ?: SyncStorageWrapper | AsyncStorageWrapper ;
9961011 }
9971012 /**
9981013 * Storage for asynchronous (consumer) SDK.
@@ -1338,7 +1353,7 @@ declare namespace SplitIO {
13381353 *
13391354 * @defaultValue `window.localStorage`
13401355 */
1341- wrapper ?: StorageWrapper ;
1356+ wrapper ?: SyncStorageWrapper | AsyncStorageWrapper ;
13421357 } ;
13431358 }
13441359 /**
0 commit comments