From 3e6cc1b4495a13bfe6c105735efba24604fa6462 Mon Sep 17 00:00:00 2001 From: Jin <22962980+JYC333@users.noreply.github.com> Date: Thu, 10 Apr 2025 22:08:34 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20tree.ts=20refactor?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/public/app/services/tree.ts | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/src/public/app/services/tree.ts b/src/public/app/services/tree.ts index ff4c34210..ca38c69da 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 { const runPath = await resolveNotePathToSegments(notePath, hoistedNoteId); return runPath ? runPath.join("/") : null;