1 | /**
|
2 | * @class
|
3 | */
|
4 | export declare class ConfigurationBase {
|
5 | /**
|
6 | * Gets the current configuration
|
7 | * @returns ConfigurationBase - An instance of DataConfiguration class which represents the current data configuration
|
8 | */
|
9 | public static getCurrent(): ConfigurationBase;
|
10 | /**
|
11 | * Sets the current configuration
|
12 | * @param {ConfigurationBase} configuration
|
13 | * @returns ConfigurationBase - An instance of ApplicationConfiguration class which represents the current configuration
|
14 | */
|
15 | public static setCurrent(configuration: ConfigurationBase): any;
|
16 | public readonly settings: any;
|
17 | /**
|
18 | * @constructor
|
19 | * @param {string=} configPath
|
20 | */
|
21 | constructor(configPath?: string);
|
22 | /**
|
23 | * Register a configuration strategy
|
24 | * @param {Function|*} configStrategyCtor
|
25 | * Function|*} strategyCtor
{ |
26 | * ConfigurationBase
|
27 | */
|
28 | public useStrategy(configStrategyCtor: any, strategyCtor: any): this;
|
29 | /**
|
30 | * Gets a configuration strategy
|
31 | * @param {Function|*} configStrategyCtor
|
32 | * @returns {ConfigurationStrategy|*}
|
33 | */
|
34 | public getStrategy(configStrategyCtor: any): any;
|
35 | /**
|
36 | * Gets a configuration strategy
|
37 | * @param {Function} configStrategyCtor
|
38 | */
|
39 | public hasStrategy(configStrategyCtor: any): boolean;
|
40 | /**
|
41 | * Returns the configuration source object
|
42 | * @returns {*}
|
43 | */
|
44 | public getSource(): any;
|
45 | /**
|
46 | * Returns the source configuration object based on the given path (e.g. settings.auth.cookieName or settings/auth/cookieName)
|
47 | * @param {string} p - A string which represents an object path
|
48 | * @returns {Object|Array}
|
49 | */
|
50 | public getSourceAt(p: string): any;
|
51 | /**
|
52 | * Returns a boolean which indicates whether the specified object path exists or not (e.g. settings.auth.cookieName or settings/auth/cookieName)
|
53 | * @param {string} p - A string which represents an object path
|
54 | * @returns {boolean}
|
55 | */
|
56 | public hasSourceAt(p: string): boolean;
|
57 | /**
|
58 | * Sets the config value to the specified object path (e.g. settings.auth.cookieName or settings/auth/cookieName)
|
59 | * @param {string} p - A string which represents an object path
|
60 | * @param {*} value
|
61 | * @returns {Object}
|
62 | */
|
63 | public setSourceAt(p: any, value: any): any;
|
64 | /**
|
65 | * Sets the current execution path
|
66 | * @param {string} p
|
67 | */
|
68 | public setExecutionPath(p: string): ConfigurationBase;
|
69 | /**
|
70 | * Gets the current execution path
|
71 | * @returns {string}
|
72 | */
|
73 | public getExecutionPath(): string;
|
74 | /**
|
75 | * Gets the current configuration path
|
76 | * @returns {string}
|
77 | */
|
78 | public getConfigurationPath(): string;
|
79 | }
|
80 | /**
|
81 | * @class
|
82 | */
|
83 | export declare class ConfigurationStrategy {
|
84 | /**
|
85 | * @constructor
|
86 | * @param {ConfigurationBase} config
|
87 | */
|
88 | constructor(config: ConfigurationBase);
|
89 | /**
|
90 | * @returns {ConfigurationBase}
|
91 | */
|
92 | public getConfiguration(): ConfigurationBase;
|
93 | }
|
94 | export declare class ModuleLoaderStrategy extends ConfigurationStrategy {
|
95 | /**
|
96 | *
|
97 | * @param {ConfigurationBase} config
|
98 | */
|
99 | constructor(config: ConfigurationBase);
|
100 | /**
|
101 | * @param {string} modulePath
|
102 | * {*}
|
103 | */
|
104 | public require(modulePath: any): any;
|
105 | }
|
106 | export declare class DefaultModuleLoaderStrategy extends ModuleLoaderStrategy {
|
107 | /**
|
108 | *
|
109 | * @param {ConfigurationBase} config
|
110 | */
|
111 | constructor(config: any);
|
112 | }
|