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 {
42
42
} from '../flag-evaluation-details-builder' ;
43
43
import { FlagEvaluationError } from '../flag-evaluation-error' ;
44
44
import FetchHttpClient from '../http-client' ;
45
- import { Configuration , IConfiguration , StoreBackedConfiguration } from '../i-configuration' ;
45
+ import { Configuration , IConfiguration } from '../i-configuration' ;
46
46
import {
47
47
BanditModelData ,
48
48
BanditParameters ,
Original file line number Diff line number Diff line change @@ -8,11 +8,12 @@ import { Environment } from '../interfaces';
8
8
* @internal `ConfigurationStore` shall only be used inside Eppo SDKs.
9
9
*/
10
10
export 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 > = [ ] ;
14
13
15
- public constructor ( private configuration : Configuration | null = null ) { }
14
+ public constructor ( configuration : Configuration | null ) {
15
+ this . configuration = configuration ;
16
+ }
16
17
17
18
public getConfiguration ( ) : Configuration | null {
18
19
return this . configuration ;
@@ -30,7 +31,7 @@ export class ConfigurationStore {
30
31
* Returns a function to unsubscribe from future updates.
31
32
*/
32
33
public onConfigurationChange (
33
- listener : ( configuration : Configuration | null ) => void
34
+ listener : ( configuration : Configuration | null ) => void ,
34
35
) : ( ) => void {
35
36
this . listeners . push ( listener ) ;
36
37
@@ -46,7 +47,9 @@ export class ConfigurationStore {
46
47
for ( const listener of this . listeners ) {
47
48
try {
48
49
listener ( this . configuration ) ;
49
- } catch { }
50
+ } catch {
51
+ // ignore
52
+ }
50
53
}
51
54
}
52
55
}
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