mirror of
https://github.com/zadam/trilium.git
synced 2025-11-17 02:30:42 +01:00
server-esm: Solve some more imports
This commit is contained in:
@@ -7,7 +7,7 @@ import BBranch from '../becca/entities/bbranch';
|
||||
import becca from '../becca/becca';
|
||||
import log from './log';
|
||||
|
||||
interface CloneResponse {
|
||||
export interface CloneResponse {
|
||||
success: boolean;
|
||||
message?: string;
|
||||
branchId?: string;
|
||||
@@ -53,7 +53,7 @@ function cloneNoteToParentNote(noteId: string, parentNoteId: string, prefix: str
|
||||
};
|
||||
}
|
||||
|
||||
function cloneNoteToBranch(noteId: string, parentBranchId: string, prefix: string) {
|
||||
function cloneNoteToBranch(noteId: string, parentBranchId: string, prefix?: string) {
|
||||
const parentBranch = becca.getBranch(parentBranchId);
|
||||
|
||||
if (!parentBranch) {
|
||||
|
||||
@@ -12,6 +12,7 @@ import sanitizeAttributeName from "../sanitize_attribute_name.js";
|
||||
import TaskContext from "../task_context.js";
|
||||
import BNote from "../../becca/entities/bnote.js";
|
||||
import { File } from "./common";
|
||||
import { AttributeType } from "../../becca/entities/rows.js";
|
||||
|
||||
/**
|
||||
* date format is e.g. 20181121T193703Z or 2013-04-14T16:19:00.000Z (Mac evernote, see #3496)
|
||||
@@ -29,7 +30,7 @@ function parseDate(text: string) {
|
||||
}
|
||||
|
||||
interface Attribute {
|
||||
type: string;
|
||||
type: AttributeType;
|
||||
name: string;
|
||||
value: string;
|
||||
}
|
||||
|
||||
@@ -50,7 +50,7 @@ function checkDate(millisSinceMidnight: number) {
|
||||
return millisSinceMidnight;
|
||||
}
|
||||
|
||||
function log(str: string) {
|
||||
function log(str: string | Error) {
|
||||
const bundleNoteId = cls.get("bundleNoteId");
|
||||
|
||||
if (bundleNoteId) {
|
||||
@@ -66,11 +66,11 @@ function log(str: string) {
|
||||
console.log(str);
|
||||
}
|
||||
|
||||
function info(message: string) {
|
||||
function info(message: string | Error) {
|
||||
log(message);
|
||||
}
|
||||
|
||||
function error(message: string) {
|
||||
function error(message: string | Error) {
|
||||
log(`ERROR: ${message}`);
|
||||
}
|
||||
|
||||
|
||||
@@ -18,7 +18,19 @@ import Expression from "../expressions/expression.js";
|
||||
import sql from "../../sql.js";
|
||||
import scriptService from "../../script.js";
|
||||
|
||||
function searchFromNote(note: BNote) {
|
||||
export interface SearchNoteResult {
|
||||
searchResultNoteIds: string[];
|
||||
highlightedTokens: string[];
|
||||
error: string | null;
|
||||
}
|
||||
|
||||
export const EMPTY_RESULT: SearchNoteResult = {
|
||||
searchResultNoteIds: [],
|
||||
highlightedTokens: [],
|
||||
error: null
|
||||
};
|
||||
|
||||
function searchFromNote(note: BNote): SearchNoteResult {
|
||||
let searchResultNoteIds;
|
||||
let highlightedTokens: string[];
|
||||
|
||||
|
||||
Reference in New Issue
Block a user