| 51 | * Interface for a configuration source that can provide configuration values. |
| 52 | */ |
| 53 | export interface ConfigSource<Opts = any> { |
| 54 | options: Opts; |
| 55 | |
| 56 | $onInit?(): Promise<void> | void; |
| 57 | |
| 58 | $onDestroy?(): Promise<void> | void; |
| 59 | |
| 60 | /** |
| 61 | * Load configuration from the source. |
| 62 | */ |
| 63 | getAll(): Promise<Record<string, unknown>> | Record<string, unknown>; |
| 64 | |
| 65 | watch?(onChange?: ConfigSourceOnChangeCB): Promise<ConfigSourceWatchCloseCB> | ConfigSourceWatchCloseCB | void | Promise<void>; |
| 66 | } |
| 67 | |
| 68 | export type ConfigurationExtends = (Type<ConfigSource> | ConfigSourceOptions)[]; |
no outgoing calls
no test coverage detected