From ef66d330eca0a19a083b6c71b3330338ccae35ee Mon Sep 17 00:00:00 2001 From: Panagiotis Papadopoulos Date: Fri, 31 Jan 2025 07:43:25 +0100 Subject: [PATCH] chore(server/utils): timeLimit - add TODO comment --- src/services/utils.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/services/utils.ts b/src/services/utils.ts index c9636f16f..aec55305d 100644 --- a/src/services/utils.ts +++ b/src/services/utils.ts @@ -9,6 +9,7 @@ import mimeTypes from "mime-types"; import path from "path"; import { fileURLToPath } from "url"; import { dirname, join } from "path"; +//import type { NoteType } from "../rows.js"; const randtoken = generator({ source: "crypto" }); @@ -203,6 +204,7 @@ export function getNoteTitle(filePath: string, replaceUnderscoresWithSpaces: boo } export function timeLimit(promise: Promise, limitMs: number, errorMessage?: string): Promise { + // TriliumNextTODO: since TS avoids this from ever happening – do we need this check? if (!promise || !promise.then) { // it's not actually a promise return promise;