Skip to content

Build your personal knowledge base with Trilium Notes

chore: use more narrow NoteType for RevisionRow

Panagiotis Papadopoulos7bd9be7b299d
diff --git a/src/becca/entities/brevision.ts b/src/becca/entities/brevision.ts
index 6167ad4b23..bc9ce360c7 100644
--- a/src/becca/entities/brevision.ts
+++ b/src/becca/entities/brevision.ts
@@ -7,7 +7,7 @@ import becca from "../becca.js";
import AbstractBeccaEntity from "./abstract_becca_entity.js";
import sql from "../../services/sql.js";
import BAttachment from "./battachment.js";
-import type { AttachmentRow, RevisionRow } from "./rows.js";
+import type { AttachmentRow, NoteType, RevisionRow } from "./rows.js";
import eraseService from "../../services/erase.js";
interface ContentOpts {
@@ -36,7 +36,7 @@ class BRevision extends AbstractBeccaEntity<BRevision> {
revisionId?: string;
noteId!: string;
- type!: string;
+ type!: NoteType;
mime!: string;
title!: string;
dateLastEdited?: string;
diff --git a/src/becca/entities/rows.ts b/src/becca/entities/rows.ts
index b57801e1ec..2228092bac 100644
--- a/src/becca/entities/rows.ts
+++ b/src/becca/entities/rows.ts
@@ -22,7 +22,7 @@ export interface AttachmentRow {
export interface RevisionRow {
revisionId?: string;
noteId: string;
- type: string;
+ type: NoteType;
mime: string;
isProtected?: boolean;
title: string;