Skip to content

Commit

Permalink
fix(build): build errors
Browse files Browse the repository at this point in the history
  • Loading branch information
eliandoran committed Jan 7, 2025
1 parent dafebc4 commit c1ea1fd
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/public/app/widgets/buttons/onclick_button.ts
Original file line number Diff line number Diff line change
@@ -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;
Expand Down
3 changes: 2 additions & 1 deletion src/public/app/widgets/containers/launcher.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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?: {
Expand Down Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion src/public/app/widgets/note_context_aware_widget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit c1ea1fd

Please sign in to comment.