server-ts: Port services/sync

This commit is contained in:
Elian Doran
2024-02-18 13:10:51 +02:00
parent 43c89c0e9d
commit d89b791914
11 changed files with 133 additions and 85 deletions

View File

@@ -238,7 +238,7 @@ function getNoteTitle(filePath: string, replaceUnderscoresWithSpaces: boolean, n
}
}
function timeLimit<T>(promise: Promise<T>, limitMs: number, errorMessage: string): Promise<T> {
function timeLimit<T>(promise: Promise<T>, limitMs: number, errorMessage?: string): Promise<T> {
if (!promise || !promise.then) { // it's not actually a promise
return promise;
}