server-ts: Convert services/backend_script_api

This commit is contained in:
Elian Doran
2024-04-04 22:00:20 +03:00
parent a154dc76ce
commit 15dee4b952
8 changed files with 427 additions and 471 deletions

View File

@@ -191,7 +191,7 @@ function getDayNote(dateStr: string, _rootNote: BNote | null = null): BNote {
return dateNote as unknown as BNote;
}
function getTodayNote(rootNote = null) {
function getTodayNote(rootNote: BNote | null = null) {
return getDayNote(dateUtils.localNowDate(), rootNote);
}
@@ -216,7 +216,7 @@ interface WeekNoteOpts {
startOfTheWeek?: StartOfWeek
}
function getWeekNote(dateStr: string, options: WeekNoteOpts = {}, rootNote = null) {
function getWeekNote(dateStr: string, options: WeekNoteOpts = {}, rootNote: BNote | null = null) {
const startOfTheWeek = options.startOfTheWeek || "monday";
const dateObj = getStartOfTheWeek(dateUtils.parseLocalDate(dateStr), startOfTheWeek);