fix(build): build errors

This commit is contained in:
Elian Doran 2025-01-07 14:58:19 +02:00
parent dafebc4aae
commit c1ea1fd608
No known key found for this signature in database
4 changed files with 5 additions and 4 deletions

View File

@ -1,4 +1,4 @@
import AbstractButtonWidget, { AbstractButtonWidgetSettings, type AuxClickHandler, type ClickHandler } from "./abstract_button.js";
import AbstractButtonWidget, { AbstractButtonWidgetSettings } from "./abstract_button.js";
import { t } from "../../services/i18n.js";
export type ClickHandler = (widget: OnClickButtonWidget, e: JQuery.ClickEvent<any, any, any, any>) => void;

View File

@ -12,6 +12,7 @@ import TodayLauncher from "../buttons/launcher/today_launcher.js";
import HistoryNavigationButton from "../buttons/history_navigation.js";
import QuickSearchLauncherWidget from "../quick_search_launcher.js";
import FNote from "../../entities/fnote.js";
import { CommandNames } from "../../components/app_context.js";
interface InnerWidget extends BasicWidget {
settings?: {
@ -88,7 +89,7 @@ export default class LauncherWidget extends BasicWidget {
return new CommandButtonWidget()
.title(() => note.title)
.icon(() => note.getIcon())
.command(() => note.getLabelValue("command"));
.command(() => note.getLabelValue("command") as CommandNames);
}
async initCustomWidget(note: FNote) {

View File

@ -11,7 +11,7 @@ class NoteContextAwareWidget extends BasicWidget {
protected noteContext?: NoteContext;
isNoteContext(ntxId: string) {
isNoteContext(ntxId: string | null | undefined) {
if (Array.isArray(ntxId)) {
return this.noteContext && ntxId.includes(this.noteContext.ntxId);
}

View File

@ -63,7 +63,7 @@ export default class OptionsWidget extends NoteContextAwareWidget
}
}
async refreshWithNote(note: FNote) {
async refreshWithNote(note: FNote | null | undefined) {
const options = await server.get<OptionMap>('options');
if (options) {