Skip to content

Build your personal knowledge base with Trilium Notes

chore(react): fix type errors

Elian Doran0754011909fa
diff --git a/apps/client/src/widgets/type_widgets/options/other.tsx b/apps/client/src/widgets/type_widgets/options/other.tsx
index 7275a7450d..6ac92b4207 100644
--- a/apps/client/src/widgets/type_widgets/options/other.tsx
+++ b/apps/client/src/widgets/type_widgets/options/other.tsx
@@ -154,7 +154,7 @@ function RevisionSnapshotInterval() {
<FormText>
<Trans
i18nKey="revisions_snapshot_interval.note_revisions_snapshot_description"
- components={{ doc: <a href="https://triliumnext.github.io/Docs/Wiki/note-revisions.html" class="external" />}}
+ components={{ doc: <a href="https://triliumnext.github.io/Docs/Wiki/note-revisions.html" class="external" /> as React.ReactElement }}
/>
</FormText>
<FormGroup name="revision-snapshot-time-interval" label={t("revisions_snapshot_interval.snapshot_time_interval_label")}>
diff --git a/apps/client/src/widgets/type_widgets/options/text_notes.tsx b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
index 650371cff7..26324d0cc9 100644
--- a/apps/client/src/widgets/type_widgets/options/text_notes.tsx
+++ b/apps/client/src/widgets/type_widgets/options/text_notes.tsx
@@ -12,7 +12,7 @@ import { Themes } from "@triliumnext/highlightjs";
import { ensureMimeTypesForHighlighting, loadHighlightingTheme } from "../../../services/syntax_highlight";
import { normalizeMimeTypeForCKEditor } from "@triliumnext/commons";
import { getHtml } from "../../react/RawHtml";
-import { CSSProperties } from "preact/compat";
+import type { CSSProperties } from "preact/compat";
import FormText from "../../react/FormText";
import FormTextBox, { FormTextBoxWithUnit } from "../../react/FormTextBox";
import CheckboxList from "./components/CheckboxList";
@@ -294,8 +294,8 @@ function DateTimeFormatOptions() {
<Trans
i18nKey="custom_date_time_format.description"
components={{
- shortcut: <KeyboardShortcut actionName="insertDateTimeToText" />,
- doc: <a href="https://day.js.org/docs/en/display/format" target="_blank" rel="noopener noreferrer" />
+ shortcut: <KeyboardShortcut actionName="insertDateTimeToText" /> as React.ReactElement,
+ doc: <a href="https://day.js.org/docs/en/display/format" target="_blank" rel="noopener noreferrer" /> as React.ReactElement
}}
/>
</FormText>