mirror of
https://github.com/zadam/trilium.git
synced 2025-11-12 00:05:50 +01:00
refactor(services): use named imports from utils
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
import utils from "./utils.js";
|
||||
import { toObject } from "./utils.js";
|
||||
import BackendScriptApi from "./backend_script_api.js";
|
||||
import BNote from "../becca/entities/bnote.js";
|
||||
import { ApiParams } from './backend_script_api_interface.js';
|
||||
@@ -16,8 +16,8 @@ class ScriptContext {
|
||||
constructor(allNotes: BNote[], apiParams: ApiParams) {
|
||||
this.allNotes = allNotes;
|
||||
this.modules = {};
|
||||
this.notes = utils.toObject(allNotes, note => [note.noteId, note]);
|
||||
this.apis = utils.toObject(allNotes, note => [note.noteId, new BackendScriptApi(note, apiParams)]);
|
||||
this.notes = toObject(allNotes, note => [note.noteId, note]);
|
||||
this.apis = toObject(allNotes, note => [note.noteId, new BackendScriptApi(note, apiParams)]);
|
||||
}
|
||||
|
||||
require(moduleNoteIds: string[]) {
|
||||
|
||||
Reference in New Issue
Block a user