From a3ed77cd9ca545d54793c4f82ba4db51bfc57817 Mon Sep 17 00:00:00 2001 From: poanse <50020771+poanse@users.noreply.github.com> Date: Mon, 13 Jul 2026 09:29:52 +0300 Subject: [PATCH] obsidian warnings fix --- src/DraggingManager.svelte.ts | 2 +- src/helpers/FolderSuggest.ts | 4 +--- src/types.ts | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/DraggingManager.svelte.ts b/src/DraggingManager.svelte.ts index b58ef7d..ff7b8db 100644 --- a/src/DraggingManager.svelte.ts +++ b/src/DraggingManager.svelte.ts @@ -16,7 +16,7 @@ export class DraggingManager { public onPointerDown = (e: PointerEvent) => { console.debug("DraggingManager pointerDown"); - this.mouseDown = e.button as MouseDown; + this.mouseDown = e.button; if (this.mouseCodes.includes(this.mouseDown)) { this.startX = e.clientX; this.startY = e.clientY; diff --git a/src/helpers/FolderSuggest.ts b/src/helpers/FolderSuggest.ts index 40355c4..4921e71 100644 --- a/src/helpers/FolderSuggest.ts +++ b/src/helpers/FolderSuggest.ts @@ -9,9 +9,7 @@ export class FolderSuggest extends AbstractInputSuggest { textInputEl: HTMLInputElement; constructor(app: App, textInputEl: HTMLInputElement) { - // Cast the textarea to HTMLInputElement to satisfy TypeScript. - // This is a dirty hack, but runtime behavior is compatible - super(app, textInputEl as unknown as HTMLInputElement); + super(app, textInputEl); this.textInputEl = textInputEl; } diff --git a/src/types.ts b/src/types.ts index 6d83955..9903ffb 100644 --- a/src/types.ts +++ b/src/types.ts @@ -55,7 +55,7 @@ export const classStringFromStatusCode = (code: StatusCode) => { }; export const toIconCode = (s: StatusCode) => { - return (s + IconCode.STATUS_DRAFT) as IconCode; + return s + IconCode.STATUS_DRAFT; }; export const toStatusCode = (s: IconCode) => {