Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
chore(electron): fix typecheck
Elian Doran57b6dfd06de9
diff --git a/apps/client/src/desktop.ts b/apps/client/src/desktop.tsindex 263495dc32..03986abf1b 100644--- a/apps/client/src/desktop.ts+++ b/apps/client/src/desktop.ts@@ -2,7 +2,7 @@ import "autocomplete.js/index_jquery.js";import type { ElectronWindowApi } from "@triliumnext/commons";-import appContext from "./components/app_context.js";+import appContext, { type CommandNames } from "./components/app_context.js";import electronContextMenu from "./menus/electron_context_menu.js";import bundleService from "./services/bundle.js";import glob from "./services/glob.js";@@ -50,7 +50,9 @@ function initOnElectron() {if (!api) return;const win = api.window;- win.onGlobalShortcut(async (actionName) => appContext.triggerCommand(actionName));+ // The action name comes from the keyboard-actions registry in the main+ // process; runtime contract is that it's always a valid CommandNames key.+ win.onGlobalShortcut(async (actionName) => appContext.triggerCommand(actionName as CommandNames));win.onOpenInSameTab(async (noteId) => appContext.tabManager.openInSameTab(noteId));const style = window.getComputedStyle(document.body);diff --git a/apps/client/src/widgets/TabHistoryNavigationButtons.tsx b/apps/client/src/widgets/TabHistoryNavigationButtons.tsxindex 493d00c41f..b14ab5886f 100644--- a/apps/client/src/widgets/TabHistoryNavigationButtons.tsx+++ b/apps/client/src/widgets/TabHistoryNavigationButtons.tsx@@ -1,5 +1,6 @@import "./TabHistoryNavigationButtons.css";+import type { ElectronApi } from "@triliumnext/commons";import { useEffect, useState } from "preact/hooks";import { t } from "../services/i18n";