From 48ad381a509773e50f4341164d4017feae1c993c Mon Sep 17 00:00:00 2001 From: Jin <22962980+JYC333@users.noreply.github.com> Date: Wed, 4 Jun 2025 10:33:40 +0200 Subject: [PATCH] =?UTF-8?q?refactor:=20=F0=9F=92=A1=20Add=20typing?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/server/src/services/date_notes.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/server/src/services/date_notes.ts b/apps/server/src/services/date_notes.ts index 764c33700..afec6c882 100644 --- a/apps/server/src/services/date_notes.ts +++ b/apps/server/src/services/date_notes.ts @@ -266,7 +266,7 @@ function getMonthNote(dateStr: string, _rootNote: BNote | null = null): BNote { return monthNote; } - let monthParentNote; + let monthParentNote: BNote | null; if (rootNote.hasLabel("enableQuarterNote")) { monthParentNote = getQuarterNote(getQuarterNumberStr(dayjs(dateStr)), rootNote); @@ -296,7 +296,7 @@ function getMonthNote(dateStr: string, _rootNote: BNote | null = null): BNote { function getWeekStartDate(date: Dayjs): Dayjs { const day = date.day(); - let diff; + let diff: number; if (optionService.getOption("firstDayOfWeek") === "0") { // Sunday diff = date.date() - day + (day === 0 ? -6 : 1); // adjust when day is sunday @@ -456,7 +456,7 @@ function getDayNote(dateStr: string, _rootNote: BNote | null = null): BNote { return dateNote; } - let dateParentNote; + let dateParentNote: BNote | null; if (rootNote.hasLabel("enableWeekNote")) { dateParentNote = getWeekNote(getWeekNumberStr(dayjs(dateStr)), rootNote);