1
- import { IConfiguration } from '../i-configuration' ;
1
+ import { Configuration } from '../i-configuration' ;
2
2
import { Environment } from '../interfaces' ;
3
3
4
4
/**
@@ -9,17 +9,16 @@ import { Environment } from '../interfaces';
9
9
*/
10
10
export class ConfigurationStore {
11
11
private readonly listeners : Array <
12
- ( configuration : IConfiguration | null ) => void
12
+ ( configuration : Configuration | null ) => void
13
13
> = [ ] ;
14
14
15
- // TODO: replace IConfiguration with a concrete `Configuration` type.
16
- public constructor ( private configuration : IConfiguration | null = null ) { }
15
+ public constructor ( private configuration : Configuration | null = null ) { }
17
16
18
- public getConfiguration ( ) : IConfiguration | null {
17
+ public getConfiguration ( ) : Configuration | null {
19
18
return this . configuration ;
20
19
}
21
20
22
- public setConfiguration ( configuration : IConfiguration | null ) : void {
21
+ public setConfiguration ( configuration : Configuration | null ) : void {
23
22
this . configuration = configuration ;
24
23
this . notifyListeners ( ) ;
25
24
}
@@ -31,7 +30,7 @@ export class ConfigurationStore {
31
30
* Returns a function to unsubscribe from future updates.
32
31
*/
33
32
public onConfigurationChange (
34
- listener : ( configuration : IConfiguration | null ) => void
33
+ listener : ( configuration : Configuration | null ) => void
35
34
) : ( ) => void {
36
35
this . listeners . push ( listener ) ;
37
36
0 commit comments