# HG changeset patch # User Ludovic Chabant # Date 1657835010 25200 # Node ID 66cada11efb87877f5925ee90415911b85e2bd3a # Parent fbaf7c7126be591ee5a1cf4ea2acbf6b42e2b30a Fix typescript warnings diff -r fbaf7c7126be -r 66cada11efb8 src/main.ts --- a/src/main.ts Thu Jul 14 14:36:44 2022 -0700 +++ b/src/main.ts Thu Jul 14 14:43:30 2022 -0700 @@ -71,6 +71,9 @@ // Simple warning message. class WarningModal extends Modal { + title: string = ""; + message: string = ""; + constructor(app: App, title: string, message: string) { super(app) this.title = title; @@ -133,7 +136,7 @@ this.addSettingTab(new RememberFileStatePluginSettingTab(this.app, this)); - if (this.app.vault.getConfig('legacyEditor') !== false) { + if ((this.app.vault as any).getConfig('legacyEditor') !== false) { new WarningModal( this.app, "Legacy Editor Not Supported", @@ -229,7 +232,7 @@ this.registerOnUnloadFile(activeView); var isRealFileOpen = true; - const viewId = this.getUniqueViewId(activeView as ViewWithID); + const viewId = this.getUniqueViewId(activeView as unknown as ViewWithID); if (viewId != undefined) { const lastOpenFileInView = this._lastOpenFiles[viewId]; isRealFileOpen = (lastOpenFileInView != openedFile.path);