Skip to content

Build your personal knowledge base with Trilium Notes

chore(backend_api): document week note behaviour

Elian Doranb20a8bc90b1e
diff --git a/apps/server/src/services/backend_script_api.ts b/apps/server/src/services/backend_script_api.ts
index b3796637cb..249d09ea0f 100644
--- a/apps/server/src/services/backend_script_api.ts
+++ b/apps/server/src/services/backend_script_api.ts
@@ -255,8 +255,12 @@ export interface Api {
/**
* Returns week note for given date. If such a note doesn't exist, it is created.
*
+ * <p>
+ * If the calendar does not support week notes, this method will return `null`.
+ *
* @param date in YYYY-MM-DD format
* @param rootNote - specify calendar root note, normally leave empty to use the default calendar
+ * @return an existing or newly created week note, or `null` if the calendar does not support week notes.
*/
getWeekNote(date: string, rootNote: BNote): BNote | null;