1
0
mirror of https://github.com/laurent22/joplin.git synced 2025-07-06 23:56:13 +02:00

Chore: TypeScript tweaks

This commit is contained in:
Laurent Cozic
2024-01-06 16:37:15 +00:00
parent 91b51adc48
commit 68e04f944f
2 changed files with 19 additions and 3 deletions

View File

@ -20,6 +20,22 @@ const { isImageMimeType } = require('../resourceUtils');
const { MarkupToHtml } = require('@joplin/renderer');
const { ALL_NOTES_FILTER_ID } = require('../reserved-ids');
interface PreviewsOptions {
order?: {
by: string;
dir: string;
}[];
conditions?: string[];
conditionsParams?: any[];
fields?: string[] | string;
uncompletedTodosOnTop?: boolean;
showCompletedTodos?: boolean;
anywherePattern?: string;
itemTypes?: string[];
limit?: number;
includeDeleted?: boolean;
}
export default class Note extends BaseItem {
public static updateGeolocationEnabled_ = true;
@ -332,7 +348,7 @@ export default class Note extends BaseItem {
public static async loadFolderNoteByField(folderId: string, field: string, value: any) {
if (!folderId) throw new Error('folderId is undefined');
const options = {
const options: PreviewsOptions = {
conditions: [`\`${field}\` = ?`],
conditionsParams: [value],
fields: '*',