File tree Expand file tree Collapse file tree 3 files changed +11
-8
lines changed
Expand file tree Collapse file tree 3 files changed +11
-8
lines changed Original file line number Diff line number Diff line change @@ -42,7 +42,7 @@ import {
4242} from '../flag-evaluation-details-builder' ;
4343import { FlagEvaluationError } from '../flag-evaluation-error' ;
4444import FetchHttpClient from '../http-client' ;
45- import { Configuration , IConfiguration , StoreBackedConfiguration } from '../i-configuration' ;
45+ import { Configuration , IConfiguration } from '../i-configuration' ;
4646import {
4747 BanditModelData ,
4848 BanditParameters ,
Original file line number Diff line number Diff line change @@ -8,11 +8,12 @@ import { Environment } from '../interfaces';
88 * @internal `ConfigurationStore` shall only be used inside Eppo SDKs.
99 */
1010export class ConfigurationStore {
11- private readonly listeners : Array <
12- ( configuration : Configuration | null ) => void
13- > = [ ] ;
11+ private configuration : Configuration | null ;
12+ private readonly listeners : Array < ( configuration : Configuration | null ) => void > = [ ] ;
1413
15- public constructor ( private configuration : Configuration | null = null ) { }
14+ public constructor ( configuration : Configuration | null ) {
15+ this . configuration = configuration ;
16+ }
1617
1718 public getConfiguration ( ) : Configuration | null {
1819 return this . configuration ;
@@ -30,7 +31,7 @@ export class ConfigurationStore {
3031 * Returns a function to unsubscribe from future updates.
3132 */
3233 public onConfigurationChange (
33- listener : ( configuration : Configuration | null ) => void
34+ listener : ( configuration : Configuration | null ) => void ,
3435 ) : ( ) => void {
3536 this . listeners . push ( listener ) ;
3637
@@ -46,7 +47,9 @@ export class ConfigurationStore {
4647 for ( const listener of this . listeners ) {
4748 try {
4849 listener ( this . configuration ) ;
49- } catch { }
50+ } catch {
51+ // ignore
52+ }
5053 }
5154 }
5255}
Original file line number Diff line number Diff line change 1- export { ConfigurationStore } from " ./configuration-store" ;
1+ export { ConfigurationStore } from ' ./configuration-store' ;
You can’t perform that action at this time.
0 commit comments