config,backend-common: move config subscribe method to the base config interface
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -26,6 +26,17 @@ export type AppConfig = {
|
||||
};
|
||||
|
||||
export type Config = {
|
||||
/**
|
||||
* Subscribes to the configuration object in order to receive a notification
|
||||
* whenever any value within the configuration has changed.
|
||||
*
|
||||
* This method is optional to implement, and consumers need to check if it is
|
||||
* implemented before invoking it.
|
||||
*/
|
||||
subscribe?(onChange: () => void): {
|
||||
unsubscribe: () => void;
|
||||
};
|
||||
|
||||
has(key: string): boolean;
|
||||
|
||||
keys(): string[];
|
||||
|
||||
Reference in New Issue
Block a user