2018-10-16 14:56:18 +02:00
|
|
|
import Config from "./models/Config"
|
|
|
|
|
2019-01-09 16:15:32 +01:00
|
|
|
/**
|
|
|
|
* Stores the configuration of the library.
|
|
|
|
*/
|
2018-10-16 14:56:18 +02:00
|
|
|
export default class ConfigProvider {
|
|
|
|
|
2019-01-09 16:15:32 +01:00
|
|
|
/**
|
|
|
|
* @return {Config} Library config.
|
|
|
|
*/
|
2018-10-26 11:57:26 +02:00
|
|
|
public static getConfig(): Config {
|
2018-10-16 14:56:18 +02:00
|
|
|
return ConfigProvider.config
|
|
|
|
}
|
|
|
|
|
2019-01-09 16:15:32 +01:00
|
|
|
/**
|
|
|
|
* @param {Config} Library config.
|
|
|
|
*/
|
2018-10-26 10:40:46 +02:00
|
|
|
public static setConfig(config: Config) {
|
2018-10-16 14:56:18 +02:00
|
|
|
ConfigProvider.config = config
|
|
|
|
}
|
|
|
|
|
2019-01-09 16:15:32 +01:00
|
|
|
/**
|
|
|
|
* Library config.
|
|
|
|
* @type {Config}
|
|
|
|
*/
|
2018-10-16 14:56:18 +02:00
|
|
|
private static config: Config
|
|
|
|
}
|