1
Fork 0

Add documentation.

This commit is contained in:
Bauke 2023-10-11 19:31:45 +02:00
parent 5dc92d0e1a
commit c7758eb9f0
Signed by: Bauke
GPG Key ID: C1C0F29952BCF558
1 changed files with 5 additions and 0 deletions

View File

@ -68,6 +68,11 @@ export async function saveUserLabels(
}
}
/**
* Create a new user label ID by getting the current highest existing ID in
* storage and adding 1 to it. Defaults to 1 when no there are no existing
* labels.
*/
export async function newUserLabelId(): Promise<number> {
const userLabels = await collectUserLabels();
let newId = 1;