Mercurial > obsidian-remember-file-state
changeset 29:66cada11efb8
Fix typescript warnings
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 14 Jul 2022 14:43:30 -0700 |
parents | fbaf7c7126be |
children | 88c1c125e621 |
files | src/main.ts |
diffstat | 1 files changed, 5 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- 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);