Skip to content

Build your personal knowledge base with Trilium Notes

refactor: 💡 tree.ts refactor

Jin3e6cc1b4495a
diff --git a/src/public/app/services/tree.ts b/src/public/app/services/tree.ts
index ff4c342100..ca38c69daa 100644
--- a/src/public/app/services/tree.ts
+++ b/src/public/app/services/tree.ts
@@ -1,13 +1,11 @@
-import ws from "./ws.js";
-import utils from "./utils.js";
-import froca from "./froca.js";
-import hoistedNoteService from "../services/hoisted_note.js";
import appContext from "../components/app_context.js";
+import hoistedNoteService from "../services/hoisted_note.js";
+import froca from "./froca.js";
+import utils from "./utils.js";
+import ws from "./ws.js";
-/**
- * @returns {string|null}
- */
-async function resolveNotePath(notePath: string, hoistedNoteId = "root") {
+
+async function resolveNotePath(notePath: string, hoistedNoteId = "root"): Promise<string | null> {
const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId);
return runPath ? runPath.join("/") : null;