Cleanup and light changes

This commit is contained in:
mProjectsCode 2022-10-09 15:40:37 +02:00
parent 3a4b69717d
commit 918c5b6fd7
8 changed files with 190 additions and 113 deletions

View file

@ -1,4 +1,5 @@
import {MediaTypeModel} from '../models/MediaTypeModel';
import {TFile} from 'obsidian';
export const pluginName: string = 'obsidian-media-db-plugin';
@ -159,12 +160,18 @@ export function dateTimeToString(dateTime: Date) {
return `${dateToString(dateTime)} ${timeToString(dateTime)}`;
}
/**
* @deprecated
*/
export class UserCancelError extends Error {
constructor(message: string) {
super(message);
}
}
/**
* @deprecated
*/
export class UserSkipError extends Error {
constructor(message: string) {
super(message);
@ -194,3 +201,14 @@ export class PropertyMappingNameConflictError extends Error {
super(message);
}
}
/**
* - attachTemplate: whether to attach the template (DEFAULT: false)
* - attachFie: a file to attach (DEFAULT: undefined)
* - openNote: whether to open the note after creation (DEFAULT: false)
*/
export interface CreateNoteOptions {
attachTemplate?: boolean,
attachFile?: TFile,
openNote?: boolean,
}