Skip to content

Commit

Permalink
Add builder method to add a configuration store. (#67)
Browse files Browse the repository at this point in the history
  • Loading branch information
leoromanovsky authored May 17, 2024
1 parent 26c468b commit 5173c69
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@eppo/js-client-sdk-common",
"version": "3.0.7",
"version": "3.0.8",
"description": "Eppo SDK for client-side JavaScript applications (base for both web and react native)",
"main": "dist/index.js",
"files": [
Expand Down
6 changes: 6 additions & 0 deletions src/client/eppo-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ export interface IEppoClient {
configurationRequestParameters: FlagConfigurationRequestParameters,
): void;

setConfigurationStore(configurationStore: IConfigurationStore<Flag | ObfuscatedFlag>): void;

fetchFlagConfigurations(): void;

stopPolling(): void;
Expand Down Expand Up @@ -140,6 +142,10 @@ export default class EppoClient implements IEppoClient {
this.configurationRequestParameters = configurationRequestParameters;
}

public setConfigurationStore(configurationStore: IConfigurationStore<Flag | ObfuscatedFlag>) {
this.configurationStore = configurationStore;
}

public async fetchFlagConfigurations() {
if (!this.configurationRequestParameters) {
throw new Error(
Expand Down

0 comments on commit 5173c69

Please sign in to comment.