You've already forked joplin
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:
@ -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: '*',
|
||||
|
Reference in New Issue
Block a user