chore: lint-format-docs-tests-bugfixes (#105)
* docs: add jsdoc * feat: change enums to as const objects * chore(test): add themeColors.test.ts * fix: fix tests and bugs with strings.ts util * fix: path alias imports and tsconfig file bug * fix: remove --max-warnings 0
This commit is contained in:
@@ -1,5 +1,11 @@
|
||||
import { UserScheduleStore } from '@shared/storage/UserScheduleStore';
|
||||
|
||||
/**
|
||||
* Renames a schedule with the specified name to a new name.
|
||||
* @param scheduleName - The name of the schedule to be renamed.
|
||||
* @param newName - The new name for the schedule.
|
||||
* @returns A promise that resolves to a string if there is an error, or undefined if the schedule is renamed successfully.
|
||||
*/
|
||||
export default async function renameSchedule(scheduleName: string, newName: string): Promise<string | undefined> {
|
||||
const schedules = await UserScheduleStore.get('schedules');
|
||||
const scheduleIndex = schedules.findIndex(schedule => schedule.name === scheduleName);
|
||||
|
||||
Reference in New Issue
Block a user