diff --git a/src/index.ts b/src/index.ts index 9185589..00ec097 100644 --- a/src/index.ts +++ b/src/index.ts @@ -12,6 +12,7 @@ import { } from './main'; import { SplitTest } from './splitTest'; import { uiFactory } from './ui'; +import { UserSessionPersister } from './userSessionPersister'; const ui = uiFactory( testsObservable, @@ -47,6 +48,7 @@ export { reset, ui, SplitTest, + UserSessionPersister, }; export default { diff --git a/src/main.ts b/src/main.ts index 773e7ad..dd4be4b 100644 --- a/src/main.ts +++ b/src/main.ts @@ -30,6 +30,9 @@ export function config(userConfig: Partial = {}) { if (userConfig.onVariationChange) { _config.onVariationChange = userConfig.onVariationChange; } + if (userConfig.sessionPersister) { + _config.sessionPersister = userConfig.sessionPersister; + } } /**