From e6e20044c84457c57448867af03a39e0b5c477fd Mon Sep 17 00:00:00 2001 From: RMidhunSuresh Date: Wed, 17 Nov 2021 18:51:12 +0530 Subject: [PATCH] Create interface for Platform config --- src/platform/web/Platform.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/platform/web/Platform.ts b/src/platform/web/Platform.ts index f6cd2895..3c15668e 100644 --- a/src/platform/web/Platform.ts +++ b/src/platform/web/Platform.ts @@ -38,6 +38,7 @@ import {downloadInIframe} from "./dom/download.js"; import {Disposables} from "../../utils/Disposables.js"; import {parseHTML} from "./parsehtml.js"; import {handleAvatarError} from "./ui/avatar.js"; +import {IPlatformConfig} from "../types/Platform"; function addScript(src) { return new Promise(function (resolve, reject) { @@ -125,7 +126,9 @@ function adaptUIOnVisualViewportResize(container) { } export class Platform { - constructor(container, config, cryptoExtras = null, options = null) { + private readonly _config: IPlatformConfig; + + constructor(container, config: IPlatformConfig, cryptoExtras = null, options = null) { this._config = config; this._container = container; this.settingsStorage = new SettingsStorage("hydrogen_setting_v1_");