Skip to content

Commit

Permalink
refactor: Make set and make user context private
Browse files Browse the repository at this point in the history
  • Loading branch information
mikechu-optimizely committed Jan 12, 2024
1 parent d8d681c commit 58d47c8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -183,10 +183,6 @@ export interface ReactSDKClient extends Omit<optimizely.Client, 'createUserConte

getUserContext(): optimizely.OptimizelyUserContext | null;

setCurrentUserContext(userInfo: UserInfo): void;

makeUserContextInstance(userInfo: UserInfo): optimizely.OptimizelyUserContext | null;

getVuid(): string | undefined;
}

Expand Down Expand Up @@ -323,7 +319,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
return this.userContext;
}

public setCurrentUserContext(userInfo: UserInfo): void {
private setCurrentUserContext(userInfo: UserInfo): void {
if (!this._client) {
logger.warn(`Unable to set user context for user ID ${userInfo.id}. Optimizely client not initialized.`);
return;
Expand All @@ -334,7 +330,7 @@ class OptimizelyReactSDKClient implements ReactSDKClient {
}
}

public makeUserContextInstance(userInfo: UserInfo): optimizely.OptimizelyUserContext | null {
private makeUserContextInstance(userInfo: UserInfo): optimizely.OptimizelyUserContext | null {
if (!this._client || !this.isReady()) {
logger.warn(
`Unable to create user context for ${userInfo.id}. Optimizely client failed to initialize or not ready.`
Expand Down

0 comments on commit 58d47c8

Please sign in to comment.