Addd ResolvedConfigOptions back
This commit is contained in:
parent
29f48f25f4
commit
3581aceb5a
2 changed files with 16 additions and 3 deletions
|
@ -14,7 +14,11 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import { DEFAULT_CONFIG, ConfigOptions } from "./ConfigOptions";
|
||||
import {
|
||||
DEFAULT_CONFIG,
|
||||
ConfigOptions,
|
||||
ResolvedConfigOptions,
|
||||
} from "./ConfigOptions";
|
||||
|
||||
export class Config {
|
||||
private static internalInstance: Config;
|
||||
|
@ -48,7 +52,7 @@ export class Config {
|
|||
return Config.get().default_server_config["m.homeserver"].server_name;
|
||||
}
|
||||
|
||||
public config?: ConfigOptions;
|
||||
public config?: ResolvedConfigOptions;
|
||||
private initPromise?: Promise<void>;
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,15 @@ export interface ConfigOptions {
|
|||
|
||||
// Describes the default homeserver to use. The same format as Element Web
|
||||
// (without identity servers as we don't use them).
|
||||
default_server_config?: {
|
||||
["m.homeserver"]: {
|
||||
base_url: string;
|
||||
server_name: string;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
export interface ResolvedConfigOptions extends ConfigOptions {
|
||||
default_server_config: {
|
||||
["m.homeserver"]: {
|
||||
base_url: string;
|
||||
|
@ -30,7 +39,7 @@ export interface ConfigOptions {
|
|||
};
|
||||
}
|
||||
|
||||
export const DEFAULT_CONFIG: ConfigOptions = {
|
||||
export const DEFAULT_CONFIG: ResolvedConfigOptions = {
|
||||
default_server_config: {
|
||||
["m.homeserver"]: {
|
||||
base_url: "http://localhost:8008",
|
||||
|
|
Loading…
Reference in a new issue